|
@@ -135,43 +135,41 @@ if { $config != {} } {
|
|
|
error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
- if { [regexp {C3750X} $pid] } {
|
|
|
+ if { [catch {cli_exec $cli(fd) "config t"} result] } {
|
|
|
+ error $result $errorInfo
|
|
|
+ }
|
|
|
+
|
|
|
+ if { [catch {cli_exec $cli(fd) "sdm prefer vlan"} result] } {
|
|
|
+ error $result $errorInfo
|
|
|
+ }
|
|
|
+
|
|
|
+ if { [catch {cli_exec $cli(fd) "end"} result] } {
|
|
|
+ error $result $errorInfo
|
|
|
+ }
|
|
|
+
|
|
|
+ if { [catch {cli_exec $cli(fd) "show switch | inc ^\\*"} result] } {
|
|
|
+ error $result $errorInfo
|
|
|
+ }
|
|
|
+
|
|
|
+ if { [regexp {\*([2-9])} $result -> swn] } {
|
|
|
if { [catch {cli_exec $cli(fd) "config t"} result] } {
|
|
|
error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
- if { [catch {cli_exec $cli(fd) "sdm prefer vlan"} result] } {
|
|
|
+ if { [catch {cli_write $cli(fd) "switch $swn renumber 1"} result] } {
|
|
|
error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
- if { [catch {cli_exec $cli(fd) "end"} result] } {
|
|
|
+ if { [catch {cli_read_pattern $cli(fd) "confirm"} result] } {
|
|
|
error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
- if { [catch {cli_exec $cli(fd) "show switch | inc ^\\*"} result] } {
|
|
|
+ if { [catch {cli_exec $cli(fd) "\r"} result] } {
|
|
|
error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
- if { [regexp {\*([2-9])} $result -> swn] } {
|
|
|
- if { [catch {cli_exec $cli(fd) "config t"} result] } {
|
|
|
- error $result $errorInfo
|
|
|
- }
|
|
|
-
|
|
|
- if { [catch {cli_write $cli(fd) "switch $swn renumber 1"} result] } {
|
|
|
- error $result $errorInfo
|
|
|
- }
|
|
|
-
|
|
|
- if { [catch {cli_read_pattern $cli(fd) "confirm"} result] } {
|
|
|
- error $result $errorInfo
|
|
|
- }
|
|
|
-
|
|
|
- if { [catch {cli_exec $cli(fd) "\r"} result] } {
|
|
|
- error $result $errorInfo
|
|
|
- }
|
|
|
-
|
|
|
- if { [catch {cli_exec $cli(fd) "end"} result] } {
|
|
|
- error $result $errorInfo
|
|
|
- }
|
|
|
+ if { [catch {cli_exec $cli(fd) "end"} result] } {
|
|
|
+ error $result $errorInfo
|
|
|
}
|
|
|
}
|
|
|
|