summaryrefslogtreecommitdiffstats
path: root/tmp/post_upgrade_command
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:49:04 -0400
commita41c031694484feaf7f134c2a637214a797a6673 (patch)
treee6a29bead139a7d589e815c2ed44d89715d98368 /tmp/post_upgrade_command
parent636307a5cf76d99a8a767207c675b7e715d0ea22 (diff)
downloadpfsense-a41c031694484feaf7f134c2a637214a797a6673.zip
pfsense-a41c031694484feaf7f134c2a637214a797a6673.tar.gz
If upgrading NanoBSD, try to grab the previous timezone file so the zone is preserved on the next boot.
Diffstat (limited to 'tmp/post_upgrade_command')
-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