[freeside-commits] freeside/FS/bin freeside-adduser,1.8,1.9
Ivan,,,
ivan at wavetail.420.am
Sun Apr 9 13:36:09 PDT 2006
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail:/tmp/cvs-serv21303
Modified Files:
freeside-adduser
Log Message:
error out if you try to add duplicates; this should lower my annoyance-level
Index: freeside-adduser
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-adduser,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- freeside-adduser 27 Sep 2002 05:36:29 -0000 1.8
+++ freeside-adduser 9 Apr 2006 20:36:06 -0000 1.9
@@ -13,6 +13,14 @@
die &usage if $opt_c && ! $opt_h;
my $user = shift or die &usage;
+open(MAPSECRETS,"<$FREESIDE_CONF/mapsecrets")
+ or die "can't open $FREESIDE_CONF/mapsecrets: $!";
+while (<MAPSECRETS>) {
+ /^(\S+) / or die "unparsable line in mapsecrets: $_";
+ die "user $user already exists\n" if $user eq $1;
+}
+close MAPSECRETS;
+
if ( $opt_h ) {
my @args = ( 'htpasswd' );
push @args, '-b' if $opt_b;
More information about the freeside-commits
mailing list