Skip to content

Commit

Permalink
v9.8
Browse files Browse the repository at this point in the history
- DietPi-Patches | Fix NanoPi R6S vs NanoPC T6 detection
  • Loading branch information
MichaIng committed Oct 17, 2024
1 parent 5af8a85 commit 96a9f91
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -1988,9 +1988,8 @@ _EOF_
# NanoPi R6S/R6C
elif (( $G_HW_MODEL == 79 )) && ! dpkg-query -s 'firmware-nanopi6' &> /dev/null
then
local model='R6S'
[[ $(</proc/device-tree/model) == *'R6C'* ]] 2> /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'
Expand All @@ -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'
Expand Down

0 comments on commit 96a9f91

Please sign in to comment.