summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2022-11-05 12:06:06 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2022-11-05 12:06:06 +0000
commit5ff95ed31a93562f016fb4f4d9b1583b6dcc1bae (patch)
treeec6acca3f1c8cf4f8b182b7b7a14bfeda588dab9
parent0c4ae8e0203d3b503a80e9f0971334d03ee25954 (diff)
"need root privileges" is an error, print it on stderr"
-rw-r--r--etc/netstart4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/netstart b/etc/netstart
index b89b1be4623..7e570c27489 100644
--- a/etc/netstart
+++ b/etc/netstart
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: netstart,v 1.228 2022/11/05 12:03:58 kn Exp $
+# $OpenBSD: netstart,v 1.229 2022/11/05 12:06:05 kn Exp $
# Turn off Strict Bourne shell mode.
set +o sh
@@ -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