summary refs log tree commit diff
diff options
context:
space:
mode:
-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