From: thib Date: Sat, 11 Jun 2005 22:53:21 +0000 (+0000) Subject: better support for freebsd X-Git-Tag: ver2_9_7~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c5ca9127874b03c15f2ad4320179ee4cbb8bee0;p=fcron better support for freebsd --- diff --git a/script/user-group b/script/user-group index f48bd6f..ab62e5c 100755 --- a/script/user-group +++ b/script/user-group @@ -4,7 +4,7 @@ # them if necessary. # -# $Id: user-group,v 1.14 2001-08-20 20:03:20 thib Exp $ +# $Id: user-group,v 1.15 2005-06-11 22:53:21 thib Exp $ # take 4 arguments : username # groupname @@ -93,12 +93,12 @@ if $SRCDIR/script/has_usrgrp.pl -user "$USERNAME"; then else echo "no." CMD="" - if useradd -D 2> /dev/null; then + if test "$IS_FREEBSD" -eq 1; then + CMD="pw useradd $USERNAME -c $USERNAME" + elif useradd -D 2> /dev/null; then CMD="useradd -c '$USERNAME' -g $GROUPNAME $USERNAME" elif adduser -D 2> /dev/null; then CMD="adduser -c '$USERNAME' -g $GROUPNAME $USERNAME" - elif test "$IS_FREEBSD" -eq 1; then - CMD="pw useradd $USERNAME -c $USERNAME" fi if test -z "$CMD"; then echo "Could not determine the command to use to add a user."