Fix route specifing error.

lvmraid
Mike Hiretsky 13 years ago
parent b29c10db8c
commit c2eb37fac5

Binary file not shown.

@ -1159,7 +1159,8 @@ class cl_install(color_print, SignalInterrupt):
map(lambda x:x[NET],routes)+map(lambda x:x[NET],routedata))
routes = filter(lambda x:x[GW] or x[SRC],routes)
wrongGws = map(lambda x:x[GW],
filter(lambda x:not ip.isIpInNet(x[GW],*nets),
filter(lambda x:not ip.isIpInNet(x[GW],
*(set(nets)-set([x[NET]]))),
filter(lambda x:x[GW],
routes)))
if wrongGws:
@ -1176,7 +1177,12 @@ class cl_install(color_print, SignalInterrupt):
if not dev:
gwnetwork = ip.isIpInNet(gw,*nets)[0]
dev = filter(lambda x:x[NET]==gwnetwork,
routedata+newroutes)[0][DEV]
routedata+newroutes)
if not dev:
raise InstallError(
_("Can not determine device for network %s")%
network)
dev = dev[0][DEV]
if not gw and not src:
continue
newroutes.append((network,gw,dev,src))

Loading…
Cancel
Save