X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=aap-passwd;h=ac6a7e901d3dd501fa195deb7880f85ea381c247;hb=7838eb5866e3c056824fd57f212c8e5fc4bf8695;hp=69d892dce8f9c758aceb91881c98314e16c22f29;hpb=8443f44e6c18f408210ea542717f8963f8036d0c;p=apache2-authen-passphrase.git diff --git a/aap-passwd b/aap-passwd index 69d892d..ac6a7e9 100644 --- a/aap-passwd +++ b/aap-passwd @@ -9,8 +9,8 @@ use Apache2::Authen::Passphrase qw/pwset USER_REGEX/; use IO::Prompter [qw/-e* -stdio/]; -die "Usage: aap-passwd [rootdir] username\n" if @ARGV == 0 || @ARGV > 1; -($Apache2::Authen::Passphrase::rootdir) = (shift =~ /(.*)/s) if $#ARGV == 1; +die "Usage: aap-passwd [rootdir] username\n" if @ARGV == 0 || @ARGV > 2; +($Apache2::Authen::Passphrase::rootdir) = (shift =~ /(.*)/s) if @ARGV == 2; my $username = shift; die "Invalid username\n" unless $username =~ USER_REGEX;