From 587c8c488f3060981d61b99187340c0a4a064594 Mon Sep 17 00:00:00 2001 From: Steve Price Date: Mon, 9 Nov 1998 01:09:25 +0000 Subject: Allow a non-root user to build this port if the majordom user and group already exist. --- mail/majordomo/scripts/createuser | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'mail/majordomo') diff --git a/mail/majordomo/scripts/createuser b/mail/majordomo/scripts/createuser index e75f9d4c71a8..f755b0b04d92 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"; -- cgit v1.2.3