#! /bin/sh
#
# umountfs	Turn off swap and unmount all local file systems.
#
# Version:      @(#)umountfs  2.85-16  03-Jun-2004  miquels@cistron.nl
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin

. /lib/lsb/init-functions

log_begin_msg "Deactivating swap..."
umount -ttmpfs -a -r
swapoff -a
log_end_msg $?

#
#	Umount all filesystems except the virtual ones.
#
log_begin_msg "Unmounting local filesystems..."
umount -tnoproc,noprocfs,nodevfs,nosysfs,nousbfs,nousbdevfs,nodevpts -d -a -r
log_end_msg $? 

# This is superfluous.
mount -n -o remount,ro /

: exit 0
