Please check out
https://github.com/lee-/pppd
I have this version currently running, and it does call the disconnect
script when I pull the plug. However, it needs more work --- maybe I'll
have time next weekend.
PS:
Sep 28 21:43:20 charon pppd[16936]: Plugin rp-pppoe.so loaded.
Sep 28 21:43:21 charon pppd[16937]: pppd 2.4.5 started by root, uid 0
Sep 28 21:43:21 charon pppd[16937]: PPP session is 24310
Sep 28 21:43:21 charon pppd[16937]: Connected to 02:08:f0:9a:33:df via
interface eth3
Sep 28 21:43:21 charon pppd[16937]: Using interface ppp0
Sep 28 21:43:21 charon pppd[16937]: Connect: ppp0 <--> eth3
Sep 28 21:43:21 charon pppd[16937]: CHAP authentication succeeded
Sep 28 21:43:21 charon pppd[16937]: peer from calling number 02:08:F0:9A:33:DF
authorized
Sep 28 21:43:21 charon pppd[16937]: CCP terminated by peer (No compression
negotiated)
Sep 28 21:43:21 charon pppd[16937]: Compression disabled by peer.
Sep 28 21:43:21 charon pppd[16937]: local IP address 185.55.75.245
Sep 28 21:43:21 charon pppd[16937]: remote IP address 192.168.75.1
In the log file, I'm not seeing /etc/ppp/ip-up or ../ip-down started,
either. Those aren't the scripts I'm referring to.
I'm referring to the connect/disconnect scripts as mentioned in man
pppd:
connect script
Usually there is something which needs to be done to pre‐
pare the link before the PPP protocol can be started; for
instance, with a dial-up modem, commands need to be sent to
the modem to dial the appropriate phone number. This
option specifies an command for pppd to execute (by passing
it to a shell) before attempting to start PPP negotiation.
The chat (8) program is often useful here, as it provides a
way to send arbitrary strings to a modem and respond to
received characters. A value for this option from a privi‐
leged source cannot be overridden by a non-privileged user.
disconnect script
Execute the command specified by script, by passing it to a
shell, after pppd has terminated the link. This command
could, for example, issue commands to the modem to cause it
to hang up if hardware modem control signals were not
available. The disconnect script is not run if the modem
has already hung up. A value for this option from a privi‐
leged source cannot be overridden by a non-privileged user.
I have specified my scripts in /etc/ppp/peers/dsl-provider:
# call this script when connecting
connect /etc/ppp/connect-alert.sh
# call this script when disconnecting
disconnect /etc/ppp/disconnect-alert.sh
A dry run of pppd doesn't list these options, even when you specify them
explicitly on the command line.
The version in the git-repo currently has the name of the script
hard-coded, and the script is called.
--
Knowledge is volatile and fluid. Software is power.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]