aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
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