mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
automatically configure switches when swconfig is installed
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15328 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -38,8 +38,9 @@ define Build/Compile
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/swconfig/install
|
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_BIN) $(PKG_BUILD_DIR)/swconfig $(1)/bin/swconfig
|
||||||
|
$(INSTALL_DATA) ./files/switch.sh $(1)/lib/network/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,swconfig))
|
$(eval $(call BuildPackage,swconfig))
|
||||||
|
|||||||
11
package/swconfig/files/switch.sh
Normal file
11
package/swconfig/files/switch.sh
Normal file
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user