[Lunar-commits] <lunar-iso> Improved installer

Peter de Ridder peter at lunar-linux.org
Fri Aug 23 16:00:42 CEST 2013


commit b121b048b3ebbe657b3ddf04c526dc084d135388
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Fri, 23 Aug 2013 04:54:21 -0700
URL: https://github.com/lunar-linux/lunar-iso/commit/b121b048b3ebbe657b3ddf04c526dc084d135388

Improved installer
---
  README                           | +3/-3     
  lunar-install/sbin/lunar-install | +1/-1     
  mkfiles/installer.mk             | +3/-1     
  3 files changed, 7 insertions(+), 5 deletions(-)

--- a/README
+++ b/README
@@ -53,7 +53,7 @@ boostrap-lunar		use Lunar host to get the main modules into BUILD/
 boostrap-base		populate BUILD/ directory with generic files
 boostrap		populate BUILD/ directory
 
-donwload-moonbase	download the moonbase, can be used for updating
+download-moonbase	download the moonbase, can be used for updating
 moonbase-git		create moonbase package from local git
 install-moonbase	extract the moonbase to BUILD/
 download-lunar		use Lunar host to download all sources
@@ -61,7 +61,7 @@ download		download all sources
 
 stage1-spool		copy spool/ to BUILD/
 stage1-moonbase		fix the moonbase cache files
-stage1-toolchian	build gcc, glibc and binutils
+stage1-toolchain	build gcc, glibc and binutils
 stage1-build		build the main modules
 stage1-cache		copy stage1 to cache/
 stage1			build stage1 and copy to cache/
@@ -72,7 +72,7 @@ stage2-modules		populate BUILD/ with stage1 modules
 stage2-spool		copy spool/ to BUILD/
 stage2-extract-moonbase	extract the moonbase to BUILD/
 stage2-moonbase		fix the moonbase cache files
-stage2-toolchian	build stage2 gcc, glibc and binutils
+stage2-toolchain	build stage2 gcc, glibc and binutils
 stage2-build		build stage2 core modules
 stage2			build stage2 from stage1
 
--- a/lunar-install/sbin/lunar-install
+++ b/lunar-install/sbin/lunar-install
@@ -251,7 +251,7 @@ list_block_devices()
 	local DEVICE FDEVICE PDEVICE
 
     # Grab protected device when booting iso from other media then cdrom
-    PDEVICE=$(basename `grep '/mnt/device' /proc/mounts  | cut -d' ' -f1` 2> /dev/null)
+    PDEVICE=$(basename `grep -v '^rootfs' | fgrep -w '/' /proc/mounts | cut -d' ' -f1` 2> /dev/null)
 
 	for DEVICE in $(tail +3 /proc/partitions | awk '{print $4}' | grep -v -e ${PDEVICE:-^$} -e loop); do
 		FDEVICE=$(lsh unmap_device /dev/$DEVICE)
--- a/mkfiles/installer.mk
+++ b/mkfiles/installer.mk
@@ -6,7 +6,9 @@ installer: lunar-install
 # Install the Lunar installer
 $(ISO_TARGET)/sbin/lunar-install: $(ISO_SOURCE)/lunar-install/sbin/lunar-install iso-target
 	@echo lunar-install
-	@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):' $< > $@
+	@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):' $< > $@.tmp
+	@chmod --reference $< $@.tmp
+	@mv $@.tmp $@
 
 # Generate locale list
 $(ISO_TARGET)/usr/share/lunar-install/locale.list: iso-target




More information about the Lunar-commits mailing list