5.0-pre2 release
[linux_from_scratch.git] / bootscripts / contrib / new-boot-0.2 / sbin / init.d / runlevel.1 / cleanfs
bloba69e4a2a4f100cefaaa046f666d80f06432b5b60
1 #! /bin/sh
3 # clean up local filesystems
6 #locate and source functions script
7 source `PATH=$INIT_D/:/sbin/init.d:/etc/init.d:/etc/rc.d type -p functions`
9 case "$1" in
10 start)
11 need $mounted_filesystems || exit_if_any_error
13 echo 'Clearing /var/lock/ and /var/run/ ...'
14 rm -f /var/lock/* && rm -f /var/run/*
15 up_evaluate_retval
17 #create new utmp file
18 echo 'Creating new /var/run/utmp...'
19 touch /var/run/utmp && chmod 644 /var/run/utmp
20 up_evaluate_retval
22 echo 'Removing nologin, fastboot, forcefsck...'
23 rm -f /etc/nologin /nologin /fastboot /forcefsck
24 up_evaluate_retval
26 stop)
29 exit 1
31 esac
33 exit 0