From 21f1a7c7eb961c5049fa6d05f95361bdad245dc9 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 24 Sep 2011 19:43:39 -0400 Subject: 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 --- functions | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'functions') 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 -- cgit v1.2.3