aboutsummaryrefslogtreecommitdiffstats
path: root/fripost-passwd
diff options
context:
space:
mode:
Diffstat (limited to 'fripost-passwd')
-rwxr-xr-xfripost-passwd11
1 files changed, 9 insertions, 2 deletions
diff --git a/fripost-passwd b/fripost-passwd
index 9ae47d9..d6abe3f 100755
--- a/fripost-passwd
+++ b/fripost-passwd
@@ -10,7 +10,7 @@ fripost-passwd - Change password of user
=head1 SYNOPSIS
-B<fripost-passwd> [B<--debug>] [B<--pretend>] [I<username>]
+B<fripost-passwd> [B<--verbose>] [B<--debug>] [B<--pretend>] [I<username>]
[B<--password=>I<password>]
=head1 DESCRIPTION
@@ -60,6 +60,10 @@ The default value is read from the configuration file, see B<CONFIGURATION>.
The root DN for everything done by B<fripost-passwd>.
The default value is read from the configuration file, see B<CONFIGURATION>.
+=item B<-v>, B<--verbose>
+
+Verbose mode.
+
=item B<--debug>
Debug mode.
@@ -120,11 +124,14 @@ GetOptions(
'bind_pw=s' => \$conf->{bind_pw},
'pretend' => \$conf->{pretend},
'debug' => \$conf->{debug},
+ 'v|verbose' => \$conf->{verbose},
'password=s' => \$conf->{password},
'man' => sub { pod2usage(-exitstatus => 0,
-verbose => 2) }
) or pod2usage(2);
+sub vsay { say STDERR @_ if $conf->{verbose} || $conf->{debug}; }
+
# Connect to the LDAP server
my $ldap = Fripost::Schema->new( $conf );
@@ -149,7 +156,7 @@ die "Error: Unknown user `" .$username. "'.\n"
if ($conf->{pretend}) {
- say "Nothing to do since we are pretending...";
+ vsay "Nothing to do since we are pretending...";
exit 0;
}