blob: 61324c630b71d64fcba6750de9d263e33e403cfe [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/bin/sh
2### BEGIN INIT INFO
3# Provides: umountfs
4# Required-Start:
5# Required-Stop:
6# Default-Start:
7# Default-Stop: 0 6
8# Short-Description: Turn off swap and unmount all local file systems.
9# Description:
10### END INIT INFO
11
12PATH=/sbin:/bin:/usr/sbin:/usr/bin
13
14echo "Deactivating swap..."
15swapoff -a
16
17# We leave /proc mounted.
18echo "Unmounting local filesystems..."
19grep -q /mnt/ram /proc/mounts && mount -o remount,ro /mnt/ram
20mount -o remount,ro /
21
22umount -f -a -r > /dev/null 2>&1
23
24: exit 0