From 2e4f122e57ad91403b328835c121c49849e2b5c9 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 15 Sep 2022 11:10:33 -0400 Subject: [PATCH] Fix setup error --- salt/common/tools/sbin/so-minion | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/common/tools/sbin/so-minion b/salt/common/tools/sbin/so-minion index 3d5930c77..adaf1d344 100755 --- a/salt/common/tools/sbin/so-minion +++ b/salt/common/tools/sbin/so-minion @@ -5,8 +5,9 @@ # https://securityonion.net/license; you may not use this file except in compliance with the # Elastic License 2.0. -if [[ $OPERATION != 'setup' ]]; then -. /usr/sbin/so-common +if [ "$(id -u)" -ne 0 ]; then + echo "This script must be run using sudo!" + exit 1 fi if [[ $# -lt 1 ]]; then