diff --git a/.update/patches b/.update/patches index 350034c2b7..d33f4e80ac 100755 --- a/.update/patches +++ b/.update/patches @@ -1988,9 +1988,8 @@ _EOF_ # NanoPi R6S/R6C elif (( $G_HW_MODEL == 79 )) && ! dpkg-query -s 'firmware-nanopi6' &> /dev/null then - local model='R6S' - [[ $( /dev/null && model='R6C' - if [[ $model == 'R6S' ]] + read -r model < /proc/device-tree/model + if [[ $model == *'R6S'* ]] then G_DIETPI-NOTIFY 2 'Updating udev rule for NanoPi R6S Ethernet LEDs' G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' @@ -1999,7 +1998,7 @@ SUBSYSTEM=="leds", KERNEL=="lan2_led", ACTION=="add", ATTR{trigger}="netdev", AT SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1" SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth2", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1" _EOF_ - elif [[ $model == 'R6C' ]] + elif [[ $model == *'R6C'* ]] then G_DIETPI-NOTIFY 2 'Updating udev rule for NanoPi R6C Ethernet LEDs' G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf'