ispman/bin ispman.passwd.user,1.3,1.4

Pedro Algarvio <[email protected]> Mon, 02 Oct 2006 19:48:24 +0000
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3354/bin

Modified Files:
	ispman.passwd.user 
Log Message:
Now more consistent with the other cli tools, removed getopt, and also check if first arg is a valid user@domain


Index: ispman.passwd.user
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.passwd.user,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ispman.passwd.user	30 May 2004 23:35:32 -0000	1.3
+++ ispman.passwd.user	2 Oct 2006 19:48:22 -0000	1.4
@@ -4,9 +4,7 @@
     use FindBin;
     unshift @INC,
       ( $FindBin::Bin, "$FindBin::Bin/../lib", "$FindBin::Bin/../conf" );
-    use Getopt::Std;
-    getopts( 'h:', \%opts );
-    if ( $opts{'h'} || !$ARGV[1] ) {
+    unless ( $ARGV[0] && $ARGV[0] =~ m/\w+@\w+\..*/ && ARGV[1] ) {
         print "Usage: $FindBin::Script user\@domain new_password\n\n";
         print "Examples:\n";
         print "----------\n";


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV