From fe0e58be155e4fea91fff3f3d2fddf3655423619 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 19 Sep 2021 11:57:49 +0000 Subject: once/update.sh: handle $SYSROOT/etc/localtime more robustly. --- once/update.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/once/update.sh b/once/update.sh index e09572e..f82cee6 100755 --- a/once/update.sh +++ b/once/update.sh @@ -11,7 +11,8 @@ else fi if [ -f "$SYSROOT/etc/localtime" ]; then - cp -p "$SYSROOT/etc/localtime" "$SYSROOT/etc/localtime.site" + rm -f "$SYSROOT/etc/localtime.site" + cat "$SYSROOT/etc/localtime" > "$SYSROOT/etc/localtime.site" fi tarballs=$(ls /updates/*.tar.gz 2>/dev/null) @@ -49,7 +50,8 @@ for tarball in $tarballs; do done if [ -f "$SYSROOT/etc/localtime.site" ]; then - mv "$SYSROOT/etc/localtime.site" "$SYSROOT/etc/localtime" + cat "$SYSROOT/etc/localtime.site" > "$SYSROOT/etc/localtime" + rm -f "$SYSROOT/etc/localtime.site" fi rm -f /updates/update.pending -- cgit v1.2.3