On 2020-06-17, Christian Weisgerber <[email protected]> wrote:
> On 2020-06-17, Lévai, Dániel <[email protected]> wrote:
>
>> I'm trying to run a script whenever I get a new IP address from my ISP over 
>> pppoe0. They disconnect me occasionally and the router reconnects then, eg.:
>> /bsd: pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
>> /bsd: pppoe0: received unexpected PADO
>> last message repeated 2 times

This "GENERIC ERROR" is sent by your ISP. Their pppoe server process
is dying for some reason, if you can reach a sysadmin or somebody
useful in their technical support then they might be interested in
looking into that.. 

>> I have this as the last line in /etc/hostname.pppoe0:
>> !/bin/sh /etc/hostname.pppoe0.script pppoe0 0.0.0.1
>>
>> It doesn't seem to be executed when this happens, only when I reboot the 
>> router.
>
> /etc/hostname.* is only executed once when the system starts.
>
> The PPP disconnect/reconnect is handled entirely by pppoe(4)--well,
> sppp(4) really--in the kernel.  There is no callout to the userland
> available.
>
> It may be possible to use ifstated(8) for this.  I haven't tried
> that, but it's where I would start looking.
>
>> Is the culprit here something along the lines of not (re)configuring the 
>> interface with ifconfig up/down (in which case the script would run),
>
> Note that ifconfig down/up will not run /etc/hostname.* either.

If you don't get anywhere with ifstated, you could always run a
script from cron that checks "ifconfig pppoe0" for changes to the
address..


Reply via email to