base-files: implement "reqopts" parameter for dhcp interfaces to specify additional...
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 22 Dec 2010 07:20:24 +0000 (07:20 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 22 Dec 2010 07:20:24 +0000 (07:20 +0000)
SVN-Revision: 24780

package/base-files/Makefile
package/base-files/files/lib/network/config.sh

index d14be1452954445789189ddd85c41fb7b352eae8..01058ba87174319d5d929bafe64a4463e5906612 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=63
+PKG_RELEASE:=64
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
index 2ef8cda9d9d31bbcb97ed66be663e41a5479a2e8..449d252abdc23bb0ea9dd87ff01373b4f0c9bd8c 100755 (executable)
@@ -347,7 +347,7 @@ setup_interface() {
                        local pidfile="/var/run/dhcp-${iface}.pid"
                        service_kill udhcpc "$pidfile"
 
-                       local ipaddr netmask hostname proto1 clientid vendorid broadcast
+                       local ipaddr netmask hostname proto1 clientid vendorid broadcast reqopts
                        config_get ipaddr "$config" ipaddr
                        config_get netmask "$config" netmask
                        config_get hostname "$config" hostname
@@ -355,6 +355,7 @@ setup_interface() {
                        config_get clientid "$config" clientid
                        config_get vendorid "$config" vendorid
                        config_get_bool broadcast "$config" broadcast 0
+                       config_get reqopts "$config" reqopts
 
                        [ -z "$ipaddr" ] || \
                                $DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
@@ -370,6 +371,7 @@ setup_interface() {
                                ${clientid:+-c $clientid} \
                                ${vendorid:+-V $vendorid} \
                                -b -p "$pidfile" $broadcast \
+                               ${reqopts:+-O $reqopts} \
                                ${dhcpopts:- -O rootpath -R &}
                ;;
                none)