From 81122d069343c93ca6dccf46d42f3881acf82c35 Mon Sep 17 00:00:00 2001 From: James Conroy Date: Tue, 7 Dec 2021 21:34:19 -0600 Subject: [PATCH] Updated the useage function to use printf Using a hear doc means we have to exactly specify the formatting. Useing printf handles formatting for us --- salt/common/tools/sbin/so-status | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/salt/common/tools/sbin/so-status b/salt/common/tools/sbin/so-status index cf068c86b..debf45279 100755 --- a/salt/common/tools/sbin/so-status +++ b/salt/common/tools/sbin/so-status @@ -15,21 +15,26 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +MYNAME="${0##*/}" + if ! [ "$(id -u)" = 0 ]; then - echo "This command must be run as root" + echo "${MYNAME}: This command must be run as root" exit 1 fi display_help() { -cat <