From 4a1b94adba1a1de0e388c58508b2d78bd788729b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 12 Feb 2024 11:57:00 +0100 Subject: [PATCH] base-files: sysupgrade: s/do_save_conffiles/create_backup_archive/ MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Rename function to more accurate and self-explanatory name: 1. Use "archive" in name as this functions creates tar archive 2. Avoid "conffiles" as this function may archive more than that Signed-off-by: Rafał Miłecki --- package/base-files/files/sbin/sysupgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 592b1f378165..73d45fd03d5e 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -234,7 +234,7 @@ fi include /lib/upgrade -do_save_conffiles() { +create_backup_archive() { local conf_tar="$1" local umount_etcbackup_dir=0 @@ -297,7 +297,7 @@ if [ $CONF_BACKUP_LIST -eq 1 ]; then fi if [ -n "$CONF_BACKUP" ]; then - do_save_conffiles "$CONF_BACKUP" + create_backup_archive "$CONF_BACKUP" exit fi @@ -367,7 +367,7 @@ if [ -n "$CONF_IMAGE" ]; then get_image "$CONF_IMAGE" "cat" > "$CONF_TAR" export SAVE_CONFIG=1 elif ask_bool $SAVE_CONFIG "Keep config files over reflash"; then - [ $TEST -eq 1 ] || do_save_conffiles "$CONF_TAR" || exit + [ $TEST -eq 1 ] || create_backup_archive "$CONF_TAR" || exit export SAVE_CONFIG=1 else [ $TEST -eq 1 ] || rm -f "$CONF_TAR" -- 2.30.2