summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-08-28 10:48:17 -0400
committerjim-p <jimp@pfsense.org>2013-08-28 10:48:17 -0400
commit495dd804761bcd9578e648c56eefae2f2f9fe625 (patch)
tree200905812797f63100ad70ed66b44e818988884a
parentfa92a6a49e176f1061c81924d9553204ae378511 (diff)
downloadpfsense-495dd804761bcd9578e648c56eefae2f2f9fe625.zip
pfsense-495dd804761bcd9578e648c56eefae2f2f9fe625.tar.gz
If upgrading NanoBSD, try to grab the previous timezone file so the zone is preserved on the next boot.
-rwxr-xr-xtmp/post_upgrade_command5
1 files changed, 5 insertions, 0 deletions
diff --git a/tmp/post_upgrade_command b/tmp/post_upgrade_command
index 672c7f6..4e07a71 100755
--- a/tmp/post_upgrade_command
+++ b/tmp/post_upgrade_command
@@ -123,3 +123,8 @@ fi
if [ -f ${MTREECHKDIR}etc/pfSense.mtree ]; then
/usr/sbin/mtree -U -e -q -f ${MTREECHKDIR}etc/pfSense.mtree -p ${MTREECHKDIR} > /conf/mtree.log;
fi;
+
+# Make sure to preserve existing time zone
+if [ "${PFSENSETYPE}" = "nanobsd" ] && [ -f /etc/localtime ]; then
+ /bin/cp -p /etc/localtime /tmp/${1}/etc/localtime 2>/dev/null
+fi
OpenPOWER on IntegriCloud