From a92a906952b0ca434dedd34dd95fc551aec83aed Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Fri, 24 Jan 2020 09:30:32 +0300 Subject: set localtime from boot --- rc.boot | 8 ++++++++ rc.conf | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/rc.boot b/rc.boot index 2910e30..f7c80dc 100755 --- a/rc.boot +++ b/rc.boot @@ -135,6 +135,14 @@ out "Getting keymap settings..."; { [ -n "$keymap" ] && loadkmap < "$keymap" } +[ "$timezone" ] && out "Setting system time ("$timezone")" && { + if [ -f "/usr/share/zoneinfo/$timezone" ]; then + ln -sf "/usr/share/zoneinfo/$timezone" /etc/localtime + else + error "/usr/share/zoneinfo/$timezone could not be found" + fi +} + out "Loading sysctl settings..."; { find /run/sysctl.d \ diff --git a/rc.conf b/rc.conf index 7a8ce97..13710e9 100644 --- a/rc.conf +++ b/rc.conf @@ -8,3 +8,7 @@ keymap= # Set dmesg level dmesg_level= +# Set timezone +# You either need tzdata package installed, or need to put your timezone +# inside /usr/share/zoneinfo/ and set the variable to the relative path. +timezone= -- cgit v1.2.3