#! /bin/sh
#
# clean up local filesystems
#

source ${INIT_D:-/sbin/init.d}/functions

case "$1" in
  start)
     need $mounted_filesystems || exit_if_failed
          
     echo 'Clearing /var/lock/ and /var/run/ ...'
     rm -f /var/lock/* && rm -f /var/run/*
     evaluate_retval

     #create new utmp file
     echo 'Creating new /var/run/utmp...'
     touch /var/run/utmp && chmod 644 /var/run/utmp
     evaluate_retval
 
     echo 'Removing nologin, fastboot, forcefsck...'
     rm -f /etc/nologin /nologin /fastboot /forcefsck
     evaluate_retval
     ;;
  stop)
     ;;
  *)
     exit 1
     ;;
esac
    
exit 0
