Merge pull request #9271 from Njinx/dev

so-status runs some code before checking for root privileges
This commit is contained in:
Doug Burks
2023-01-04 16:05:34 -05:00
committed by GitHub

View File

@@ -28,6 +28,11 @@ cat <<HELP_USAGE
HELP_USAGE
}
if ! [ "$(id -u)" = 0 ]; then
echo "${0}: This command must be run as root"
exit 1
fi
# Constants
QUIET=false
EXITCODE=0
@@ -294,11 +299,6 @@ is_tty() {
# {% endraw %}
if ! [ "$(id -u)" = 0 ]; then
echo "${0}: This command must be run as root"
exit 1
fi
while getopts ':hq' OPTION; do
case "$OPTION" in
h)