From a1cee8071f753b80daf374af4bad8458657dd07a Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 18 Apr 2012 03:37:55 +0200 Subject: wibble --- fripost-passwd | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'fripost-passwd') 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 [B<--debug>] [B<--pretend>] [I] +B [B<--verbose>] [B<--debug>] [B<--pretend>] [I] [B<--password=>I] =head1 DESCRIPTION @@ -60,6 +60,10 @@ The default value is read from the configuration file, see B. The root DN for everything done by B. The default value is read from the configuration file, see B. +=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; } -- cgit v1.2.3