aboutsummaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/pacman-offline4
-rw-r--r--systemd/pacman-offline-reboot.service4
2 files changed, 4 insertions, 4 deletions
diff --git a/systemd/pacman-offline b/systemd/pacman-offline
index 973dc01..bacf696 100755
--- a/systemd/pacman-offline
+++ b/systemd/pacman-offline
@@ -32,8 +32,8 @@ pacman --config /run/pacman.conf --sync --noconfirm --sysupgrade
# clean up package cache
pacman --sync --noconfirm --clean
-# reboot
-if [ -s "/usr/lib/modules/$(uname -r)/pkgbase" ] && systemctl --dry-run soft-reboot 2>/dev/null; then
+# (soft-)reboot
+if [ -s "/usr/lib/modules/$(uname -r)/pkgbase" ]; then
systemctl soft-reboot
else
systemctl reboot
diff --git a/systemd/pacman-offline-reboot.service b/systemd/pacman-offline-reboot.service
index 26dca94..c131d70 100644
--- a/systemd/pacman-offline-reboot.service
+++ b/systemd/pacman-offline-reboot.service
@@ -6,9 +6,9 @@
# (at your option) any later version.
[Unit]
-Description=Reboot for pacman offline system-update
+Description=Soft-reboot for pacman offline system-update
ConditionPathExists=/system-update
[Service]
Type=oneshot
-ExecStart=/bin/sh -c "if systemctl --dry-run soft-reboot 2>/dev/null; then systemctl soft-reboot; else systemctl reboot; fi"
+ExecStart=/usr/bin/systemctl soft-reboot