aboutsummaryrefslogtreecommitdiffstats
path: root/fripost-passwd
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@fripost.org>2012-04-18 03:37:55 +0200
committerGuilhem Moulin <guilhem.moulin@fripost.org>2012-04-18 03:37:55 +0200
commita1cee8071f753b80daf374af4bad8458657dd07a (patch)
tree30a851174b98af3b3e3c87546af8a66f445d8e2b /fripost-passwd
parent7b2df0cb8d29ba835be5d645f8b4f70b74b2fcc4 (diff)
wibble
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;
}