summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-03-12 23:26:15 +0100
committerTom Gundersen <teg@jklm.no>2012-03-12 23:26:15 +0100
commitcb18be3f401a2c693d66a9417e479ed74e17c2f0 (patch)
tree92a42f2c860f734d27acb540fe6e2004b99dded4
parent1b653d6986714848a848b421c50dafe2868829e6 (diff)
timezone: always symlink to zoneinfo rather than copying
Behave as described in the manpage. This makes sure that we don't need to write to /etc unnecessarily in case of updates to zoneinfo. The reason for keeping a copy in /etc was if /usr was on a separate unmounted partition, but this is no longer supported. Reported-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Tom Gundersen <teg@jklm.no>
-rw-r--r--functions7
1 files changed, 1 insertions, 6 deletions
diff --git a/functions b/functions
index a3c2660..3593892 100644
--- a/functions
+++ b/functions
@@ -417,13 +417,8 @@ set_timezone() {
if [[ -L /etc/localtime && /etc/localtime -ef $zonefile ]]; then
return 0
- fi
-
- # 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
+ ln -sf "/usr/share/zoneinfo/$tz" /etc/localtime
fi
}