discover: Use pxeconffile for udhcpc option name
authorJeremy Kerr <jk@ozlabs.org>
Tue, 19 Nov 2013 04:25:43 +0000 (15:25 +1100)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 22 Nov 2013 02:45:54 +0000 (10:45 +0800)
The patch that went upstream for udhcpc's option 209 handling uses the
option name 'pxeconffile' rather than 'conffile', and it was added as a
non-default option:

  http://git.busybox.net/busybox/commit/?id=d3092c99ae90f

This change uses the new name, and explicilty requests this option.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/network.c
discover/user-event.c
test/parser/test-pxe-empty.c
test/parser/test-pxe-initrd-in-append.c
test/parser/test-pxe-non-url-conf.c
test/parser/test-pxe-single.c
utils/pb-udhcpc

index 0490be9074486355ce436c173aeabb181affac64..6a1575f132ee306a1ba67db728226aa75bbd971c 100644 (file)
@@ -219,6 +219,7 @@ static void configure_interface_dhcp(struct interface *interface)
                pb_system_apps.udhcpc,
                "-R",
                "-n",
+               "-O", "pxeconffile",
                "-p", pidfile,
                "-i", interface->name,
                NULL,
index 61008c1a1cc484dd38c5d6dcd78795a2aa77e4ea..d7e0d195035efa43202137de78d57bfb78fd3da8 100644 (file)
@@ -237,7 +237,7 @@ struct pb_url *user_event_parse_conf_url(struct discover_context *ctx,
        char *p, *basedir, *url_str;
        struct pb_url *url;
 
-       conffile = event_get_param(event, "conffile");
+       conffile = event_get_param(event, "pxeconffile");
        if (conffile) {
                if (is_url(conffile)) {
                        url = pb_url_parse(ctx, conffile);
index fbc1d8a7d0ef2f8fc7dc3ac9b47cfdb7fbdb571e..df3b233716897e6344e8f53af77c544208554e07 100644 (file)
@@ -12,7 +12,7 @@ void run_test(struct parser_test *test)
        test_read_conf_embedded(test, "conf.txt");
 
        test_set_event_source(test);
-       test_set_event_param(test->ctx->event, "conffile",
+       test_set_event_param(test->ctx->event, "pxeconffile",
                        "tftp://host/dir/conf.txt");
 
        test_run_parser(test, "pxe");
index 6cd2ef49311ca031b804598aa1cde03acd667fc6..2939e98eb50923dde3e824096a44f1bffe4d6c88 100644 (file)
@@ -17,7 +17,7 @@ void run_test(struct parser_test *test)
        test_read_conf_embedded(test, "conf.txt");
 
        test_set_event_source(test);
-       test_set_event_param(test->ctx->event, "conffile",
+       test_set_event_param(test->ctx->event, "pxeconffile",
                        "tftp://host/dir/conf.txt");
 
        test_run_parser(test, "pxe");
index e8bb849e586659f36239b62156c4a9ade5d0a8a4..08f246a9fd88b976c2aa1bce4526d21694c3cac6 100644 (file)
@@ -19,7 +19,7 @@ void run_test(struct parser_test *test)
 
        test_set_event_source(test);
        test_set_event_param(test->ctx->event, "siaddr", "host");
-       test_set_event_param(test->ctx->event, "conffile", "conf.txt");
+       test_set_event_param(test->ctx->event, "pxeconffile", "conf.txt");
 
        test_run_parser(test, "pxe");
 
index ccb4d5c6462efc721156ecd4725f4adbd14e23ff..0bc6a590347bf92ede7430bb40ec0c04549a0797 100644 (file)
@@ -18,7 +18,7 @@ void run_test(struct parser_test *test)
        test_read_conf_embedded(test, "conf.txt");
 
        test_set_event_source(test);
-       test_set_event_param(test->ctx->event, "conffile",
+       test_set_event_param(test->ctx->event, "pxeconffile",
                        "tftp://host/dir/conf.txt");
 
        test_run_parser(test, "pxe");
index 3494985d3fc33dfcb6ed0b74b9b5d74368ba10b4..4ff0dcf2dc9328d71cd8deaff2b69e4120a2dc58 100644 (file)
@@ -18,7 +18,7 @@ pb_add () {
        paramstr=''
 
        # Collect relevant DHCP response parameters into $paramstr
-       for name in conffile bootfile mac ip siaddr serverid tftp
+       for name in pxeconffile bootfile mac ip siaddr serverid tftp
        do
                value=$(eval "echo \${$name}")
                [ -n "$value" ] || continue;