Added rc symlinks and untarred source for tracking

This commit is contained in:
2016-10-30 14:57:49 -05:00
parent 49da0e445d
commit 79f8028181
29 changed files with 3023 additions and 29 deletions

View File

@@ -0,0 +1,63 @@
#!/bin/sh
########################################################################
# Begin cleanfs
#
# Description : Clean file system
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
# DJ Lucas - dj@linuxfromscratch.org
# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: cleanfs
# Required-Start: $local_fs
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Cleans temporary directories early in the boot process.
# Description: Cleans /var/lock, /var/run, and /tmp. Also creates
# /var/run/utmp
# X-LFS-Provided-By: LFS
### END INIT INFO
. /lib/lsb/init-functions
case "${1}" in
start)
log_info_msg "Cleaning file systems:"
if [ "${SKIPTMPCLEAN}" = "" ]; then
log_info_msg2 " /tmp"
cd /tmp &&
find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1
cd /var/lock &&
find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1
cd /var/run &&
find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1
fi
> /var/run/utmp
if grep -q '^utmp:' /etc/group ; then
chmod 664 /var/run/utmp
chgrp utmp /var/run/utmp
fi
(exit ${failed})
evaluate_retval
exit $failed
;;
*)
echo "Usage: ${0} {start}"
exit 1
;;
esac
# End cleanfs