]>
git.ipfire.org Git - people/stevee/network.git/blob - ppp/ip-updown
9c1ac7e1d1a6a82b0cce0acb27c03a1d16d169d7
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2010 Michael Tremer & Christian Schmidt #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
22 LOG_FACILITY
=$
(basename ${0})
26 PPP_VARIABLES
="IFNAME IPLOCAL IPREMOTE DNS1 DNS2 MACREMOTE LLLOCAL LLREMOTE"
28 # Give the variables we get passed by pppd an own namespace
29 for i
in ${PPP_VARIABLES}; do
34 .
/usr
/lib
/network
/functions
37 for i
in ${PPP_VARIABLES}; do
39 log DEBUG
" ${i} = ${!i}"
45 # If the given device is a known zone, we will call the required
46 # hook methods. If we don't know about any zone with name ${ZONE},
49 if isset ZONE
&& zone_exists
${ZONE}; then
50 HOOK
=$
(zone_get_hook
${ZONE})
53 assert hook_zone_exists
${HOOK}
55 PROGNAME
=$
(basename ${0})
59 METHOD
="ppp_ip_pre_up"
62 METHOD
="ppp_ipv6_down"
68 METHOD
="ppp_ipv4_down"
76 log DEBUG
"${PROGNAME}/${METHOD} was called with the following parameters:"
79 hook_zone_exec
"${HOOK}" "${METHOD}" "${ZONE}"