Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)
Paste
Pasted as Plain Text by registered user geekatcmu ( 16 years ago )
$thirdoctet = inline_template("<%= cprt_defaultroute.split('.')[2]%>")
if $thirdoctet == "48" {
notice("bad default route $cprt_defaultroute")
$cmd = inline_template("<%=
require 'ipaddr'
nics = scope.to_hash.keys.map {|key| key if key.count('_') == 1 and key.match(/network_/) and not key[-1].chr == '0'}.compact
if nics.length > 0
network = scope.lookupvar(nics[0])
nmname = scope.lookupvar(nics[0].sub('network_','netmask_'))
ip = IPAddr.new("#{network}/#{nmname}").succ.to_s
"route add default #{ip} && route delete default $cprt_defaultroute && echo #{ip} > /etc/defaultrouter"
else
'true'
end
%>")
Revise this Paste