diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs')
-rwxr-xr-x | import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs new file mode 100755 index 0000000000..61324c630b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs @@ -0,0 +1,24 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: umountfs +# Required-Start: +# Required-Stop: +# Default-Start: +# Default-Stop: 0 6 +# Short-Description: Turn off swap and unmount all local file systems. +# Description: +### END INIT INFO + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +echo "Deactivating swap..." +swapoff -a + +# We leave /proc mounted. +echo "Unmounting local filesystems..." +grep -q /mnt/ram /proc/mounts && mount -o remount,ro /mnt/ram +mount -o remount,ro / + +umount -f -a -r > /dev/null 2>&1 + +: exit 0 |