
Linux From Scratch - Version 7.0
249
if [ "$runlevel" == "6" ] && [ -n "${FASTBOOT}" ]; then
touch /fastboot
fi
# Start all functions in this runlevel
for i in $( ls -v /etc/rc.d/rc${runlevel}.d/S* 2> /dev/null)
do
if [ "${previous}" != "N" ]; then
suffix=${i#/etc/rc.d/rc$runlevel.d/S[0-9][0-9]}
stop=/etc/rc.d/rc$runlevel.d/K[0-9][0-9]$suffix
prev_start=/etc/rc.d/rc$previous.d/S[0-9][0-9]$suffix
[ -f ${prev_start} ] && [ ! -f ${stop} ] && continue
fi
check_script_status
case ${runlevel} in
0|6)
run ${i} stop
;;
*)
run ${i} start
;;
esac
error_value=${?}
if [ "${error_value}" != "0" ]; then print_error_msg; fi
done
# Copy the boot log on initial boot only
if [ "${previous}" == "N" ]; then
cat /run/var/bootlog >> /var/log/boot.log
echo "--------" >> /var/log/boot.log # Mark the end of boot
fi
# End rc
D.2. /lib/lsb/init-functions
#!/bin/sh
########################################################################
#
# Begin /lib/lsb/init-funtions
#
# Description : Run Level Control Functions
#
#
# Version : LFS 7.0
#
Kommentare zu diesen Handbüchern