r1968 - trunk/scripts

alexander at linuxfromscratch.org alexander at linuxfromscratch.org
Fri Jul 20 06:31:25 PDT 2007


Author: alexander
Date: 2007-07-20 07:31:25 -0600 (Fri, 20 Jul 2007)
New Revision: 1968

Modified:
   trunk/scripts/shutdown-helper
Log:
Fixed the following things in the shutdown helper:

 * detection of the case when the CD runs from a partition
 * dereferencing of /dev/lfs-cd symlink when copying it



Modified: trunk/scripts/shutdown-helper
===================================================================
--- trunk/scripts/shutdown-helper	2007-07-20 01:36:04 UTC (rev 1967)
+++ trunk/scripts/shutdown-helper	2007-07-20 13:31:25 UTC (rev 1968)
@@ -36,7 +36,7 @@
 		;;
 esac
 
-if [ ! -b /dev/lfs-cd ] && [ ! -d /.tmpfs/.partition ] ; then
+if [ ! -b /dev/lfs-cd ] && [ ! -d /dev/shm/.partition ] ; then
 	# The CD has been loaded into RAM
 	$HALT
 	while true ; do sleep 1 ; done
@@ -45,7 +45,7 @@
 mkdir /dev/shm/old /dev/shm/proc /dev/shm/etc
 ln -s /proc/mounts /dev/shm/etc/mtab
 echo "$FILES" | cpio -pLd --quiet /dev/shm
-if [ -b /dev/lfs-cd ] ; then cp -a /dev/lfs-cd /dev/shm/dev/lfs-cd ; fi
+if [ -b /dev/lfs-cd ] ; then cp -RH /dev/lfs-cd /dev/shm/dev/lfs-cd ; fi
 
 cat >/dev/shm/sbin/init <<EOF
 #!/bin/sh




More information about the livecd mailing list