Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 499ac55ad3d8cdb86b9eac891756c0b9 > files > 59

draklive-config-One-0.1-0.20080403.1.1mdv2008.1.noarch.rpm

--- etc/init.d/halt.live	2006-08-21 20:28:25.000000000 +0000
+++ etc/init.d/halt	2006-08-21 21:14:06.000000000 +0000
@@ -173,6 +173,7 @@
     -f
 
 LANG=C __umount_loop '$2 ~ /^\/$|^\/proc|^\/dev/{next}
+	$2 ~ /^\/live\//{next}
 	$3 == "tmpfs" || $3 == "proc" {print $2 ; next}
 	/(loopfs|autofs|sysfs|^none|^\/dev\/ram|^\/dev\/root$)/ {next}
 	{print $2}' /proc/mounts \
@@ -216,7 +217,7 @@
 
 # Try all file systems other than root, essential filesystems and RAM disks,
 # one last time.
-awk '$2 !~ /\/(|dev|proc|selinux)$/ && $1 !~ /^\/dev\/ram/ { print $2 }' \
+awk '$2 !~ /\/(|dev|proc|selinux)$/ && $2 !~ /^\/live\// && $1 !~ /^\/dev\/ram/ { print $2 }' \
     /proc/mounts | sort -r | \
   while read line; do
     fstab-decode umount -f $line
--- etc/init.d/functions.live	2006-08-21 20:27:22.000000000 +0000
+++ etc/init.d/functions	2006-08-21 20:26:59.000000000 +0000
@@ -169,8 +169,8 @@
 	local remaining devremaining sig=
 	local retry=3
 
-	remaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts)
-	devremaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts)
+	remaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" && $2 !~ /^\/live\// {print $2}' /proc/mounts)
+	devremaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" && $2 !~ /^\/live\// {print $1}' /proc/mounts)
 	while [ -n "$remaining" -a "$retry" -gt 0 ]; do
 		if [ "$retry" -eq 3 ]; then
 			action "Unmounting loopback filesystems: " \
@@ -184,8 +184,8 @@
 				action "Detaching loopback device %s: " $dev \
 				losetup -d $dev
 		done
-		remaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts)
-		devremaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts)
+		remaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" && $2 !~ /^\/live\// {print $2}' /proc/mounts)
+		devremaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" && $2 !~ /^\/live\// {print $1}' /proc/mounts)
 		[ -z "$remaining" ] && break
 		fstab-decode /sbin/fuser -k -m $sig $remaining >/dev/null
 		sleep 5