Created
February 17, 2021 10:29
-
-
Save neheb/7356492f2733272d6b837ddcd5bcc097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/package/base-files/files/etc/init.d/system | |
+++ b/package/base-files/files/etc/init.d/system | |
@@ -22,9 +22,11 @@ system_config() { | |
echo "$hostname" > /proc/sys/kernel/hostname | |
[ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize} | |
- echo "$timezone" > /tmp/TZ | |
- [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && \ | |
- ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f /tmp/TZ | |
+ if [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ]; then | |
+ ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime | |
+ else | |
+ echo "$timezone" > /tmp/localtime | |
+ fi | |
# apply timezone to kernel | |
hwclock -u --systz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment