summaryrefslogtreecommitdiff
path: root/rc.single
diff options
context:
space:
mode:
Diffstat (limited to 'rc.single')
-rwxr-xr-xrc.single56
1 files changed, 19 insertions, 37 deletions
diff --git a/rc.single b/rc.single
index bb27ddf..3527a99 100755
--- a/rc.single
+++ b/rc.single
@@ -6,42 +6,32 @@
. /etc/rc.conf
. /etc/rc.d/functions
-export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-
run_hook single_start
if [[ $PREVLEVEL != N ]]; then
- kill_everything single
- status "Starting UDev Daemon" udevd --daemon
- run_hook single_udevlaunched
-
- # Trigger udev uevents
- if pidof -o %PPID /udevd >/dev/null; then
- stat_busy "Triggering UDev uevents"
- udevadm trigger --action=add --type=subsystems
- udevadm trigger --action=add --type=devices
- stat_done
- fi
-
- # Wait for udev uevents
- if pidof -o %PPID udevd >/dev/null; then
- status "Waiting for UDev uevents to be processed" \
- udevadm settle --quiet --timeout=${UDEV_TIMEOUT:-30}
- fi
-
- run_hook single_udevsettled
-
- # try syslog-NG first, then fall back to good ol' syslogd
- if [[ -x /etc/rc.d/syslog-ng ]]; then
- /etc/rc.d/syslog-ng start
- elif [[ -x /etc/rc.d/syslogd ]]; then
- /etc/rc.d/syslogd start
- [[ -x /etc/rc.d/klogd ]] && /etc/rc.d/klogd start
- fi
+
+ stop_all_daemons
+
+ run_hook single_prekillall
+
+ kill_all
+
+ run_hook single_postkillall
+
+ # start up our mini logger until syslog takes over
+ minilogd
+
+ # Start/trigger UDev, load MODULES and settle UDev
+ udevd_modprobe single
+
+ # Removing leftover files
+ remove_leftover
fi
run_hook single_end
+bootlogd_stop
+
if [[ $RUNLEVEL = 1 ]]; then
printsep
printhl "Entering single-user mode..."
@@ -50,13 +40,5 @@ if [[ $RUNLEVEL = 1 ]]; then
exec init -t1 S
fi
-if [[ -f /run/bootlogd.pid ]]; then
- touch /var/log/boot
- kill $(< /run/bootlogd.pid)
- rm -f /run/bootlogd.pid
- sed -i -r -e 's/\^\[\[[0-9]?;?[0-9]?[0-9]?;?[0-9]?[0-9]?[ms]//g' \
- -e 's/\^\[(\[151|%)G//g' /var/log/boot
-fi
-
# End of file
# vim: set ts=2 sw=2 noet: