gluon-config-mode: add sysconfig option for config interface(s), default to WAN on nanostation-m
This commit is contained in:
parent
49700fc70d
commit
cd30517ec1
@ -35,7 +35,7 @@ setup_network() {
|
|||||||
config_foreach delete_interface interface
|
config_foreach delete_interface interface
|
||||||
|
|
||||||
uci_add network interface config
|
uci_add network interface config
|
||||||
uci_set network config ifname "$(sysconfig lan_ifname || sysconfig wan_ifname)"
|
uci_set network config ifname "$(sysconfig config_ifname)"
|
||||||
uci_set network config type 'bridge'
|
uci_set network config type 'bridge'
|
||||||
uci_set network config proto 'static'
|
uci_set network config proto 'static'
|
||||||
uci_set network config ipaddr "$CONFIG_MODE_ADDR"
|
uci_set network config ipaddr "$CONFIG_MODE_ADDR"
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /lib/gluon/functions/sysconfig.sh
|
||||||
|
. /lib/ar71xx.sh
|
||||||
|
|
||||||
|
|
||||||
|
sysconfig_isset config_ifname && exit 0
|
||||||
|
|
||||||
|
|
||||||
|
case "$(ar71xx_board_name)" in
|
||||||
|
nanostation-m)
|
||||||
|
sysconfig_set config_ifname "$(sysconfig wan_ifname || sysconfig lan_ifname)"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
sysconfig_set config_ifname "$(sysconfig lan_ifname || sysconfig wan_ifname)"
|
||||||
|
;;
|
||||||
|
esac
|
Loading…
Reference in New Issue
Block a user