check if dbus not available (i.e. in chroot)

This commit is contained in:
James Barnett 2016-08-31 12:41:40 -05:00
parent 3a4e052d7b
commit 797d27521b

View file

@ -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