aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
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 5597faf..346e843 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -41,6 +41,11 @@ while getopts 'acfhprty' opt; do
esac
done
+if systemd-detect-virt --chroot; then
+ echo 'Running in chroot, skipping.' >&2
+ exit 0
+fi
+
if [ "${UID}" -ne 0 ]; then
if command -v pkexec >/dev/null; then
echo 'Missing privileges, trying to elevate.' >&2