]> git.sesse.net Git - nms/blobdiff - clients/zyxelng.pl
Error handling.
[nms] / clients / zyxelng.pl
index c3d08fcfa505017c723ceefd606145606b3ba13d..05bf471421368048734ff9a1aabfe9ff5acc27a2 100644 (file)
@@ -33,6 +33,7 @@ my $switchip;
 #$switchip = "192.168.1.1" unless $one;
 $switchip = $oldip;
 my $switch = switch_connect($switchip);
+       or die "Could not connect to $switchip";
 
 my $cmds1 = <<EOF
 sys hostname es-3024
@@ -78,7 +79,7 @@ foreach (split(/\n+/, $cmds1)) {
 my $cmd;
 #$cmd = "ip ifconfig swif0 192.168.1.1/24" if $one;
 #$cmd = "ip ifconfig swif0 192.168.2.150/24" unless $one;
-$cmd = "ip ifconfig swif0 $newip/24";
+$cmd = "ip ifconfig swif0 $newip/30";
 
 print "Sending '$cmd'\n";
 my $pid = fork();