summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@G5.local>2009-10-26 00:25:44 -0400
committerScott Ullrich <sullrich@G5.local>2009-10-26 00:25:44 -0400
commit36bf235ee5e73ceb33ea31e1a30fa3d11e18b30a (patch)
treef7faf216798eacefcc9c133e1fea4d3e8f6c49d8
parentbb26581c50dc3a49b43b13360340a0d1be625254 (diff)
downloadpfsense-36bf235ee5e73ceb33ea31e1a30fa3d11e18b30a.zip
pfsense-36bf235ee5e73ceb33ea31e1a30fa3d11e18b30a.tar.gz
Add and use ppp-script
-rw-r--r--etc/inc/interfaces.inc12
-rwxr-xr-xsbin/ppp-script3
2 files changed, 10 insertions, 5 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index c22d97c..7dae9a0 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -898,7 +898,10 @@ function interface_ppp_configure($ifcfg) {
// Loop variables
$i = 0;
$startingip = 1;
-
+
+ // Start ppp.linkup file
+ $rclinkup = "default:\n";
+
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
foreach ($config['ppps']['ppp'] as $ppp) {
$dev = substr($ppp['port'], 5);
@@ -923,13 +926,12 @@ function interface_ppp_configure($ifcfg) {
$peerfile .= "\n";
$i++;
$startingip++;
+ $rclinkup.= "{$dev}:\n";
+ $rclinkup.= " ! sh -c \"/sbin/ppp-script HISADDR INTERFACE\"\n";
+ $rclinkup.= " ! sh -c \"/etc/rc.linkup INTERFACE start\"\n";
}
}
- $rclinkup = "default:\n";
- $rclinkup.= "! sh -c \"echo HISADDR > /tmp/INTERFACE_router\"\n";
- $rclinkup.= "! sh -c \"/etc/rc.linkup INTERFACE start\"\n";
-
// Write out configuration for ppp.conf
file_put_contents("/etc/ppp/ppp.conf", $peerfile);
diff --git a/sbin/ppp-script b/sbin/ppp-script
new file mode 100755
index 0000000..977dbf2
--- /dev/null
+++ b/sbin/ppp-script
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo $1 > /tmp/${2}_router
OpenPOWER on IntegriCloud