/[baselayout]/branches/bsd-porting/init.d/halt.sh
Gentoo

Diff of /branches/bsd-porting/init.d/halt.sh

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

Revision 2015 Revision 2016
137 awk '{ \ 137 awk '{ \
138 if (($3 !~ /^(proc|devpts|sysfs|devfs|tmpfs|usb(dev)?fs)$/) && \ 138 if (($3 !~ /^(proc|devpts|sysfs|devfs|tmpfs|usb(dev)?fs)$/) && \
139 ($1 != "none") && \ 139 ($1 != "none") && \
140 ($1 !~ /^(rootfs|\/dev\/root)$/) && \ 140 ($1 !~ /^(rootfs|\/dev\/root)$/) && \
141 ($2 != "/")) \ 141 ($2 != "/")) \
142 print $2 }' /proc/mounts | sort -k2 -ur) 142 print $2 }' /proc/mounts | sort -ur)
143for x in ${unmounts}; do 143for x in ${unmounts}; do
144 # Do not umount these if we are booting off a livecd 144 # Do not umount these if we are booting off a livecd
145 if [[ -n ${CDBOOT} ]] && \ 145 if [[ -n ${CDBOOT} ]] && \
146 [[ ${x} == "/mnt/cdrom" || ${x} == "/mnt/livecd" ]] ; then 146 [[ ${x} == "/mnt/cdrom" || ${x} == "/mnt/livecd" ]] ; then
147 continue 147 continue
192 192
193 # Get better results with a sync and sleep 193 # Get better results with a sync and sleep
194 sync; sync 194 sync; sync
195 sleep 1 195 sleep 1
196 196
197 for x in $(awk '$1 != "none" { print $2 }' /proc/mounts | sort -k2 -ur) ; do 197 for x in $(awk '$1 != "none" { print $2 }' /proc/mounts | sort -ur) ; do
198 x=${x//\\040/ } 198 x=${x//\\040/ }
199 if [[ ${cmd} == "u" ]]; then 199 if [[ ${cmd} == "u" ]]; then
200 umount -n -r "${x}" 200 umount -n -r "${x}"
201 else 201 else
202 mount -n -o remount,ro "${x}" &>/dev/null 202 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