]> git.ipfire.org Git - network.git/commitdiff
pppoe: Bring up/down the port before/after pppd is started/stopped.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Jun 2012 11:06:56 +0000 (11:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Jun 2012 11:06:56 +0000 (11:06 +0000)
hooks/zones/pppoe

index fddec9d3e0932c4593943ed9f2e94d6466bc8b63..21f4bd0a5c0188b733f0aa49466d07b96effe5f6 100755 (executable)
@@ -95,6 +95,12 @@ function _up() {
        local zone=${1}
        assert isset zone
 
+       zone_config_read ${zone}
+
+       # Bring up the port.
+       log DEBUG "Bringing up port '${PORT}'."
+       port_up ${PORT}
+
        # Start the ppp daemon.
        pppd_start ${zone}
 
@@ -105,9 +111,15 @@ function _down() {
        local zone=${1}
        assert isset zone
 
+       zone_config_read ${zone}
+
        # Stop the ppp daemon.
        pppd_stop ${zone}
 
+       # Bring down the port.
+       log DEBUG "Bringing down port '${PORT}'."
+       port_down ${PORT}
+
        exit ${EXIT_OK}
 }
 
@@ -193,32 +205,6 @@ function _status() {
        exit ${EXIT_OK}
 }
 
-function _ppp-ip-pre-up() {
-       local zone=${1}
-       assert isset zone
-
-       # Read the configuration.
-       zone_config_read ${zone}
-
-       # Bring up the port.
-       port_up ${PORT}
-
-       ppp_common_pre_ip_up ${zone}
-}
-
-function _ppp-ip-down() {
-       local zone=${1}
-       assert isset zone
-
-       # Read the configuation.
-       zone_config_read ${zone}
-
-       # Bring down the port.
-       port_down ${PORT}
-
-       ppp_common_ip_down ${zone}
-}
-
 function _ppp_write_config() {
        local zone=${1}
        assert isset zone