+#print "Reconnecting... ";
+##$switchip = "192.168.1.1" if $one;
+##$switchip = "192.168.2.150" unless $one;
+#$switchip = $newip;
+#autoflush STDOUT 1;
+#print "Connecting to: $switchip...\n";
+#my $i = 1;
+#while(1) {
+# $switch = switch_connect($switchip);
+#
+# #print (defined($switch)? $switch : "foo") ." <---- switch\n";
+# if (defined($switch) || $switch) {
+# last;
+# }
+# printf("Waited $i seconds...\r");
+# $i++;
+# sleep 1;
+#}
+#print "\n";
+
+#print $switch."\n";
+#$cmd = "sys sw vlan1q svlan cpu 248";
+#print "Sending '$cmd'\n";