aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/etc/init.d/system11
1 files changed, 4 insertions, 7 deletions
diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system
index 219b29812d..62cf2db3dd 100755
--- a/package/base-files/files/etc/init.d/system
+++ b/package/base-files/files/etc/init.d/system
@@ -21,13 +21,10 @@ system_config() {
echo "$hostname" > /proc/sys/kernel/hostname
[ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
- rm -f /tmp/TZ
- if [ -n "$zonename" ]; then
- local zname=$(echo "$zonename" | tr ' ' _)
- [ -f "/usr/share/zoneinfo/$zname" ] && ln -sf "/usr/share/zoneinfo/$zname" /tmp/localtime
- else
- echo "$timezone" > /tmp/TZ
- fi
+ echo "$timezone" > /tmp/TZ
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/${zonename// /_}" ] \
+ && ln -sf "/usr/share/zoneinfo/${zonename// /_}" /tmp/localtime \
+ && rm -f /tmp/TZ
# apply timezone to kernel
date -k