I made something totally different...
But it works fine, so I'll post it here:
I made my own ppp script, ones that handles most of the preliminary work, for uploading my IP to a certain server.
this file is: /etc/ppp/ip-up-post.local
as the name implyes, it is processed _after_ the connection was established, or was tried (and failed) to be established.
That script is only interesting for my DSL connection, so I added it right after the corresponding command in /etc/sysconfig/network-scripts/ifup-ppp:
Code:
(rest of code)...
# check that xDSL connection
if [ "$TYPE" = "xDSL" ] ; then
if [ -x /sbin/adsl-start -o -x /usr/sbin/adsl-start ] ; then
adsl-start /etc/sysconfig/network-scripts/$CONFIG
# run local scripts, for great justice!
/sbin/runuser - -c /etc/ppp/ip-up-post.local
exit $?
else
logger -p daemon.info -t ifup-ppp \
$"adsl-start does not exist or is not executable for ${DEVICE}"
exit 1
fi
fi
...(rest of code)
works fine!