added command-line options for debug and timeout
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 3 Jan 2010 20:00:05 +0000 (20:00 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 3 Jan 2010 20:00:05 +0000 (20:00 +0000)
bin/smclp.pl

index c4c3d19..2d9c7f8 100755 (executable)
@@ -9,10 +9,16 @@ use Data::Dump qw/dump/;
 
 use Net::OpenSSH;
 use Expect;
+use Getopt::Long;
 
 my $debug = 0;
 my $timeout = 5;
 
+GetOptions(
+       'debug!' => \$debug,
+       'timeout=i' => \$timeout,
+) or die $!;
+
 my ( $uri, $command, $path ) = @ARGV;
 die "usage: $0 login:passwd\@host show /system1\n" unless $uri && $command;