summaryrefslogtreecommitdiffstats
path: root/mail/majordomo
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1998-11-09 01:09:25 +0000
committersteve <steve@FreeBSD.org>1998-11-09 01:09:25 +0000
commit2d8e5db0fdfcccbf62475e22d7ff8e4a1ca9bb04 (patch)
treef2da2be68e491c77bb02a0af1afb841c29645a9f /mail/majordomo
parent8a3946fabff27514e3fcaa38053c2fee4b35cbc1 (diff)
downloadFreeBSD-ports-2d8e5db0fdfcccbf62475e22d7ff8e4a1ca9bb04.zip
FreeBSD-ports-2d8e5db0fdfcccbf62475e22d7ff8e4a1ca9bb04.tar.gz
Allow a non-root user to build this port if the majordom user and
group already exist.
Diffstat (limited to 'mail/majordomo')
-rw-r--r--mail/majordomo/scripts/createuser12
1 files changed, 7 insertions, 5 deletions
diff --git a/mail/majordomo/scripts/createuser b/mail/majordomo/scripts/createuser
index e75f9d4..f755b0b 100644
--- a/mail/majordomo/scripts/createuser
+++ b/mail/majordomo/scripts/createuser
@@ -5,11 +5,6 @@ eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
& eval 'exec /usr/bin/perl -S $0 $argv:q'
if 0;
-if( $> ) {
- print "\nYou must be root to run this step!\n\n";
- exit 1;
-}
-
if( ! -x "/usr/sbin/pw" ) {
print "\nYou require the pw command, which was included in FreeBSD v2.2 builds\n";
print "as of Dec 9th 1996. If you don't have it, try looking in\n";
@@ -37,6 +32,13 @@ if( getgrnam( "majordom" ) ) {
}
}
+if( $have_group && $have_user ) {
+ exit 0;
+} elsif( $> ) {
+ print "\nYou must be root to run this step!\n\n";
+ exit 1;
+}
+
print "majordom user using uid $mjUID\n";
print "majordom user using gid $mjGID\n";
OpenPOWER on IntegriCloud