#! /bin/sh
#
# umountfs	Turn off  swap and unmount all file systems.
#
# Version:      @(#)umountfs  2.73  26-Nov-1997  miquels@cistron.nl
#

RCDLINKS="0,S40 6,S40"

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

# Write a reboot record to /var/log/wtmp before unmounting
halt -w

if [ -x /sbin/swapoff ]; then
	echo -n "Deactivating swap... "
	swapoff -a
	echo "done."
fi

echo -n "Unmounting file systems... "
umount -a -r
echo "done."

mount -n -o remount,ro /

