#!/bin/sh # /etc/init.d/local_fs - check and mount local filesystems PATH=/sbin:/bin case $1 in start) echo "Checking local filesystem integrity..." fsck -ATCp case $? in 0|1) echo "Remounting / as read-write." mount -n -o remount,rw / echo -n > /etc/mtab mount -f -o remount,rw / echo "Mounting local filesystems." mount -a -t nonfs,smbfs swapon -a ;; 2) echo "Reboot required." reboot -f ;; *) echo "Filesystem errors still exist! Manual intervention required." /sbin/sulogin ;; esac ;; stop) echo "Unmounting local filesystems." swapoff -a umount -a -r ;; *) echo "usage: $0 start|stop"; ;; esac