livecd: linuxrc - busybox works this way - check if initrd exists ...

havner havner at pld-linux.org
Tue Jul 11 15:12:41 CEST 2006


Author: havner                       Date: Tue Jul 11 13:12:41 2006 GMT
Module: livecd                        Tag: HEAD
---- Log message:
- busybox works this way
- check if initrd exists before creating

---- Files affected:
livecd:
   linuxrc (1.22 -> 1.23) 

---- Diffs:

================================================================
Index: livecd/linuxrc
diff -u livecd/linuxrc:1.22 livecd/linuxrc:1.23
--- livecd/linuxrc:1.22	Mon Jul 10 16:02:24 2006
+++ livecd/linuxrc	Tue Jul 11 15:12:36 2006
@@ -199,12 +199,11 @@
 	umount -n /rootfs/media/LiveCD > $LOG 2>&1
 	rm -rf /rootfs/media/LiveCD
 	echo "${YELLOW}Done, you can now eject your cdrom${NORMAL}"
-	mount -n -t squashfs -o ro,loop=/dev/loop7 /rootfs/pldcd /rootfs/live
-	#mount2 /rootfs/pldcd
+	losetup /dev/loop7 /rootfs/pldcd
 else
-	mount -n -t squashfs -o ro,loop=/dev/loop7 /rootfs/media/LiveCD/pldcd /rootfs/live
-	#mount2 /rootfs/media/LiveCD/pldcd
+	losetup /dev/loop7 /rootfs/media/LiveCD/pldcd
 fi
+mount -n -t squashfs -o ro /dev/loop7 /rootfs/live
 
 if getparam X > /dev/null || getparam x > /dev/null; then
 	INITPARAM="5 "
@@ -223,7 +222,7 @@
 mount -o bind live/usr-bind usr > $LOG 2>&1
 umount -n /proc > $LOG 2>&1
 
-mkdir initrd
+[ ! -d mkdir ] && mkdir initrd
 pivot_root . initrd
 
 exec /usr/sbin/chroot . /sbin/init ${INITPARAM} <dev/console >dev/console 2>&1
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/livecd/linuxrc?r1=1.22&r2=1.23&f=u



More information about the pld-cvs-commit mailing list