From 9a8c20ce1ad520ce29c7559fac0fbbefeab60b30 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Tue, 14 Feb 2017 13:17:17 -0600 Subject: [PATCH] Revert "no need to check for root, since permissions will be checked." This reverts commit 39bc6ea222d6cca2742d7c783c3816555926696f. --- scripts/snap-pac | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/snap-pac b/scripts/snap-pac index 44a7c41..a2f72d8 100755 --- a/scripts/snap-pac +++ b/scripts/snap-pac @@ -50,6 +50,7 @@ trap kill_exit SIGTERM SIGINT source "$SNAPPER_CONFIG_FILE" +[[ $EUID -ne 0 ]] && die "Script must be run as root." [[ ! -d /var/run/dbus ]] && die "No dbus available. Are you in a chroot environment?" [[ $# -ne 1 ]] && die "Only one argument should be passed to this script." [[ $1 != "pre" ]] && [[ $1 != "post" ]] && die "First argument should either be 'pre' or 'post'."