summaryrefslogtreecommitdiff
path: root/templates/system/time-zone
diff options
context:
space:
mode:
Diffstat (limited to 'templates/system/time-zone')
-rw-r--r--templates/system/time-zone/node.def7
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/system/time-zone/node.def b/templates/system/time-zone/node.def
index 72ca791e..60e87e12 100644
--- a/templates/system/time-zone/node.def
+++ b/templates/system/time-zone/node.def
@@ -12,7 +12,12 @@ case \"$(@)\" in \
[Pp][Hh][Oo]*) LTF=\"\\\$LTF/US/Arizona\" ;; \
*) LTF=\"\\\$LTF/Etc/$(@)\" ;; \
esac && \
-sudo ln -fs \\\$LTF /etc/localtime"
+if [ -e \"\\\$LTF\" ]; then \
+ sudo ln -fs \\\$LTF /etc/localtime; \
+else \
+ echo \"Invalid timezone\"; \
+ exit 1; \
+fi"
delete: "sudo ln -fs /usr/share/zoneinfo/GMT /etc/localtime"
#allowed: local -a list=( "Los Angeles" "New York" "Denver" "Chicago" \
# "Anchorage" "Honolulu" "Phoenix" "GMT" )