summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-adduser
diff options
context:
space:
mode:
authorivan <ivan>2002-02-06 14:58:05 +0000
committerivan <ivan>2002-02-06 14:58:05 +0000
commit0144506246df56f2f705d4edc3cf29cd7dd0ed24 (patch)
tree8e1a1b5dabcda028f4c029b877291087a99becfc /FS/bin/freeside-adduser
parentb6c28c086832416944440cab39f3bffc9d3dd1f1 (diff)
fix for non-file auth
Diffstat (limited to 'FS/bin/freeside-adduser')
-rw-r--r--FS/bin/freeside-adduser12
1 files changed, 7 insertions, 5 deletions
diff --git a/FS/bin/freeside-adduser b/FS/bin/freeside-adduser
index 7fc5830db..9d424634b 100644
--- a/FS/bin/freeside-adduser
+++ b/FS/bin/freeside-adduser
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#
-# $Id: freeside-adduser,v 1.3 2001-10-30 13:47:07 ivan Exp $
+# $Id: freeside-adduser,v 1.4 2002-02-06 14:58:05 ivan Exp $
use strict;
use vars qw($opt_h $opt_c $opt_s);
@@ -12,10 +12,12 @@ getopts("ch:s:");
die &usage if $opt_c && ! $opt_h;
my $user = shift or die &usage;
-my @args = ( 'htpasswd' );
-push @args, '-c' if $opt_c;
-push @args, $opt_h, $user;
-system(@args) == 0 or die "htpasswd failed: $?";
+if ( $opt_h ) {
+ my @args = ( 'htpasswd' );
+ push @args, '-c' if $opt_c;
+ push @args, $opt_h, $user;
+ system(@args) == 0 or die "htpasswd failed: $?";
+}
my $secretfile = $opt_s || 'secrets';