ugreenleds-driver.plg aktualisiert
This commit is contained in:
@@ -141,7 +141,10 @@ if ! pidof -f "/usr/bin/ugreen-leds" >/dev/null 2>&1 ; then
|
||||
fi
|
||||
|
||||
# Get interface from network config and check if netdevmon is already configured
|
||||
INTERFACE="$(cat /boot/config/network.cfg | grep "IFNAME\[0\]" | cut -d '=' -f2 | sed 's/\"//g')"
|
||||
INTERFACE="$(cat /boot/config/network.cfg | grep "IFNAME\[0\]" | cut -d '=' -f2 | sed 's/\"//g' | head -1 | tr -d '[:space:]')"
|
||||
if [[ $INTERFACE =~ ^br ]]; then
|
||||
INTERFACE="$(ip -o link show master $INTERFACE | awk '{print $2}' | sed 's/://' | grep -o 'eth[0-9]\+' | head -1 | tr -d '[:space:]')"
|
||||
fi
|
||||
if [ "$(cat /sys/class/leds/netdev/device_name)" != "${INTERFACE}" ]; then
|
||||
netdevmon
|
||||
fi
|
||||
|
Reference in New Issue
Block a user