summaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit43
1 files changed, 20 insertions, 23 deletions
diff --git a/rc.sysinit b/rc.sysinit
index e949180..9d7c250 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -21,11 +21,11 @@ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
/bin/mountpoint -q /sys || /bin/mount -n -t sysfs sysfs /sys -o nosuid,noexec,nodev
if ! /bin/mountpoint -q /dev; then
- if grep -q devtmpfs /proc/filesystems 2>/dev/null; then
- /bin/mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid
- else
- /bin/mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid
- fi
+ if grep -q devtmpfs /proc/filesystems 2>/dev/null; then
+ /bin/mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid
+ else
+ /bin/mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid
+ fi
fi
# start up our mini logger until syslog takes over
@@ -41,9 +41,9 @@ fi
HWCLOCK_PARAMS="--hctosys"
case $HARDWARECLOCK in
- UTC) HWCLOCK_PARAMS+=" --utc";;
- localtime) HWCLOCK_PARAMS+=" --localtime";;
- *) HWCLOCK_PARAMS="";;
+ UTC) HWCLOCK_PARAMS+=" --utc";;
+ localtime) HWCLOCK_PARAMS+=" --localtime";;
+ *) HWCLOCK_PARAMS="";;
esac
if [[ $HWCLOCK_PARAMS ]]; then
@@ -52,11 +52,11 @@ if [[ $HWCLOCK_PARAMS ]]; then
# If devtmpfs is used, the required RTC device already exists now
# Otherwise, create whatever device is available
if ! [[ -c /dev/rtc || -c /dev/rtc0 ]]; then
- for dev in /sys/class/rtc/rtc0/dev /sys/class/misc/rtc/dev; do
- [[ -e $dev ]] || continue
- IFS=: read -r major minor < "$dev"
- /bin/mknod /dev/rtc c $major $minor
- done
+ for dev in /sys/class/rtc/rtc0/dev /sys/class/misc/rtc/dev; do
+ [[ -e $dev ]] || continue
+ IFS=: read -r major minor < "$dev"
+ /bin/mknod /dev/rtc c $major $minor
+ done
fi
# Do a clock set here for a few reasons:
@@ -82,11 +82,11 @@ run_hook sysinit_udevlaunched
# Trigger udev uevents
if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
- stat_busy "Triggering UDev uevents"
- /sbin/udevadm control --property=STARTUP=1
- /sbin/udevadm trigger --action=add --type=devices
- /sbin/udevadm trigger --action=add --type=subsystems
- stat_done
+ stat_busy "Triggering UDev uevents"
+ /sbin/udevadm control --property=STARTUP=1
+ /sbin/udevadm trigger --action=add --type=devices
+ /sbin/udevadm trigger --action=add --type=subsystems
+ stat_done
fi
# Load modules from the MODULES array defined in rc.conf
@@ -318,11 +318,8 @@ if [[ -f $RANDOM_SEED ]]; then
fi
stat_busy "Removing Leftover Files"
-/bin/rm -f /etc/nologin &>/dev/null
-/bin/rm -f /etc/shutdownpid &>/dev/null
-/bin/rm -f /var/lock/* &>/dev/null
+/bin/rm -f /etc/{nologin,shutdownpid} /var/lock/* /forcefsck &>/dev/null
/bin/rm -rf /tmp/* /tmp/.* &>/dev/null
-/bin/rm -f /forcefsck &>/dev/null
[[ -d /var/run ]] && /usr/bin/find /var/run/ \! -type d -delete
: >| /var/run/utmp
/bin/chmod 0664 /var/run/utmp
@@ -364,7 +361,7 @@ if [[ ${LOCALE,,} =~ utf ]]; then
done
echo 1 > /sys/module/vt/parameters/default_utf8
stat_done
- [[ $KEYMAP ]] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q -u "$KEYMAP"
+ [[ $KEYMAP ]] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q -u $KEYMAP
else
stat_busy "Setting Consoles to legacy mode"
# make non-UTF-8 consoles work on 2.6.24 and newer kernels