Hi,
I placed a script in both /etc/hotplug.d/iface
and /etc/hotplug.d/net
dirs.
Neither script is being called when I unplug and re-plug my ethernet cable into eth0
But I do see kernel and netifd messages for when eth0 is being unplugged and plugged in the log
Tue Oct 17 12:11:22 2017 kern.info kernel: [ 156.304917] eth0: link up (1000Mbps/Full duplex)
Tue Oct 17 12:11:22 2017 daemon.notice netifd: Network device 'eth0' link is up
Tue Oct 17 12:11:24 2017 kern.info kernel: [ 158.313012] br-lan: port 1(eth0) entered forwarding state
Tue Oct 17 12:12:06 2017 kern.info kernel: [ 200.302308] eth0: link down
Tue Oct 17 12:12:06 2017 kern.info kernel: [ 200.305481] br-lan: port 1(eth0) entered disabled state
Tue Oct 17 12:12:06 2017 daemon.notice netifd: Network device 'eth0' link is down
my basic test script
root@LEDE:/etc/hotplug.d/iface# cat 99-my-action
#!/bin/sh
logger test--test Device: $DEVICE / Action: $ACTION
Above script is being called ONLY on boot and I see this message:
user.notice root: test--test Device: br-lan / Action: ifup
Any advice?
Thanks