automatically configure switches when swconfig is installed

SVN-Revision: 15328
v19.07.3_mercusys_ac12_duma
Felix Fietkau 15 years ago
parent 6d782f93d8
commit 8bd7b4bb6b

@ -38,8 +38,9 @@ define Build/Compile
endef
define Package/swconfig/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_DIR) $(1)/bin $(1)/lib/network
$(INSTALL_BIN) $(PKG_BUILD_DIR)/swconfig $(1)/bin/swconfig
$(INSTALL_DATA) ./files/switch.sh $(1)/lib/network/
endef
$(eval $(call BuildPackage,swconfig))

@ -0,0 +1,11 @@
#!/bin/sh
# Copyright (C) 2009 OpenWrt.org
setup_switch_dev() {
swconfig dev "$1" load network
}
setup_switch() {
config_load network
config_foreach setup_switch_dev switch
}
Loading…
Cancel
Save