Skip to content

Commit

Permalink
Add all devive to lan
Browse files Browse the repository at this point in the history
  • Loading branch information
EkkoG committed May 10, 2024
1 parent facfb3f commit 6dc83b6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

default_modules="add-feed-key add-feed ib argon base network opkg-mirror prefer-ipv6-settings statistics system tools"
default_modules="add-all-device-to-lan add-feed-key add-feed ib argon base network opkg-mirror prefer-ipv6-settings statistics system tools"

echo "Default modules: $default_modules"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
wan_device=$(uci get network.wan.device)
all_devices=$(ip link show | grep -o "eth[0-9]\+")
all_devices=$(echo $all_devices | sed "s/$wan_device//g")

uci delete network.@device[0].ports

for device in $all_devices; do
uci add_list network.@device[0].ports=$device
done

uci commit network
/etc/init.d/network restart

0 comments on commit 6dc83b6

Please sign in to comment.