From 797d27521ba00145722fcf1278daf6e3a486956c Mon Sep 17 00:00:00 2001 From: James Barnett Date: Wed, 31 Aug 2016 12:41:40 -0500 Subject: [PATCH] check if dbus not available (i.e. in chroot) --- scripts/snap-pac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/snap-pac b/scripts/snap-pac index 92ff7e4..95a61d6 100755 --- a/scripts/snap-pac +++ b/scripts/snap-pac @@ -29,6 +29,11 @@ if [[ $EUID -ne 0 ]]; then exit 1 fi +if [[ ! -d /var/run/dbus ]]; then + echo "ERROR: Unable to use snapper without dbus. Are you in a chroot environment?" + exit 1 +fi + if [[ $# -ne 1 ]]; then echo "ERROR: Only one argument should be passed to this script." exit 1