summaryrefslogtreecommitdiffstats
path: root/etc/inc/system.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r--etc/inc/system.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 212c3dc..5e4910e 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -191,9 +191,15 @@ function system_routing_configure() {
}
foreach ($config['staticroutes']['route'] as $rtent) {
- mwexec("/sbin/route add " . escapeshellarg($rtent['network']) .
- " " . escapeshellarg($rtent['gateway']));
-
+ if(isset($rtent['interfacegateway'])) {
+ echo "/sbin/route add " . escapeshellarg($rtent['network']) .
+ " -iface " . escapeshellarg(convert_friendly_interface_to_real_interface_name($rtent['interface']));
+ mwexec("/sbin/route add " . escapeshellarg($rtent['network']) .
+ " -iface " . escapeshellarg(convert_friendly_interface_to_real_interface_name($rtent['interface'])));
+ } else {
+ mwexec("/sbin/route add " . escapeshellarg($rtent['network']) .
+ " " . escapeshellarg($rtent['gateway']));
+ }
/* record route so it can be easily removed later (if necessary) */
fwrite($fd, $rtent['network'] . "\n");
}
OpenPOWER on IntegriCloud