Message ID | 20240212105701.5812-4-zajec5@gmail.com |
---|---|
State | Accepted |
Delegated to: | Rafał Miłecki |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=x/lHwh41; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=VPhdp6JY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TYLzv5KYnz23hw for <incoming@patchwork.ozlabs.org>; Mon, 12 Feb 2024 21:58:51 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7ZwRX04qf11Xa/IHFBPzgu54CXFgv5y/zNqdZr89qj8=; b=x/lHwh41dlSD97 wFhrsuU9dBtMvVK6FHH7YKfjOM8TQEDvUAbKguFEK156RY3hur73JrtlrOaNeZK8dLIL1TseNelOp qQSSqSNTWqU7soXxv3HhT6bN0x6lXxWIviuII7hMQWYa9rqtrFx32lplHVYOzmS1MDVT5Cnc9LkNu c6kBelQdquTdD/lB/T+OOxQsCcNl26ALnkVT3Iks1gaU/CG1rgHdfdPumn0esPEeGYODHnNxgWP5S K2DiZ9VliMwo5RF0pp60mRF8CKx28sJ4X0ySNuto185yQKF8MECZPFaNm9xabs8fhV+JLXhN6RrKE WG3wmWzZGFd63kSBHBoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZU0W-000000050QC-2YZg; Mon, 12 Feb 2024 10:57:52 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZU0T-000000050Oh-09pm for openwrt-devel@lists.openwrt.org; Mon, 12 Feb 2024 10:57:50 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-55790581457so4645626a12.3 for <openwrt-devel@lists.openwrt.org>; Mon, 12 Feb 2024 02:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707735467; x=1708340267; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H611WmUd5z5weMSS1qyN8+TT9ITlfWTV3msxYLN1d0c=; b=VPhdp6JY7enIGdqiycYIVckhVnMBIK/NHAKF6vQJUlGDrnYGSwwhQQkOwrRodmwm3r 6QPNaM4Q2/WFCtXlAFhW7ZIl8oD2xjs4Is3IMBO8MMaRDNl3xhY2rDHxlFpdCM2uyojQ wkcQo5bB+CiAMGTRalw6lsNkzITDNH8BYOKeTQHn21hGKQKnimNlt52w9SQOLTvt25ku 3zmQcVpOlVd5DLxruDlBYH27FlTWDcPLGbEJ7QujnmrUuw70xpXCUZ/ht5TLCuHogeK9 jkfiPgXVugTRsnV6TKKVwAGrhP4kP0BVucg/jqfdgA1Isk7q1nRAOy7R4jSPaxNdXkRL vHRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707735467; x=1708340267; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H611WmUd5z5weMSS1qyN8+TT9ITlfWTV3msxYLN1d0c=; b=WLZxtAdwIYAaPvljIxY9PSYXc9PpIXQZ90aCR5esnxxOVSR8ZCx2sHIn4+xboQt1ix f+ep5CAunQJd8RDrSaBAhSoAiq2uaT8zDk9q+qjMtl5BbNkO6Q4pBkE6VAc7vSebZREw +3TC+0qI4Xx1QKKMLAgrw3HJLZkndw3+8mIKosKma3Nmz+dQnPfcPNrYjUZ+QA0Rc6b7 fUqiTZapDpmQMtuNDFHcCFe5COIXubwndtqjB0vz5qwmCjaTFTB8OqMuMpc+pr0xbBGF Vaj1dCUdo1heIlFRjEPe84Mv/J7kSG9wQJ5v1f/nRfjIbs0bz2Ogg3VG9xluObbU/iS4 rK2Q== X-Gm-Message-State: AOJu0YzSjLBvQY8lRJ1nWSSHWyeFG7viigkmpyPMNKli9dEwLETUlwb5 MS3e8ytaE1SF3JVlVLL108eCkJYW8TlnPxUIOpHo5m8oy3Nl6f6ZTsAwhMuI X-Google-Smtp-Source: AGHT+IHeikFYVgp6tLf7pPu81AtqwQZZAZ4oMWo19URar2L3uczUN6Wv9DGH3TGFgbAyK2ZO/1Svzw== X-Received: by 2002:a17:906:af94:b0:a38:970a:75df with SMTP id mj20-20020a170906af9400b00a38970a75dfmr4783948ejb.15.1707735466073; Mon, 12 Feb 2024 02:57:46 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV6Ozd1QUkMMM8WUlAwi8IbhwDRbBcl390xhVp5pGpWpxYKyQPQN2gnx7ZqqI0ywCo5bgq/Viax/Gu32eOaCyp4PcqsLCpoK6HtYw== Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id e2-20020a17090681c200b00a3c8f4bc31bsm91394ejx.38.2024.02.12.02.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 02:57:45 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= <zajec5@gmail.com> To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= <rafal@milecki.pl> Subject: [PATCH 4/5] base-files: sysupgrade: s/do_save_conffiles/create_backup_archive/ Date: Mon, 12 Feb 2024 11:57:00 +0100 Message-Id: <20240212105701.5812-4-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240212105701.5812-1-zajec5@gmail.com> References: <20240212105701.5812-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240212_025749_107233_58529EBF X-CRM114-Status: GOOD ( 10.05 ) X-Spam-Score: 0.0 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__From=3A_Rafa=C5=82_Mi=C5=82ecki_Rename?= =?unknown-8bit?q?_function_to_more_accurate_and?= =?unknown-8bit?q?_self-explanatory_name=3A_1=2E_Use_=22archive=22_in_name_as?= =?unknown-8bit?q?_this_functions_creates?= =?unknown-8bit?q?_tar_archive_2=2E_Avoid_=22conffiles=22_as_this_function_ma?= =?unknown-8bit?q?y_archive_more_than_that?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=280=2E0_points=2C_5=2E0_req?= =?unknown-8bit?q?uired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C_no?= =?unknown-8bit?q?_trust?= =?unknown-8bit?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDo1MzMgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from_author=27s?= =?unknown-8bit?q?_domain?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= =?unknown-8bit?q?_0=2E2_FREEMAIL=5FENVFROM=5FEND=5FDIGIT_Envelope-from_freem?= =?unknown-8bit?q?ail_username_ends_in?= =?unknown-8bit?q?_digit?= =?unknown-8bit?q?_=5Bzajec5=28at=29gmail=2Ecom=5D?= =?unknown-8bit?q?_0=2E0_FREEMAIL=5FFROM__________Sender_email_is_commonly_ab?= =?unknown-8bit?q?used_enduser_mail_provider?= =?unknown-8bit?q?_=5Bzajec5=28at=29gmail=2Ecom=5D?= =?unknown-8bit?q?_-0=2E0_T=5FSCC=5FBODY=5FTEXT=5FLINE___No_description_avail?= =?unknown-8bit?q?able=2E?= X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <https://lists.openwrt.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <https://lists.openwrt.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
[1/5] base-files: sysupgrade: replace UMOUNT_ETCBACKUP_DIR with a local variable
|
expand
|
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"