Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jan 2003 16:50:24 -0600 (CST)
From:      "Scot W. Hetzel" <hetzels@westbend.net>
To:        FreeBSD-Current <FreeBSD-Current@freebsd.org>
Subject:   Adduser difference between 5.0 and earlier versions
Message-ID:  <200301212250.h0LMoOXW029934@WBIw009.westbend.net>

next in thread | raw e-mail | index | archive | help
I noticed that adduser in 5.0, only allows you to add one user
in interactive mode.  The previous version of adduser would ask
you if you wanted to add another user.

Attached is a patch which puts this feature back into adduser.

Scot

Index: adduser.sh
===================================================================
RCS file: /home/ncvs/src/usr.sbin/adduser/adduser.sh,v
retrieving revision 1.3
diff -u -r1.3 adduser.sh
--- adduser.sh	3 Dec 2002 05:41:09 -0000	1.3
+++ adduser.sh	21 Jan 2003 22:35:39 -0000
@@ -870,5 +870,22 @@
 		fi
 	fi
 else
-	input_interactive
+	while : ; do
+		input_interactive
+		echo -n "Add another user? (yes/No): "
+		read _input
+		[ -z "$_input" ] && _input="No"
+		case $_input in
+		[Yy][Ee][Ss]|[Yy][Ee]|[Yy])
+			continue
+			;;
+		[Nn][Oo]|[Nn])
+			echo "Goodbye!"
+			;;
+		*)
+			continue
+			;;
+		esac
+		break
+	done
 fi

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301212250.h0LMoOXW029934>