ed07259681
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
29 lines
626 B
Bash
Executable file
29 lines
626 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# PROVIDE: sysclock
|
|
# REQUIRE: SERVERS swap
|
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
|
|
|
name="sysclock"
|
|
start_cmd="sysclock_start"
|
|
stop_cmd=":"
|
|
|
|
sysclock_start()
|
|
{
|
|
echo -n "=> Configuring system clock... "
|
|
[ ! -d /var/lib/hwclock ] && mkdir -p /var/lib/hwclock
|
|
if [ ! -f /var/lib/hwclock/adjtime ]; then
|
|
echo "0.0 0 0.0" > /var/lib/hwclock/adjtime
|
|
fi
|
|
if [ "$TIMEZONE" != "" -a -e "/usr/share/zoneinfo/$TIMEZONE" ]; then
|
|
rm -f /etc/localtime
|
|
cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
|
|
fi
|
|
|
|
hwclock $HWCLOCK_PARAMS 2>&1 >/dev/null
|
|
show_rval
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|