diff options
author | Richard Purdie <richard@openedhand.com> | 2006-03-23 23:32:58 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-03-23 23:32:58 +0000 |
commit | 7f60e4b4e7d9b45bfe4b76802a2e82bb4edbba9f (patch) | |
tree | b1ca54365729e3a4ac05c93616beb1207e497873 /openembedded/packages/initscripts/initscripts-1.0/openslug/umountfs | |
parent | 5d530ad71d08c3ebf127c6844969359c3a06a6ed (diff) | |
download | openembedded-core-7f60e4b4e7d9b45bfe4b76802a2e82bb4edbba9f.tar.gz openembedded-core-7f60e4b4e7d9b45bfe4b76802a2e82bb4edbba9f.tar.bz2 openembedded-core-7f60e4b4e7d9b45bfe4b76802a2e82bb4edbba9f.zip |
Sync initscripts with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@331 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/initscripts/initscripts-1.0/openslug/umountfs')
-rw-r--r-- | openembedded/packages/initscripts/initscripts-1.0/openslug/umountfs | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/openembedded/packages/initscripts/initscripts-1.0/openslug/umountfs b/openembedded/packages/initscripts/initscripts-1.0/openslug/umountfs deleted file mode 100644 index d6f432dbda..0000000000 --- a/openembedded/packages/initscripts/initscripts-1.0/openslug/umountfs +++ /dev/null @@ -1,43 +0,0 @@ -#! /bin/sh -# -# umountfs Turn off swap and unmount all local filesystems. -# - -PATH=/sbin:/bin:/usr/sbin:/usr/bin - -# Ensure /proc is mounted -test -r /proc/mounts || mount -t proc proc /proc - -echo "Deactivating swap..." -swapoff -a - -# We leave /proc mounted, the umount of /dev/devpts seems to fail -# quite frequently, the busybox umount apparently gives up at the -# first failure, so it is necessary to go file system by file -# system. It is necessary to go backward in the /proc list, because -# later things may have been mounted on earlier mounts. -devfs= -unmount() { - local dev mp type opts - if read dev mp type opts - then - # recurse - unmount later items - unmount - # skip /proc and /dev but not the sub-directories - case "$mp" in - /|/proc)return 0;; - /dev) devfs=1 - return 0;; - esac - # then unmount this, if possible, otherwise make - # it read-only - umount -f -r "$mp" - fi -} - -echo "Unmounting local filesystems..." -unmount </proc/mounts - -# now /dev and read-only / (halt/reboot may need /proc!) -test -n "$devfs" && umount -f -r /dev -mount -o remount,ro / |