From 229602d5fe8cb12a6d780607f9db73c54c44e546 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 3 Nov 2021 18:18:31 +0800 Subject: [PATCH] Update sysupgrade --- root/package/base-files/files/sbin/sysupgrade | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/root/package/base-files/files/sbin/sysupgrade b/root/package/base-files/files/sbin/sysupgrade index 5cf0b2bf..fa03b747 100755 --- a/root/package/base-files/files/sbin/sysupgrade +++ b/root/package/base-files/files/sbin/sysupgrade @@ -13,7 +13,7 @@ export SAVE_CONFIG=1 export SAVE_OVERLAY=0 export SAVE_OVERLAY_PATH= export SAVE_PARTITIONS=1 -export SAVE_INSTALLED_PKGS=1 +export SAVE_INSTALLED_PKGS=0 export SKIP_UNCHANGED=0 export CONF_IMAGE= export CONF_BACKUP_LIST=0 @@ -112,18 +112,6 @@ EOF # prevent messages from clobbering the tarball when using stdout [ "$CONF_BACKUP" = "-" ] && export VERBOSE=0 -missing_lines() { - local file1 file2 line - file1="$1" - file2="$2" - oIFS="$IFS" - IFS=":" - while read line; do - set -- $line - grep -q "^$1:" "$file2" || echo "$*" - done < "$file1" - IFS="$oIFS" -} list_conffiles() { awk ' @@ -299,13 +287,8 @@ if [ -n "$CONF_RESTORE" ]; then fi [ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V="" - cp /etc/passwd /etc/group /etc/shadow /tmp + v "Restoring config files..." tar -C / -x${TAR_V}zf "$CONF_RESTORE" - missing_lines /tmp/passwd /etc/passwd >> /etc/passwd - missing_lines /tmp/group /etc/group >> /etc/group - missing_lines /tmp/shadow /etc/shadow >> /etc/shadow - rm /tmp/passwd /tmp/group /tmp/shadow - exit $? fi @@ -394,4 +377,4 @@ else json_close_object ubus call system sysupgrade "$(json_dump)" -fi +fi \ No newline at end of file