diff options
author | midipix <writeonce@midipix.org> | 2021-09-19 11:57:49 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-09-19 11:57:49 +0000 |
commit | fe0e58be155e4fea91fff3f3d2fddf3655423619 (patch) | |
tree | 141e09f9accc6cdaefff689a63f1f5d01acc3b21 /once | |
parent | 7d86b891f4d6c25f8af7e6c42fc2b3e58479f3ad (diff) | |
download | mpackage-fe0e58be155e4fea91fff3f3d2fddf3655423619.tar.bz2 mpackage-fe0e58be155e4fea91fff3f3d2fddf3655423619.tar.xz |
once/update.sh: handle $SYSROOT/etc/localtime more robustly.
Diffstat (limited to 'once')
-rwxr-xr-x | once/update.sh | 6 |
1 files 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 |