From cb18be3f401a2c693d66a9417e479ed74e17c2f0 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Mon, 12 Mar 2012 23:26:15 +0100 Subject: timezone: always symlink to zoneinfo rather than copying MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Tom Gundersen --- functions | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'functions') 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 } -- cgit v1.2.3