From 492fe1fc8579f71ba4d0c3170941999cd91eba1b Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Tue, 28 Mar 2023 11:48:31 -0400 Subject: [PATCH] Ensure /usr/sbin is in path --- salt/common/tools/sbin/so-common | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/salt/common/tools/sbin/so-common b/salt/common/tools/sbin/so-common index 49b0d0527..2f436e86e 100755 --- a/salt/common/tools/sbin/so-common +++ b/salt/common/tools/sbin/so-common @@ -16,6 +16,11 @@ if [ -z $NOROOT ]; then fi fi +# Ensure /usr/sbin is in path +if ! echo "$PATH" | grep -q "/usr/sbin"; then + export PATH="$PATH:/usr/sbin" +fi + # Define a banner to separate sections banner="========================================================================="