console output
script
- set -e
- . /etc/init/functions
-
- if [ -f /fastboot ]; then
- echo "${INFO}/fastboot found!${NORMAL}"
- log_success_msg "Will not perform file system checks as requested."
- exit 0
- fi
+ # If requested, do not check the filesystems
+ [ -f /fastboot ] && exit 0
mount -n -o remount,ro / >/dev/null
if [ ${?} != 0 ]; then
## XXX need to shutdown the system cleanly here
fi
- if [ -f /forcefsck ]
- then
- echo "${INFO}/forcefsck found!"
- log_success_msg "${INFO}Forcing file system checks as requested."
+ # Force check if /forcefsck is found
+ if [ -f /forcefsck ]; then
options="-f"
else
options=""
start on stopped mount-kernel-filesystems
-console output
-
script
- set -e
- . /etc/init/functions
-
# Exit if there's no modules file or there are no
# valid entries
[ -r /etc/sysconfig/modules ] &&
# Read in the configuration file.
exec 9>&0 < /etc/sysconfig/modules
- message="${INFO}Loading modules:"
-
while read module args; do
# Ignore comments and blank lines.
case "${module}" in
# Attempt to load the module, making
# sure to pass any arguments provided.
modprobe ${module} ${args} > /dev/null
-
- # Print the module name if successful,
- # otherwise take note.
- if [ ${?} -eq 0 ]; then
- message="${message}${NORMAL} ${module}"
- else
- failedmod="${failedmod} ${module}"
- fi
done
- # Print a message about successfully loaded
- # modules on the correct line.
- log_success_msg "${message}"
-
- # Print a failure message with a list of any
- # modules that may have failed to load.
- if [ "${failedmod}" ]; then
- log_failure_msg "${FAILURE}Failed to load modules:${failedmod}"
- fi
-
exec 0>&9 9>&-
fi
start on started udev
-console output
-
script
- set -e
- . /etc/init/functions
-
[ -e "/etc/sysconfig/network" ] && \
. /etc/sysconfig/network
ip addr add 127.0.0.1/8 label lo dev lo
ip link set lo up
- if [ "${?}" = "0" ]; then
- log_success_msg "Bringing up the loopback interface..."
- else
- log_failure_msg "Bringing up the loopback interface..."
- fi
if [ -n "${HOSTNAME}" ]; then
hostname "${HOSTNAME}"
- if [ "${?}" = "0" ]; then
- log_success_msg "Setting hostname to ${HOSTNAME}..."
- else
- log_failure_msg "Setting hostname to ${HOSTNAME}..."
- fi
- else
- log_warning_msg "No hostname was set!"
fi
end script
start on stopped welcome
-console output
-
script
- set -e
- . /etc/init/functions
-
- message="Mounting kernel-based file systems:"
-
if ! mountpoint /proc > /dev/null; then
- message="${message}${INFO} /proc${NORMAL}"
mount -n /proc || failed=1
fi
if ! mountpoint /sys > /dev/null; then
- message="${message}${INFO} /sys${NORMAL}"
mount -n /sys || failed=1
fi
- (exit ${failed})
- evaluate_retval standard
+ exit ${failed}
end script
start on stopped checkfs
-console output
-
-script
- set -e
- . /etc/init/functions
-
- MESSAGE="Activating all swap files/partitions..."
- swapon -a
- evaluate_retval standard
-end script
+exec /sbin/swapon -a