dnsmasq: enable pxe-prompt, pxe-service config options
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 13 Mar 2015 08:39:08 +0000 (08:39 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 13 Mar 2015 08:39:08 +0000 (08:39 +0000)
DNSMASQ has the ability to provide a menu to a pxeboot system, using
the --pxe-prompt and --pxe-service configuration options.  The current
init.d script converting the "dhcp" file to "dnsmasq.conf" does not
find these options, but they are supported.  This patch thus enables
the options.

Signed-off-by: Derek LaHousse <dlahouss@mtu.edu>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44747 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/network/services/dnsmasq/files/dnsmasq.init

index fb118d5..a0197ef 100644 (file)
@@ -107,6 +107,10 @@ append_bogusnxdomain() {
        xappend "--bogus-nxdomain=$1"
 }
 
+append_pxe_service() {
+       xappend "--pxe-service=$1"
+}
+
 dnsmasq() {
        local cfg="$1"
        append_bool "$cfg" authoritative "--dhcp-authoritative"
@@ -151,7 +155,8 @@ dnsmasq() {
        append_parm "$cfg" "tftp_root" "--tftp-root"
        append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
        append_parm "$cfg" "local_ttl" "--local-ttl"
-
+       append_parm "$cfg" "pxe_prompt" "--pxe-prompt"
+       config_list_foreach "$cfg" "pxe_service" append_pxe_service
        config_get DOMAIN "$cfg" domain
 
        config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1