aboutsummaryrefslogtreecommitdiff
path: root/rc.shutdown
diff options
context:
space:
mode:
authorKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-06-24 11:46:36 +0200
committerKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-06-24 13:52:58 +0200
commit727acff0c55abdacde0cc8832f18fed729bccc5a (patch)
tree6b996aa69f4e3eda3e57bd804e4f51cd6251f1b9 /rc.shutdown
parent31e27d48c25495857d052964b59ba387cb809bba (diff)
downloadinitscripts-727acff0c55abdacde0cc8832f18fed729bccc5a.tar.xz
Simplify timezone copying
Error/stat_fail when $TIMEZONE is invalid instead of skipping silently.
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-xrc.shutdown5
1 files changed, 2 insertions, 3 deletions
diff --git a/rc.shutdown b/rc.shutdown
index 637974f..4014df2 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -35,10 +35,9 @@ fi
dd if=/dev/urandom of=$RANDOM_SEED count=1 bs=$POOL_SIZE &> /dev/null
stat_done
-if [[ $TIMEZONE && -e /usr/share/zoneinfo/$TIMEZONE ]]; then
- rm -f /etc/localtime
+if [[ $TIMEZONE ]]; then
status "Saving Time Zone" \
- cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
+ cp --remove-destination "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
fi
# Write to wtmp file before unmounting