From 611d88001e64f671751a2003934806fb598baf29 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 18 Dec 2013 04:05:39 +0100 Subject: Bug #51: update /etc/timezone when timezone changes. --- templates/system/time-zone/node.def | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/system/time-zone/node.def b/templates/system/time-zone/node.def index ce76c8a4..def367f4 100644 --- a/templates/system/time-zone/node.def +++ b/templates/system/time-zone/node.def @@ -16,11 +16,13 @@ update: LTF="/usr/share/zoneinfo" esac if [ -f "$LTF" ]; then sudo ln -fs $LTF /etc/localtime + sudo sh -c "echo $VAR(@) > /etc/timezone" else echo "Invalid timezone" exit 1 fi -delete:expression: "sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime" +delete: sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime + sudo sh -c "echo UTC > /etc/timezone" allowed: shopt -s nullglob word=${COMP_WORDS[$COMP_CWORD]} if [[ $word == */* ]]; then -- cgit v1.2.3