void-packages/templates/initscripts/files/rc.sysinit
Juan RP ed07259681 Added initscripts-2009.01 template.
This package contains all files required for booting the lsXL
linux system built through xbps.

Currently it uses the NetBSD rc.d(8) system, sysvinit and
modified BSD style scripts modified from Arch linux.

--HG--
extra : convert_revision : 4584be26dd672ba33f9b1d76534a22d4715664ea
2009-03-06 05:17:46 +01:00

52 lines
1.2 KiB
Bash
Executable file

#!/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