aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2012-08-06 15:20:03 -0400
committerBill Nottingham <notting@redhat.com>2012-08-06 15:20:03 -0400
commit345e4fc14c6e6a043bc3fe4eeb8c39a36957fbf8 (patch)
tree0e14194887c2c248a7b5ec22aa38f5c1406a9251 /rc.d/init.d
parent23bfcbd74b4a02d302927961dc183066937e17e4 (diff)
downloadinitscripts-345e4fc14c6e6a043bc3fe4eeb8c39a36957fbf8.tar
initscripts-345e4fc14c6e6a043bc3fe4eeb8c39a36957fbf8.tar.gz
initscripts-345e4fc14c6e6a043bc3fe4eeb8c39a36957fbf8.tar.bz2
initscripts-345e4fc14c6e6a043bc3fe4eeb8c39a36957fbf8.tar.xz
initscripts-345e4fc14c6e6a043bc3fe4eeb8c39a36957fbf8.zip
Drop fstab-decode and getkey; no longer used.
Drop the umount loop from rc.d/init.d/functions.
Diffstat (limited to 'rc.d/init.d')
-rw-r--r--rc.d/init.d/functions65
1 files changed, 0 insertions, 65 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index e9892b42..24447249 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -93,11 +93,6 @@ if [ -z "${BOOTUP:-}" ]; then
fi
fi
-# Interpret escape sequences in an fstab entry
-fstab_decode_str() {
- fstab-decode echo "$1"
-}
-
# Check if any of $pid (could be plural) are running
checkpid() {
local i
@@ -124,66 +119,6 @@ __fgrep() {
return 1
}
-# __umount_loop awk_program fstab_file first_msg retry_msg retry_umount_args
-# awk_program should process fstab_file and return a list of fstab-encoded
-# paths; it doesn't have to handle comments in fstab_file.
-__umount_loop() {
- local remaining sig=-15
- local retry=3 count
-
- remaining=$(LC_ALL=C awk "/^#/ {next} $1" "$2" | sort -r)
- while [ -n "$remaining" -a "$retry" -gt 0 ]; do
- if [ "$retry" -eq 3 ]; then
- action "$3" fstab-decode umount $remaining
- else
- action "$4" fstab-decode umount $5 $remaining
- fi
- count=4
- remaining=$(LC_ALL=C awk "/^#/ {next} $1" "$2" | sort -r)
- while [ "$count" -gt 0 ]; do
- [ -z "$remaining" ] && break
- count=$(($count-1))
- usleep 500000
- remaining=$(LC_ALL=C awk "/^#/ {next} $1" "$2" | sort -r)
- done
- [ -z "$remaining" ] && break
- fstab-decode /sbin/fuser -k -m $sig $remaining >/dev/null
- sleep 3
- retry=$(($retry -1))
- sig=-9
- done
-}
-
-# Similar to __umount loop above, specialized for loopback devices
-__umount_loopback_loop() {
- local remaining devremaining sig=-15
- local retry=3
-
- remaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts)
- devremaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts)
- while [ -n "$remaining" -a "$retry" -gt 0 ]; do
- if [ "$retry" -eq 3 ]; then
- action $"Unmounting loopback filesystems: " \
- fstab-decode umount $remaining
- else
- action $"Unmounting loopback filesystems (retry):" \
- fstab-decode umount $remaining
- fi
- for dev in $devremaining ; do
- losetup $dev > /dev/null 2>&1 && \
- action $"Detaching loopback device $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)
- [ -z "$remaining" ] && break
- fstab-decode /sbin/fuser -k -m $sig $remaining >/dev/null
- sleep 3
- retry=$(($retry -1))
- sig=-9
- done
-}
-
# __proc_pids {program} [pidfile]
# Set $pid to pids from /var/run* for {program}. $pid should be declared
# local in the caller.