aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-09-12 09:14:23 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-09-12 10:39:59 +0200
commit55ab599accfc6eaf1894f715b49457116d8cde5c (patch)
tree29cb5c90a1d81dd5da4f0f78f14b7311e568c1d3 /bin
parent60c9fe2557f30d81bfd5b6bcf866bc6a80e6273a (diff)
downloadpacman-offline-55ab599accfc6eaf1894f715b49457116d8cde5c.tar.gz
pacman-offline-55ab599accfc6eaf1894f715b49457116d8cde5c.tar.zst
support to abort from pacman-offline
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pacman-offline15
1 files changed, 12 insertions, 3 deletions
diff --git a/bin/pacman-offline b/bin/pacman-offline
index 58b81f2..5597faf 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -12,6 +12,7 @@ set -e
function help() {
echo "usage: ${0} [OPTIONS]"
echo
+ echo ' -a abort pending system-update'
echo ' -c clean before download'
echo ' -f force if other system-update is pending'
echo ' -h this help'
@@ -26,13 +27,13 @@ POWEROFF=0
REBOOT=0
TIMER=0
-while getopts 'cfhprty' opt; do
+while getopts 'acfhprty' opt; do
case ${opt} in
h)
help
exit 0
;;
- c|f|p|r|t|y)
+ a|c|f|p|r|t|y)
;;
*)
exit 1
@@ -51,8 +52,16 @@ if [ "${UID}" -ne 0 ]; then
fi
OPTIND=1
-while getopts 'cfhprty' opt; do
+while getopts 'acfhprty' opt; do
case ${opt} in
+ a)
+ rm --force \
+ /system-update \
+ /run/systemd/system/systemd-poweroff.service \
+ /run/systemd/system/systemd-reboot.service
+ systemctl daemon-reload
+ exit 0
+ ;;
c)
if pacman-conf 'CleanMethod' | grep -q 'KeepCurrent'; then
CLEAN=1