commit 5f82b82672fe7e8cda931dd15d97a8cf9694c985 parent 83be11537d54f00ac78726b2e014c2353d99816d Author: sin <sin@2f30.org> Date: Fri, 20 Sep 2013 16:33:51 +0100 Set hwclock Diffstat:
M | etc/rc | | | 22 | ++++++++++++++++++++++ |
M | etc/rc.conf | | | 2 | ++ |
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/etc/rc b/etc/rc @@ -21,6 +21,28 @@ echo /bin/smdev > /proc/sys/kernel/hotplug hostname $HOSTNAME +HWCLOCK_PARAMS="-s" +case $HARDWARECLOCK in + "") + ;; + UTC) + HWCLOCK_PARAMS="${HWCLOCK_PARAMS} -u" + ;; + localtime) + HWCLOCK_PARAMS="${HWCLOCK_PARAMS} -l" + ;; + *) + HWCLOCK_PARAMS="" + ;; +esac + +if [ -n "$HWCLOCK_PARAMS" ]; then + echo Setting hwclock + [ -n "$TIMEZONE" ] && export TZ="$TIMEZONE" + hwclock $HWCLOCK_PARAMS + unset TZ +fi + if [ -x /etc/dropbearkeys ]; then /etc/dropbearkeys fi diff --git a/etc/rc.conf b/etc/rc.conf @@ -1,3 +1,5 @@ HOSTNAME=morpheus INTERFACE=eth0 +HARDWARECLOCK="UTC" +TIMEZONE="Europe/London" SVC="network dropbear"