summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-12-10 16:18:32 +0000
committermidipix <writeonce@midipix.org>2020-12-10 16:18:32 +0000
commit38461fb41746db5c45a5a86cbaa9b7589ea880ec (patch)
tree29e04217984463fac79490956da7afd6f5c4a70a
parent493d9514c0f93056a3acbd8e8a16d421e6a0ebf7 (diff)
downloadmpackage-38461fb41746db5c45a5a86cbaa9b7589ea880ec.tar.bz2
mpackage-38461fb41746db5c45a5a86cbaa9b7589ea880ec.tar.xz
once/update.sh: backup and restore /etc/localtime as needed.
-rwxr-xr-xonce/update.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/once/update.sh b/once/update.sh
index 6385e2e..e09572e 100755
--- a/once/update.sh
+++ b/once/update.sh
@@ -10,6 +10,10 @@ else
mkdir -p "$SYSROOT" || exit 2
fi
+if [ -f "$SYSROOT/etc/localtime" ]; then
+ cp -p "$SYSROOT/etc/localtime" "$SYSROOT/etc/localtime.site"
+fi
+
tarballs=$(ls /updates/*.tar.gz 2>/dev/null)
if [ "$tarballs" = '/updates/*.tar.gz' ]; then
@@ -44,6 +48,10 @@ for tarball in $tarballs; do
echo
done
+if [ -f "$SYSROOT/etc/localtime.site" ]; then
+ mv "$SYSROOT/etc/localtime.site" "$SYSROOT/etc/localtime"
+fi
+
rm -f /updates/update.pending
echo