interfaces: add logging to PPP link scripts to check for overlap

Currently we neither see when we spawn a new mpd5 daemon nor when
the PPPoE starts or stops working or if there is any overlap.
This commit is contained in:
Franco Fichtner 2024-08-22 14:36:09 +02:00
parent 65a8435df8
commit 7ce814346b
2 changed files with 3 additions and 3 deletions

View File

@ -4,10 +4,8 @@ export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
IF="${1}"
AF="${2}"
IP="${3}"
GW=
DEFAULTGW=$(route -n get -${AF} default | grep gateway: | awk '{print $2}')
/usr/bin/logger -t ppp "ppp-linkdown: executing on ${1} for ${2}"
ngctl shutdown ${IF}:

View File

@ -18,6 +18,8 @@ if [ -n "${4}" ]; then
ROUTER="-a $(echo ${4} | cut -d% -f1)"
fi
/usr/bin/logger -t ppp "ppp-linkup: executing on ${1} for ${2}"
if [ "${2}" = "inet" ]; then
/usr/local/sbin/ifctl -i ${1} -4nd ${DNS1} ${DNS2}
/usr/local/sbin/ifctl -i ${1} -4rd ${ROUTER}