From 6a30f701e27f1651917639455df59dbbbead65af Mon Sep 17 00:00:00 2001 From: gnhb Date: Fri, 13 Aug 2010 21:32:06 +0700 Subject: Expose MRRU settings in the GUI for PPPoE (MLPPP). --- etc/inc/interfaces.inc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'etc') diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index afb8495..a3b163e 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1295,6 +1295,12 @@ EOD; EOD; + if (!empty($mrrus[$pid])) + $mpdconf .= << Date: Fri, 13 Aug 2010 21:54:14 +0700 Subject: If mpd.conf files exists in the /conf directory, link to it instead of generating a new one from config.xml data. This allows power users to tweak mpd conf to their delight, and gives devs a way of testing out conf tweaks without needing to alter php code. --- etc/inc/interfaces.inc | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'etc') diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index a3b163e..97503b8 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1107,13 +1107,6 @@ function interface_ppps_configure($interface) { break; } } - - /* generate mpd.conf */ - $fd = fopen("{$g['varetc_path']}/mpd_{$interface}.conf", "w"); - if (!$fd) { - log_error("Error: cannot open mpd_{$interface}.conf in interface_ppps_configure().\n"); - return 0; - } if (is_array($ports) && count($ports) > 1) $multilink = "enable"; @@ -1368,9 +1361,20 @@ EOD; $mpdconf .= "\topen\r\n"; } //end foreach($port) - // Write out mpd_ppp.conf - fwrite($fd, $mpdconf); - fclose($fd); + + /* Generate mpd.conf. If mpd_[interface].conf exists in the conf path, then link to it instead of generating a fresh conf file. */ + if (file_exists("{$g['conf_path']}/mpd_{$interface}.conf")) + mwexec("/bin/ln -s {$g['conf_path']}/mpd_{$interface}.conf {$g['varetc_path']}/."); + else { + $fd = fopen("{$g['varetc_path']}/mpd_{$interface}.conf", "w"); + if (!$fd) { + log_error("Error: cannot open mpd_{$interface}.conf in interface_ppps_configure().\n"); + return 0; + } + // Write out mpd_ppp.conf + fwrite($fd, $mpdconf); + fclose($fd); + } // Create the uptime log if requested and if it doesn't exist already, or delete it if it is no longer requested. if (isset($ppp['uptime'])) { -- cgit v1.1 From 1f1fc944bc43a1c78871bee95a8720a7b02bcb20 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Fri, 13 Aug 2010 13:02:18 -0400 Subject: fix text --- etc/phpshellsessions/gitsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync index 5e2aead..09cb670 100644 --- a/etc/phpshellsessions/gitsync +++ b/etc/phpshellsessions/gitsync @@ -21,7 +21,7 @@ global $command_split; unlink_if_exists("/tmp/config.cache"); if(!file_exists("/usr/local/bin/git")) { - echo "Cannot find git, fetching static git..."; + echo "Cannot find git, fetching..."; system("pkg_add -r git"); } -- cgit v1.1