From 06008e59a1dfbda99eace3d5e66d194b7e8e5c38 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 4 May 2012 09:02:59 +0200 Subject: Adding a flag --force --- fripost-searchalias | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fripost-searchalias') diff --git a/fripost-searchalias b/fripost-searchalias index 2e5d35f..1c674fe 100755 --- a/fripost-searchalias +++ b/fripost-searchalias @@ -17,8 +17,8 @@ B [B<--debug>] [I [I]] B list virtual aliases matching exactly I, targetting to I. -Wildcards I<*> can appear in I or I, to match zero or more -characters. +Wildcards I<*> can appear in the login part of I, to match zero +or more characters. If no I is given, list all aliases whose target matches I. If neither I nor I are given, B list all existing virtual aliases. @@ -115,8 +115,8 @@ GetOptions( my $ldap = Fripost::Schema->new( $conf ); my %alias; -$alias{goto} = $ARGV[0] if defined $ARGV[0]; -$alias{address} = $ARGV[1] if defined $ARGV[1]; +$alias{goto} = $ARGV[0] if (defined $ARGV[0]) and $ARGV[0] ne ''; +$alias{address} = $ARGV[1] if (defined $ARGV[1]) and $ARGV[1] ne ''; if (defined $alias{address}) { my ($u,$d) = split /\@/, $alias{address}, 2; -- cgit v1.2.3