added lang /lib pkgs
[librewrt/.git] / packages / xwrt / webif / files / etc / init.d / timezone
1 #!/bin/sh /etc/rc.common
2
3 START=11
4
5 timezone_config() {
6         local cfg="$1"
7         local posixtz
8         local etctz="/etc/TZ"
9
10         config_get posixtz "$cfg" posixtz
11
12         if [ ! -h $etctz ]; then 
13                 ln -sf /tmp/TZ "$etctz"
14         fi
15         [ -n "$posixtz" ] && echo "$posixtz" > "$etctz" || echo "UTC+0" > "$etctz"
16 }
17
18 start() {
19         config_load timezone
20         config_foreach timezone_config timezone
21 }
22
23 restart() {
24         start
25 }