From 5ef15008d61780a072ed4dcdfdb1d0e0035c1c9c Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Thu, 26 Oct 2006 05:01:47 +0000 Subject: move routed package to it's own directory --- packages/routed.inc | 110 ---------------------------------------------------- 1 file changed, 110 deletions(-) delete mode 100644 packages/routed.inc (limited to 'packages/routed.inc') diff --git a/packages/routed.inc b/packages/routed.inc deleted file mode 100644 index 59967e8c..00000000 --- a/packages/routed.inc +++ /dev/null @@ -1,110 +0,0 @@ - $ifname) { - if (in_array($ifname, $ifarr)) { - $gw .= setup_etc_gateways($ifname, 'enable'); - } else { - $gw .= setup_etc_gateways($ifname, 'disable'); - } - } - } else { - /* setup for all interfaces */ - $gw = setup_etc_gateways(); - } - $fd = fopen("/etc/gateways", "w"); - fwrite($fd, $gw); - fclose($fd); - restart_routed(); - } else { - stop_routed(); - } -} - -function setup_etc_gateways($iface="", $mode="") { - global $config; - - if ($iface != "") { - $realif=convert_friendly_interface_to_real_interface_name(strtoupper($iface)); - $ret = "if={$realif} "; - } - - switch($mode) { - case "enable": - if ($config['installedpackages']['routed']['config'][0]['ripversion'] == "2") { - $ret .= "ripv2 "; - $passwd = $config['installedpackages']['routed']['config'][0]['passwd']; - if ($passwd != "") { - $ret .= "passwd={$passwd} "; - } - } - break; - case "disable": - $ret .= "no_rip "; - break; - - default: - break; - - } - $ret .= "\n"; - - return $ret; -} - -function start_routed() { - mwexec("/sbin/routed"); -} - -function stop_routed() { - mwexec("killall routed"); -} - -function restart_routed() { - stop_routed(); - start_routed(); -} - -?> -- cgit v1.2.3