diff options
Diffstat (limited to 'usr.sbin/pkg_add/pkg_delete')
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index 5c4dd6aada4..b4b7a2e9839 100644 --- a/usr.sbin/pkg_add/pkg_delete +++ b/usr.sbin/pkg_add/pkg_delete @@ -1,6 +1,6 @@ #!/usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_delete,v 1.19 2004/01/27 13:09:16 espie Exp $ +# $OpenBSD: pkg_delete,v 1.20 2004/01/27 14:50:52 espie Exp $ # # Copyright (c) 2003 Marc Espie. # @@ -327,6 +327,10 @@ if ($opt_f) { %forced = map {($_, 1)} split(/,/, $opt_f); } +if ($< && !$forced{nonroot}) { + die "$0 must be run as root"; +} + my %done; my $removed; |