diff mbox series

[4/5] base-files: sysupgrade: s/do_save_conffiles/create_backup_archive/

Message ID 20240212105701.5812-4-zajec5@gmail.com
State Accepted
Delegated to: Rafał Miłecki
Headers show
Series [1/5] base-files: sysupgrade: replace UMOUNT_ETCBACKUP_DIR with a local variable | expand

Commit Message

Rafał Miłecki Feb. 12, 2024, 10:57 a.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

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 <rafal@milecki.pl>
---
 package/base-files/files/sbin/sysupgrade | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index f5a4441dc9..e7de1f3446 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
@@ -294,7 +294,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
 
@@ -364,7 +364,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"
+	[ $TEST -eq 1 ] || create_backup_archive "$CONF_TAR"
 	export SAVE_CONFIG=1
 else
 	[ $TEST -eq 1 ] || rm -f "$CONF_TAR"