/[baselayout]/branches/rc-scripts-1_6/init.d/halt.sh
Gentoo

Diff of /branches/rc-scripts-1_6/init.d/halt.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2015 Revision 2016
95 awk '{ \ 95 awk '{ \
96 if (($3 !~ /^(proc|devpts|sysfs|devfs|tmpfs|usb(dev)?fs)$/) && \ 96 if (($3 !~ /^(proc|devpts|sysfs|devfs|tmpfs|usb(dev)?fs)$/) && \
97 ($1 != "none") && \ 97 ($1 != "none") && \
98 ($1 !~ /^(rootfs|\/dev\/root)$/) && \ 98 ($1 !~ /^(rootfs|\/dev\/root)$/) && \
99 ($2 != "/")) \ 99 ($2 != "/")) \
100 print $2 }' /proc/mounts | sort -k2 -ur) 100 print $2 }' /proc/mounts | sort -ur)
101for x in ${unmounts}; do 101for x in ${unmounts}; do
102 # Do not umount these if we are booting off a livecd 102 # Do not umount these if we are booting off a livecd
103 if [[ -n ${CDBOOT} ]] && \ 103 if [[ -n ${CDBOOT} ]] && \
104 [[ ${x} == "/mnt/cdrom" || ${x} == "/mnt/livecd" ]] ; then 104 [[ ${x} == "/mnt/cdrom" || ${x} == "/mnt/livecd" ]] ; then
105 continue 105 continue
150 150
151 # Get better results with a sync and sleep 151 # Get better results with a sync and sleep
152 sync; sync 152 sync; sync
153 sleep 1 153 sleep 1
154 154
155 for x in $(awk '$1 != "none" { print $2 }' /proc/mounts | sort -k2 -ur) ; do 155 for x in $(awk '$1 != "none" { print $2 }' /proc/mounts | sort -ur) ; do
156 x=${x//\\040/ } 156 x=${x//\\040/ }
157 if [[ ${cmd} == "u" ]]; then 157 if [[ ${cmd} == "u" ]]; then
158 umount -n -r "${x}" 158 umount -n -r "${x}"
159 else 159 else
160 mount -n -o remount,ro "${x}" &>/dev/null 160 mount -n -o remount,ro "${x}" &>/dev/null

Legend:
Removed from v.2015  
changed lines
  Added in v.2016

  ViewVC Help
Powered by ViewVC 1.1.20