diff options
author | steve <steve@FreeBSD.org> | 1998-11-09 09:09:25 +0800 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1998-11-09 09:09:25 +0800 |
commit | 2d8e5db0fdfcccbf62475e22d7ff8e4a1ca9bb04 (patch) | |
tree | f2da2be68e491c77bb02a0af1afb841c29645a9f | |
parent | 8a3946fabff27514e3fcaa38053c2fee4b35cbc1 (diff) | |
download | freebsd-ports-gnome-2d8e5db0fdfcccbf62475e22d7ff8e4a1ca9bb04.tar.gz freebsd-ports-gnome-2d8e5db0fdfcccbf62475e22d7ff8e4a1ca9bb04.tar.zst freebsd-ports-gnome-2d8e5db0fdfcccbf62475e22d7ff8e4a1ca9bb04.zip |
Allow a non-root user to build this port if the majordom user and
group already exist.
-rw-r--r-- | mail/majordomo/scripts/createuser | 12 |
1 files changed, 7 insertions, 5 deletions
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"; |