X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=clients%2Fzyxelng.pl;h=3d029967e80903ec2b6d41c73e1bb019c356eb24;hb=7c8aa8e94cc75dd4952b969c79cb45ddf3dd7985;hp=c3d08fcfa505017c723ceefd606145606b3ba13d;hpb=a78ca3c9628b209500205ad77b333bd656175f34;p=nms diff --git a/clients/zyxelng.pl b/clients/zyxelng.pl index c3d08fc..3d02996 100644 --- a/clients/zyxelng.pl +++ b/clients/zyxelng.pl @@ -16,14 +16,13 @@ use nms qw(switch_connect switch_exec); #nms::ios_close($t); -my $oldip; -my $newip; if ($#ARGV < 1) { - die "Foo $#ARGV"; + die "Not enough arguments to zyxelng.pl $#ARGV"; } -$oldip = $ARGV[0]; -$newip = $ARGV[1]; +my $oldip = $ARGV[0]; +my $newip = $ARGV[1]; +#$switchname = $ARGV[2]; my $one = 0; @@ -32,44 +31,15 @@ my $switchip; #$switchip = "192.168.2.150" if $one; #$switchip = "192.168.1.1" unless $one; $switchip = $oldip; -my $switch = switch_connect($switchip); +my $switch = switch_connect($switchip) + or die "Could not connect to $switchip"; my $cmds1 = <