This replaces the only `echo' usage with `print' like the rest of the
script does:

        $ sh /etc/netstart -n >/dev/null ; echo $?
        1
        $ sh ./netstart -n >/dev/null ; echo $?
        netstart: need root privileges
        1

OK?

Index: netstart
===================================================================
RCS file: /cvs/src/etc/netstart,v
retrieving revision 1.227
diff -u -p -r1.227 netstart
--- netstart    1 Nov 2022 11:18:06 -0000       1.227
+++ netstart    1 Nov 2022 13:30:56 -0000
@@ -312,7 +312,7 @@ wait_dad() {
 # Make sure the invoking user has the right privileges.  Check for presence of
 # id(1) to avoid problems with diskless setups.
 if [[ -x /usr/bin/id ]] && (($(id -u) != 0)); then
-       echo "${0##*/}: need root privileges"
+       print -u2 -- "${0##*/}: need root privileges"
        exit 1
 fi
 

Reply via email to