=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/etc/netstart,v retrieving revision 1.169 retrieving revision 1.170 diff -c -r1.169 -r1.170 *** src/etc/netstart 2016/07/19 08:03:01 1.169 --- src/etc/netstart 2016/09/09 19:48:16 1.170 *************** *** 1,6 **** #!/bin/sh - # ! # $OpenBSD: netstart,v 1.169 2016/07/19 08:03:01 mpi Exp $ # Turn off Strict Bourne shell mode. set +o sh --- 1,6 ---- #!/bin/sh - # ! # $OpenBSD: netstart,v 1.170 2016/09/09 19:48:16 jasper Exp $ # Turn off Strict Bourne shell mode. set +o sh *************** *** 166,171 **** --- 166,177 ---- ifconfig $_if inet6 autoconf done } + + # Make sure the invoking user has the right privileges. + if (($(id -u) != 0)); then + echo "${0##*/}: need root privileges" + exit 1 + fi # Get network related vars from rc.conf using the parsing routine from rc.subr. FUNCS_ONLY=1 . /etc/rc.d/rc.subr