aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-09-12 09:41:40 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-09-12 10:39:59 +0200
commitf32a39514e7f5e5c94554291f519be60c1624a5d (patch)
tree22d163517b8f501b6e95f74a9e9335cb94755efd /bin
parent160787bf6279748903ad6e2fa4264afcf078af41 (diff)
downloadpacman-offline-f32a39514e7f5e5c94554291f519be60c1624a5d.tar.gz
pacman-offline-f32a39514e7f5e5c94554291f519be60c1624a5d.tar.zst
deny action if systemd is not booted
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pacman-offline5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/pacman-offline b/bin/pacman-offline
index 346e843..3d218f9 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -46,6 +46,11 @@ if systemd-detect-virt --chroot; then
exit 0
fi
+if [ ! -d /run/systemd/system ]; then
+ echo 'Current root is not booted, skipping.' >&2
+ exit 0
+fi
+
if [ "${UID}" -ne 0 ]; then
if command -v pkexec >/dev/null; then
echo 'Missing privileges, trying to elevate.' >&2