Installation guide
 Configuration Changes From Previous Release
233
 if [ -x /sbin/halt.local ]; then
initscripts-8.45.19.EL-1.i386.rpm: /etc/rc.d/init.d/halt
--- 
+++ 
@@ -10,6 +10,9 @@
 NOLOCALE=1
 . /etc/init.d/functions
+
+UMOUNT="umount"
+[ ! -w /etc ] && UMOUNT="umount -n"
 action() {
 echo -n "$1 "
@@ -131,7 +134,7 @@
 # Try to unmount tmpfs filesystems to avoid swapping them in. Ignore
 failures.
 tmpfs=$(awk '$2 ~ /^\/($|proc|dev)/ { next; }
 $3 == "tmpfs" { print $2; }' /proc/mounts | sort -r)
-[ -n "$tmpfs" ] && fstab-decode umount $tmpfs 2>/dev/null
+[ -n "$tmpfs" ] && fstab-decode $UMOUNT $tmpfs 2>/dev/null
 # Turn off swap, then unmount file systems.
 [ -f /proc/swaps ] && SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps`
@@ -143,8 +146,6 @@
 backdev=$(/sbin/cryptsetup status "$dst" \
 | awk '$1 == "device:" { print $2 }')
 /sbin/cryptsetup remove "$dst"
- # Leave partition with a blank plain-text swap
- mkswap "$backdev" > /dev/null
 fi
 done
 fi
@@ -170,7 +171,7 @@
 $"Unmounting file systems (retry): " \
 -f
-[ -f /proc/bus/usb/devices ] && umount /proc/bus/usb
+[ -f /proc/bus/usb/devices ] && $UMOUNT /proc/bus/usb
 [ -f /etc/crypttab ] && \
 LANG=C action $"Stopping disk encryption: " halt_crypto
@@ -183,7 +184,7 @@
 awk '$2 !~ /\/(|dev|proc|selinux)$/ && $1 !~ /^\/dev\/ram/ { print $2 }' \
 /proc/mounts | sort -r | \
 while read line; do
- fstab-decode umount -f $line
+ fstab-decode $UMOUNT -f $line
 done
 if [ -x /sbin/halt.local ]; then










