From: Michael Tremer Date: Fri, 22 Jun 2012 11:06:56 +0000 (+0000) Subject: pppoe: Bring up/down the port before/after pppd is started/stopped. X-Git-Tag: 004~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2044f5913b7a8f7ccf61b605f5d75f0df6cc2b10;p=network.git pppoe: Bring up/down the port before/after pppd is started/stopped. --- diff --git a/hooks/zones/pppoe b/hooks/zones/pppoe index fddec9d3..21f4bd0a 100755 --- a/hooks/zones/pppoe +++ b/hooks/zones/pppoe @@ -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