I have two network interfaces eth0 and eth1 on openSUSE 15.4. While eth1 is static in the air-gapped local network I want to be able to update the server and connect a cable to eth0 for internet access (dhcp).
I then need to delete the default gateway published by dhcp when the cable on eth0 is disconnected.
Therefore I have added a POST_DOWN_SCRIPT variable on ifcfg-eth0.
Unfortunately this script is not triggered when the cable is disconnected but only when using wicked ifdown eth0.
wicked ifstatus eth0 shows no-carrier but state device-up which maybe is the problem here?
Is there any solution to trigger a script when the interface has no-carrier?
I have two network interfaces eth0 and eth1 on openSUSE 15.4. While eth1 is static in the air-gapped local network I want to be able to update the server and connect a cable to eth0 for internet access (dhcp). I then need to delete the default gateway published by dhcp when the cable on eth0 is disconnected. Therefore I have added a POST_DOWN_SCRIPT variable on ifcfg-eth0.
Unfortunately this script is not triggered when the cable is disconnected but only when using
wicked ifdown eth0
.wicked ifstatus eth0
shows no-carrier but state device-up which maybe is the problem here?Is there any solution to trigger a script when the interface has no-carrier?