summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-09-24 19:43:39 -0400
committerDave Reisner <dreisner@archlinux.org>2011-09-24 19:43:39 -0400
commit21f1a7c7eb961c5049fa6d05f95361bdad245dc9 (patch)
tree4b0c796871e467650d7ca1ccf5fff639a77964b2 /functions
parent71fe1590598381588502e58b60622b0b72d79454 (diff)
respect the user's choice for /etc/localtime
This can be a symlink or a regular file, and rc.sysinit will preserve it as such. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r--functions7
1 files changed, 6 insertions, 1 deletions
diff --git a/functions b/functions
index ab6d9ae..2ea81f9 100644
--- a/functions
+++ b/functions
@@ -397,7 +397,12 @@ set_timezone() {
return 0
fi
- ln -sf "/usr/share/zoneinfo/$tz" /etc/localtime
+ # respect the user's decision to symlink or copy
+ if [[ -L /etc/localtime ]]; then
+ ln -sf "/usr/share/zoneinfo/$tz" /etc/localtime
+ else
+ cp --remove-destination "/usr/share/zoneinfo/$tz" /etc/localtime
+ fi
}
# Filesystem functions