#!/bin/sh # # /etc/rc.sysinit # export HOME=/ export PATH=/sbin:/bin:/usr/sbin:/usr/bin . /etc/rc.subr . /etc/rc.conf echo echo "Welcome to the lsXL Linux system." echo # Create our default nodes that minilogd may need [ ! -e /dev/null ] && mknod /dev/null c 1 3 [ ! -e /dev/zero ] && mknod /dev/zero c 1 5 [ ! -e /dev/console ] && mknod /dev/console c 5 1 # start up our mini logger until syslog takes over minilogd # anything more serious than KERN_WARNING goes to the console # 'verbose' cmdline parameter enables more messages if grep -q " verbose" /proc/cmdline; then dmesg -n 8 else dmesg -n 3 fi # enable rtc access modprobe rtc-cmos >/dev/null 2>&1 RTC_MAJOR=$(grep -w rtc /proc/devices 2>/dev/null); RTC_MAJOR="${RTC_MAJOR%% *}" if [ -n "$RTC_MAJOR" ]; then mkdir /dev/misc/ mknod /dev/misc/rtc0 c $RTC_MAJOR 0 ln -s /dev/misc/rtc0 /dev/rtc fi HWCLOCK_PARAMS="--hctosys" if [ "$HARDWARECLOCK" = "UTC" ]; then HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc" else HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime" fi # Set clock early to fix some bugs with filesystem checks # Clock is set again later to match rc.conf if [ -f /etc/localtime ]; then hwclock $HWCLOCK_PARAMS --noadjfile fi