[Lunar-commits] <lunar-iso> Updated iso building to match the old installer.

Peter de Ridder peter at lunar-linux.org
Sat Apr 20 09:54:54 CEST 2013


commit a118e2b6c38df5574dfbac719ecbb2166cf6e384
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Thu, 18 Apr 2013 12:11:34 -0700
URL: https://github.com/lunar-linux/lunar-iso/commit/a118e2b6c38df5574dfbac719ecbb2166cf6e384

Updated iso building to match the old installer.
---
  livecd/template/etc/motd         | +10/-0    
  lunar-install/sbin/lunar-install | +13/-31   
  mkfiles/installer.mk             | +10/-1    
  mkfiles/iso.mk                   | +1/-1     
  mkfiles/kernel.mk                | +1/-0     
  template/motd                    | +9/-6     
  template/motd.target             | +0/-13    
  7 files changed, 44 insertions(+), 52 deletions(-)

--- /dev/null
+++ b/livecd/template/etc/motd
@@ -0,0 +1,10 @@
+
+Welcome to Lunar Linux %VERSION% (%CODENAME%)!
+
+You are running the system from the lunar ISO - as a Live CD. Not
+all tools are available within this system, as it only contains
+the base tools. Limited networking tools are also available.
+
+The install target location is /mnt. You can mount it yourself
+there or chroot into it to perform maintenance and rescue.
+
--- a/lunar-install/sbin/lunar-install
+++ b/lunar-install/sbin/lunar-install
@@ -18,6 +18,8 @@ LOCALE_LIST=/usr/share/lunar-install/locale.list
 PACKAGES_LIST=/var/cache/lunar/packages
 KERNEL_LIST=/var/cache/lunar/kernels
 KMOD_LIST=/var/spool/lunar/kmodules
