public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Daniel Weismueller <daniel.weismueller@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH] cups: for now cups make a backup on uninstall
Date: Thu, 28 Apr 2022 16:24:16 +0200	[thread overview]
Message-ID: <20220428142416.23557-1-daniel.weismueller@ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

and a restore on install / update

The include file that was added in a previous commit allowed to manually
create a backup, but none was created when the addon was installed,
uninstalled or updated.

Signed-off-by: Daniel Weismueller <daniel.weismueller(a)ipfire.org>
---
 src/paks/cups/install.sh   | 1 +
 src/paks/cups/uninstall.sh | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/paks/cups/install.sh b/src/paks/cups/install.sh
index b3f0f1368..cc5866971 100644
--- a/src/paks/cups/install.sh
+++ b/src/paks/cups/install.sh
@@ -23,6 +23,7 @@
 #
 . /opt/pakfire/lib/functions.sh
 extract_files
+restore_backup "${NAME}"
 /etc/init.d/messagebus reload
 start_service --delay 300 --background ${NAME}
 ln -svf ../init.d/cups /etc/rc.d/rc0.d/K00cups
diff --git a/src/paks/cups/uninstall.sh b/src/paks/cups/uninstall.sh
index 01b13de76..d4abdde63 100644
--- a/src/paks/cups/uninstall.sh
+++ b/src/paks/cups/uninstall.sh
@@ -23,6 +23,7 @@
 #
 . /opt/pakfire/lib/functions.sh
 stop_service ${NAME}
+make_backup "${NAME}"
 remove_files
 rm -rf /etc/rc.d/rc*.d/*cups
 /etc/init.d/messagebus reload
-- 
2.35.1


             reply	other threads:[~2022-04-28 14:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 14:24 Daniel Weismueller [this message]
2022-05-01 16:56 ` Adolf Belka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220428142416.23557-1-daniel.weismueller@ipfire.org \
    --to=daniel.weismueller@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox