about summary refs log tree commit diff
path: root/core-services
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2014-12-31 11:32:14 +0100
committerJuan RP <xtraeme@gmail.com>2014-12-31 11:32:14 +0100
commit6394a10a18da669b9054244293d19902de037892 (patch)
treed0c083bccc2ea607d983e1e3d9cb0b75c0e7c227 /core-services
parentb89bbb2bdbe56b5c04d1d83a94c328040da94c06 (diff)
downloadrunit-void-6394a10a18da669b9054244293d19902de037892.tar.gz
runit-void-6394a10a18da669b9054244293d19902de037892.tar.xz
runit-void-6394a10a18da669b9054244293d19902de037892.zip
core-services/02-console-setup.sh: setup HARDWARECLOCK if set.
This was lost somehow after adding "core-services".
Diffstat (limited to 'core-services')
-rw-r--r--core-services/02-console-setup.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/core-services/02-console-setup.sh b/core-services/02-console-setup.sh
index 4077f48..5769f61 100644
--- a/core-services/02-console-setup.sh
+++ b/core-services/02-console-setup.sh
@@ -13,3 +13,9 @@ if [ -n "$KEYMAP" ]; then
     msg "Setting up keymap to '${KEYMAP}'...\n"
     loadkeys -q -u ${KEYMAP}
 fi
+
+if [ -n "$HARDWARECLOCK" ]; then
+    msg "Setting up RTC to '${HARDWARECLOCK}'...\n"
+    TZ=$TIMEZONE hwclock --systz \
+        ${HARDWARECLOCK:+--$(echo $HARDWARECLOCK |tr A-Z a-z) --noadjfile} || emergency_shell
+fi