diff options
-rw-r--r-- | usr.sbin/sysupgrade/sysupgrade.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/sysupgrade/sysupgrade.sh b/usr.sbin/sysupgrade/sysupgrade.sh index e265c411123..8ca67e2586f 100644 --- a/usr.sbin/sysupgrade/sysupgrade.sh +++ b/usr.sbin/sysupgrade/sysupgrade.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: sysupgrade.sh,v 1.12 2019/05/03 15:18:14 florian Exp $ +# $OpenBSD: sysupgrade.sh,v 1.13 2019/05/04 11:53:40 ajacoutot Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015 Robert Peichaer <rpe@openbsd.org> @@ -77,6 +77,8 @@ while getopts fnrs arg; do esac done +(($(id -u) != 0)) && ug_err "${0##*/}: need root privileges" + if $RELEASE && $SNAP; then usage fi |