base: fix setting timezone
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
#!/usr/bin/with-contenv sh
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
if [ $TZ ]; then
|
if [[ ! -z "$TZ" ]]; then
|
||||||
[ -f /usr/share/zoneinfo/$TZ ] && cp /usr/share/zoneinfo/$TZ /etc/localtime || echo "WARNING: $TZ is not a valid time zone."
|
if [[ -f /usr/share/zoneinfo/$TZ ]]; then
|
||||||
[ -f /usr/share/zoneinfo/$TZ ] && echo "$TZ" > /etc/timezone
|
ln -sf /usr/share/zoneinfo/$TZ /etc/localtime
|
||||||
|
echo "$TZ" > /etc/timezone
|
||||||
|
else
|
||||||
|
echo "WARNING: $TZ is not a valid time zone."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user