summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-08-13 14:43:25 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-08-13 14:43:25 -0300
commit0ac1dafd6f10171941ec1c5d9ac33268d655aef2 (patch)
treed7880cc1f6e173a4be104dafe4de02c43c0595a1 /etc
parent6c83f226396e6d95caf5265c715497e6652666e9 (diff)
parent7d04e4ac60bb6844971e45116a9f4ec936006290 (diff)
downloadpfsense-0ac1dafd6f10171941ec1c5d9ac33268d655aef2.zip
pfsense-0ac1dafd6f10171941ec1c5d9ac33268d655aef2.tar.gz
Merge remote branch 'mainline/master' into js
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc30
-rw-r--r--etc/phpshellsessions/gitsync2
2 files changed, 21 insertions, 11 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index afb8495..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";
@@ -1295,6 +1288,12 @@ EOD;
EOD;
+ if (!empty($mrrus[$pid]))
+ $mpdconf .= <<<EOD
+ set link mrru {$mrrus[$pid]}
+
+EOD;
+
$mpdconf .= <<<EOD
set auth authname "{$ppp['username']}"
set auth password {$passwd}
@@ -1362,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'])) {
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");
}
OpenPOWER on IntegriCloud