File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ def defaultgateway= newvalue
125125
126126 def gwcostmetric
127127 enum_netconn do |netconnectionid |
128- gwcm = netconnectionid . gatewaycostmetric . to_s
128+ gwcm = ( netconnectionid . gatewaycostmetric ) . join ( ',' )
129129 return gwcm
130130 end
131131 end
@@ -232,4 +232,4 @@ def destroy
232232 netconnectionid . enabledhcp ( )
233233 end
234234 end
235- end
235+ end
Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ def setgateways(adapter,gateways_hash={})
4646 oMethod = adapter . Methods_ ( "SetGateways" )
4747 oInParam = oMethod . InParameters . SpawnInstance_ ( )
4848 oInParam . DefaultIPGateway = gateways_hash [ :defaultgateway ]
49- oInParam . GatewayCostMetric = gateways_hash [ :gwcostmetric ] . to_a
49+ gwcms ||= Array . new
50+ gwcms << gateways_hash [ :gwcostmetric ]
51+ oInParam . GatewayCostMetric = gwcms
5052 oOutParam = adapter . ExecMethod_ ( "SetGateways" , oInParam )
5153 end
5254
@@ -94,4 +96,4 @@ def settcpipnetbios(adapter,netbios_hash={})
9496 oInParam . TcpipNetbiosOptions = netbiosflag . to_s
9597 oOutParam = adapter . ExecMethod_ ( "SetTCPIPNetBIOS" , oInParam )
9698 end
97- end
99+ end
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ def valid_v4?(addr)
2929
3030 newproperty ( :gwcostmetric ) do
3131 desc 'Gateways cost metric'
32- defaultto 256
3332 end
3433
3534 newproperty ( :dnsdomainsuffixsearchorder , :array_matching => :all ) do
@@ -59,4 +58,4 @@ def valid_v4?(addr)
5958 desc 'DNS Server List'
6059 end
6160
62- end
61+ end
You can’t perform that action at this time.
0 commit comments