Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 2539

Raspberry Pi OS • And again - something takes eth0 down before I have a chance to stop using it.

$
0
0
I have a bunch of services I have created.

One of them periodically pings a remote server over Ethernet, and goes into panic mode when the ping fails, starting up a modem to get alternative access to the world.

If I simply walk up to the computer and do 'shutdown -r now'

I find that within seconds something has removed eth0 .

Of course the netx ping fails and we go through the panic sequence.

Now I WILL get around to killing that script, but it has to be done in order, and that takes longer than a few seconds.

So my first question is - who did it? I assume it's yet another systemd cleverness, where because I haven't told it that the service in control of the pinging NEEDS eth0, it thinks it is at liberty to chop it off and bin it as soon shutdown starts.

Now of course I can add complication to my scripts where they do

Code:

systemctl 'is-system-running'
and or

Code:

ifconfig | grep eth0
at regular intervals, and freeze into immobility if either is unsatisfactory.

But that's very contingent messy programming.

What I'd like to do it tell whatever is downing my i/f to go to hell (politely).

Does anyone know enough systemd to locate the culprit and suggest how to tie its hands?

Thanks as ever.

D.

Statistics: Posted by myshkin-uk — Tue Feb 13, 2024 2:38 pm



Viewing all articles
Browse latest Browse all 2539

Trending Articles