aboutsummaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/pacman-offline17
-rw-r--r--systemd/pacman-offline-prepare.service2
-rw-r--r--systemd/pacman-offline-prepare.timer2
-rw-r--r--systemd/pacman-offline-reboot.service2
-rw-r--r--systemd/pacman-offline-reboot.timer2
-rw-r--r--systemd/pacman-offline.service6
6 files changed, 21 insertions, 10 deletions
diff --git a/systemd/pacman-offline b/systemd/pacman-offline
index 9bae2ee..ed6a689 100755
--- a/systemd/pacman-offline
+++ b/systemd/pacman-offline
@@ -1,6 +1,6 @@
#!/bin/sh
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,10 @@ fi
# exclude /etc/pacman.d/offline.conf
function finish { rm -f /run/pacman.conf; }
trap finish EXIT
-sed '/^Include *= *\/etc\/pacman\.d\/offline\.conf$/s|^|#|' < /etc/pacman.conf > /run/pacman.conf
+sed \
+ -e '/^Include *= *\/etc\/pacman\.d\/offline\.conf$/s|^|#|' \
+ -e '/^#Include *= *\/etc\/pacman\.d\/offline-include\.conf$/s|^#||' \
+ < /etc/pacman.conf > /run/pacman.conf
# remove triggering symlink and reboot & poweroff override
rm --force \
@@ -31,14 +34,18 @@ if [ "$(pacman --sync --print --needed archlinux-keyring | wc -l)" -gt 0 ]; then
fi
pacman --config /run/pacman.conf --sync --noconfirm --sysupgrade
+# clean up config file, drop trap
+rm -f /run/pacman.conf
+trap - EXIT
+
# clean up package cache
pacman --sync --noconfirm --clean
# poweroff or (soft-)reboot
if [ -e '/run/system-update-poweroff' ]; then
- systemctl poweroff
+ exec systemctl poweroff
elif [ -s "/usr/lib/modules/$(uname -r)/pkgbase" ]; then
- systemctl soft-reboot
+ exec systemctl soft-reboot
else
- systemctl reboot
+ exec systemctl reboot
fi
diff --git a/systemd/pacman-offline-prepare.service b/systemd/pacman-offline-prepare.service
index c9b5ba5..3979f0b 100644
--- a/systemd/pacman-offline-prepare.service
+++ b/systemd/pacman-offline-prepare.service
@@ -1,4 +1,4 @@
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/systemd/pacman-offline-prepare.timer b/systemd/pacman-offline-prepare.timer
index 598b387..a0b537c 100644
--- a/systemd/pacman-offline-prepare.timer
+++ b/systemd/pacman-offline-prepare.timer
@@ -1,4 +1,4 @@
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/systemd/pacman-offline-reboot.service b/systemd/pacman-offline-reboot.service
index c131d70..20a6e47 100644
--- a/systemd/pacman-offline-reboot.service
+++ b/systemd/pacman-offline-reboot.service
@@ -1,4 +1,4 @@
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/systemd/pacman-offline-reboot.timer b/systemd/pacman-offline-reboot.timer
index b6852a9..cf23ce5 100644
--- a/systemd/pacman-offline-reboot.timer
+++ b/systemd/pacman-offline-reboot.timer
@@ -1,4 +1,4 @@
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/systemd/pacman-offline.service b/systemd/pacman-offline.service
index 516acae..bde311f 100644
--- a/systemd/pacman-offline.service
+++ b/systemd/pacman-offline.service
@@ -1,4 +1,4 @@
-# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
+# (C) 2017-2025 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,8 +16,12 @@ OnFailure=reboot.target
[Service]
Type=oneshot
+# Pretty print to tty...
StandardOutput=tty
StandardError=tty
+# ... or use this for debugging - less pretty, but with output in journal.
+#StandardOutput=journal+console
+#StandardError=journal+console
ExecStartPre=-/usr/bin/plymouth change-mode --updates
ExecStartPre=-/usr/bin/plymouth system-update --progress=20
ExecStart=/usr/lib/systemd/scripts/pacman-offline