base-files: fix foreign sysupgrade detection

Backups are gzipped, include the missing 'z' parameter in 'tar' call.
While at it, make 'grep' call quiet (add 'q' parameter).

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This commit is contained in:
Piotr Dymacz
2022-11-04 09:57:35 +01:00
committed by John Crispin
parent 09b513550c
commit 93f603e27c

View File

@@ -17,7 +17,7 @@ index 3f75411a43..7cf16e68e0 100644
mount_root
boot_run_hook preinit_mount_root
- [ -f /sysupgrade.tgz ] && {
+ (tar tf /sysupgrade.tgz | grep ucentral) 2> /dev/null
+ (tar tzf /sysupgrade.tgz | grep -q ucentral) 2> /dev/null
+ [ $? -eq 0 ] && {
echo "- config restore -"
cp /etc/passwd /etc/group /etc/shadow /tmp