From 1c5ca9127874b03c15f2ad4320179ee4cbb8bee0 Mon Sep 17 00:00:00 2001 From: thib Date: Sat, 11 Jun 2005 22:53:21 +0000 Subject: [PATCH] better support for freebsd --- script/user-group | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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." -- 2.40.0