+MOONBASE_TAR=/usr/share/lunar-install/moonbase.tar.bz2
+MOTD_FILE=/usr/share/lunar-install/motd
 
 pkg_avail()
 {
@@ -1080,13 +1082,13 @@ transfer()
 			percent_msg "Installing moonbase"
 			(
 				cd $TARGET/var/lib/lunar
-				tar xjf /var/lib/lunar/moonbase.tar.bz2 2> /dev/null
-				tar j --list -f /var/lib/lunar/moonbase.tar.bz2 | sed 's:^:/var/lib/lunar/:g' > $TARGET/var/log/lunar/install/moonbase-%DATE%
+				tar xjf $MOONBASE_TAR 2> /dev/null
+				tar j --list -f $MOONBASE_TAR | sed 's:^:/var/lib/lunar/:g' > $TARGET/var/log/lunar/install/moonbase-%DATE%
 			)
 
 			# transfer sources
-			percent_msg "Copying sources"
-			cp /var/spool/lunar/* $TARGET/var/spool/lunar/
+			#percent_msg "Copying sources"
+			#cp /var/spool/lunar/* $TARGET/var/spool/lunar/
 
 			# setup list of installed packages etc.
 			percent_msg "Updating administrative files"
@@ -1113,10 +1115,10 @@ transfer()
 			[ -z "$EDITOR" ] || echo "export EDITOR=\"$EDITOR\"" > $TARGET/etc/profile.d/editor.rc
 
 			# post-first-boot message:
-			cp /etc/init.d/lunar-install $TARGET/etc/init.d/
-			ln -sf /etc/init.d/lunar-install $TARGET/etc/rc3.d/S99lunar-install
+			#cp /etc/init.d/lunar-install $TARGET/etc/init.d/
+			#ln -sf /etc/init.d/lunar-install $TARGET/etc/rc3.d/S99lunar-install
 			cp /README $TARGET/root/README
-			cp /etc/motd.target $TARGET/etc/motd
+			cp $MOTD_FILE $TARGET/etc/motd
 
 			# save proxies
 			if [ -n "$HPROXY" -o -n "$FPROXY" -o -n "$NPROXY" ]; then
@@ -1141,11 +1143,11 @@ transfer()
 			make_grub_conf
 
 			# some more missing files:
-			cp /etc/lunar.release $TARGET/etc/
+			#cp /etc/lunar.release $TARGET/etc/
 			cp /etc/lsb-release $TARGET/etc/
 
 			echo "    LUNAR_MODULE=lunar" > $TARGET/etc/lunar/local/config
-			cp /etc/lunar/local/.config* $TARGET/etc/lunar/local/
+			#cp /etc/lunar/local/.config* $TARGET/etc/lunar/local/
 
 			# initialize the new machine:
 			touch $TARGET/var/log/{btmp,utmp,wtmp,lastlog}
@@ -1360,7 +1362,7 @@ font_menu()
 	CONSOLEFONT=${CONSOLEFONT:-default8x16}
 	CONSOLEFONT=`$DIALOG --title "$TITLE" --default-item "$CONSOLEFONT" --menu "$HELP" 0 0 0 $FONTS`
 	if [ $? == 0 ]; then
-		consolechars -f $CONSOLEFONT
+		setfont $CONSOLEFONT
 		D_OK=\\Z2
 	fi
 	DEFAULT=E
@@ -1465,27 +1467,7 @@ install_kernels()
 
 		case $KCOMMAND in
 			C)
-				CCOMMAND=`$DIALOG --title "Kernel selection menu" --cancel-label "Exit" --default-item "L" --item-help --menu "" 0 0 0 $(list_kernel_modules)`
-				if grep -q "^$CCOMMAND:" $KMOD_LIST ; then
-				    KERNMODULE=$(grep "^$CCOMMAND:" $KMOD_LIST | cut -d: -f2)
-				    if ! USE_CLEAR=1 USE_SWAP=1 chroot_run lin -r $KERNMODULE; then
-						echo "Press ENTER to go back to the menu"
-						read
-					else
-						msgbox "The kernel \"$KERNMODULE\" has been installed to your system."
-						if (( STEP == 8 )); then
-							(( STEP++ ))
-						fi
-						K_OK=\\Z2
-						R_OK=
-						U_OK=
-						H_OK=
-						V_OK=
-						G_OK=
-						A_OK=
-						break
-					fi
-				fi
+				msgbox "This option is not available from the installer."
 			;;
 			P)
 				CCOMMAND=`$DIALOG --title "Kernel selection menu" --cancel-label "Exit" --item-help --menu "" 0 0 0 \
--- a/mkfiles/installer.mk
+++ b/mkfiles/installer.mk
@@ -20,4 +20,13 @@ $(ISO_TARGET)/usr/share/lunar-install/locale.list: iso-target
 	  echo -e "$$locale\t$$language ($$territory)" ; \
 	done > $@
 
-lunar-install: $(ISO_TARGET)/.lunar-install $(ISO_TARGET)/usr/share/lunar-install/locale.list
+$(ISO_TARGET)/usr/share/lunar-install/moonbase.tar.bz2: $(ISO_SOURCE)/spool/moonbase.tar.bz2 iso-target
+	@cp $< $@
+
+$(ISO_TARGET)/README: $(ISO_SOURCE)/template/README iso-target
+	@sed -e 's:%VERSION%:$(ISO_VERSION):g' -e 's:%CODENAME%:$(ISO_CODENAME):g' -e 's:%DATE%:$(ISO_DATE):g' -e 's:%KERNEL%:$(ISO_KERNEL):g' -e 's:%CNAME%:$(ISO_CNAME):g' -e 's:%COPYRIGHTYEAR%:$(ISO_COPYRIGHTYEAR):g' -e 's:%LABEL%:$(ISO_LABEL):' $< > $@
+
+$(ISO_TARGET)/usr/share/lunar-install/motd: $(ISO_SOURCE)/template/motd iso-target
+	@sed -e 's:%VERSION%:$(ISO_VERSION):g' -e 's:%CODENAME%:$(ISO_CODENAME):g' -e 's:%DATE%:$(ISO_DATE):g' -e 's:%KERNEL%:$(ISO_KERNEL):g' -e 's:%CNAME%:$(ISO_CNAME):g' -e 's:%COPYRIGHTYEAR%:$(ISO_COPYRIGHTYEAR):g' -e 's:%LABEL%:$(ISO_LABEL):' $< > $@
+
+lunar-install: $(ISO_TARGET)/.lunar-install $(ISO_TARGET)/usr/share/lunar-install/locale.list $(ISO_TARGET)/usr/share/lunar-install/moonbase.tar.bz2 $(ISO_TARGET)/README $(ISO_TARGET)/usr/share/lunar-install/motd
--- a/mkfiles/iso.mk
+++ b/mkfiles/iso.mk
@@ -30,7 +30,7 @@ iso-modules: $(ISO_TARGET)/.iso-modules
 
 
 # Prepare target files
-ISO_ETC_FILES=lsb-release fstab
+ISO_ETC_FILES=lsb-release fstab motd
 
 $(ISO_TARGET)/etc/%: $(ISO_SOURCE)/livecd/template/etc/% iso-modules
 	@sed -e 's:%VERSION%:$(ISO_VERSION):g' -e 's:%CODENAME%:$(ISO_CODENAME):g' -e 's:%DATE%:$(ISO_DATE):g' -e 's:%KERNEL%:$(ISO_KERNEL):g' -e 's:%CNAME%:$(ISO_CNAME):g' -e 's:%COPYRIGHTYEAR%:$(ISO_COPYRIGHTYEAR):g' -e 's:%LABEL%:$(ISO_LABEL):' $< > $@
--- a/mkfiles/kernel.mk
+++ b/mkfiles/kernel.mk
@@ -28,6 +28,7 @@ $(ISO_TARGET)/var/cache/lunar/linux-$(ISO_ARCH).files: $(ISO_TARGET)/var/cache/l
 $(ISO_TARGET)/var/cache/lunar/linux-$(ISO_ARCH).tar.bz2: $(ISO_TARGET)/var/cache/lunar/linux-$(ISO_ARCH).tar $(ISO_TARGET)/var/cache/lunar/linux-$(ISO_ARCH).files
 	@tar -rf $< -C $(ISO_TARGET) -T $(ISO_TARGET)/var/cache/lunar/linux-$(ISO_ARCH).files
 	@rm $(ISO_TARGET)/var/cache/lunar/linux-$(ISO_ARCH).files
+	@echo 'linux-$(ISO_ARCH):You have no choice' > $(ISO_TARGET)/var/cache/lunar/kernels
 	@bzip2 $<
 
 linux: $(ISO_TARGET)/var/cache/lunar/linux-$(ISO_ARCH).tar.bz2
--- a/template/motd
+++ b/template/motd
@@ -1,10 +1,13 @@
 
 Welcome to Lunar Linux %VERSION% (%CODENAME%)!
 
-You are running the system from the lunar ISO - as a Live CD. Not
-all tools are available within this system, as it only contains
-the base tools. Limited networking tools are also available.
-
-The install target location is /mnt. You can mount it yourself
-there or chroot into it to perform maintenance and rescue.
+Read `man lfirsttime` if you are a new Lunar Linux user. It contains
+many hints that are useful if you do not know what to do next. Read
+`man lunar` about the Lunar Linux package management system, to find
+out how to install additional packages. Also read the "/root/README"
+file for more hints on what you can do with the ISO itself in case
+of problems.
+
+You are reading the contents of "/etc/motd". If you do not edit or
+remove it, it will continue to bug you with this message.
 
--- a/template/motd.target
+++ /dev/null
@@ -1,13 +0,0 @@
-
-Welcome to Lunar Linux %VERSION% (%CODENAME%)!
-
-Read `man lfirsttime` if you are a new Lunar Linux user. It contains
-many hints that are useful if you do not know what to do next. Read
-`man lunar` about the Lunar Linux package management system, to find
-out how to install additional packages. Also read the "/root/README"
-file for more hints on what you can do with the ISO itself in case
-of problems.
-
-You are reading the contents of "/etc/motd". If you do not edit or
-remove it, it will continue to bug you with this message.
-




More information about the Lunar-commits mailing list