From 30dce4ce0447802e3b54b3f760c5fd8eacbe75ff Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Thu, 27 Feb 2014 10:33:13 +0800 Subject: discover/pxe: Add pxelinux.cfg/ directory to autodiscovered pxe paths The pxelinux project will perform autodiscovery by looking for files under the pxelinux.cfg/ prefix (in addition to any pxepathprefix from DHCP option 210) This change unifies petitboot's behaviour with pxelinux. Signed-off-by: Jeremy Kerr --- test/parser/test-pxe-ip-without-conf.c | 2 +- test/parser/test-pxe-mac-without-conf.c | 2 +- test/parser/test-pxe-pathprefix-discover-mac.c | 6 ++++-- test/parser/test-pxe-pathprefix-discover.c | 6 ++++-- 4 files changed, 10 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/parser/test-pxe-ip-without-conf.c b/test/parser/test-pxe-ip-without-conf.c index ff3bf9e..e3a612a 100644 --- a/test/parser/test-pxe-ip-without-conf.c +++ b/test/parser/test-pxe-ip-without-conf.c @@ -15,7 +15,7 @@ void run_test(struct parser_test *test) struct discover_boot_option *opt; struct discover_context *ctx; - test_read_conf_embedded_url(test, "tftp://host/dir/C0A8"); + test_read_conf_embedded_url(test, "tftp://host/dir/pxelinux.cfg/C0A8"); test_set_event_source(test); test_set_event_param(test->ctx->event, "bootfile", "dir/pxe"); diff --git a/test/parser/test-pxe-mac-without-conf.c b/test/parser/test-pxe-mac-without-conf.c index e42e374..f84d63b 100644 --- a/test/parser/test-pxe-mac-without-conf.c +++ b/test/parser/test-pxe-mac-without-conf.c @@ -16,7 +16,7 @@ void run_test(struct parser_test *test) struct discover_context *ctx; test_read_conf_embedded_url(test, - "tftp://host/dir/01-12-34-56-78-9a-bc"); + "tftp://host/dir/pxelinux.cfg/01-12-34-56-78-9a-bc"); test_set_event_source(test); test_set_event_param(test->ctx->event, "bootfile", "dir/pxe"); diff --git a/test/parser/test-pxe-pathprefix-discover-mac.c b/test/parser/test-pxe-pathprefix-discover-mac.c index 2decb46..1e5fa71 100644 --- a/test/parser/test-pxe-pathprefix-discover-mac.c +++ b/test/parser/test-pxe-pathprefix-discover-mac.c @@ -16,7 +16,8 @@ void run_test(struct parser_test *test) struct discover_context *ctx; test_read_conf_embedded_url(test, - "tftp://host/path/to/01-12-34-56-78-9a-bc"); + "tftp://host/path/to/pxelinux.cfg/" + "01-12-34-56-78-9a-bc"); test_set_event_source(test); test_set_event_param(test->ctx->event, "mac", "12:34:56:78:9a:bc"); @@ -35,5 +36,6 @@ void run_test(struct parser_test *test) check_resolved_url_resource(opt->boot_image, "tftp://host/path/to/./kernel"); - check_resolved_url_resource(opt->initrd, "tftp://host/initrd"); + check_resolved_url_resource(opt->initrd, + "tftp://host/initrd"); } diff --git a/test/parser/test-pxe-pathprefix-discover.c b/test/parser/test-pxe-pathprefix-discover.c index de2feac..9cb44c8 100644 --- a/test/parser/test-pxe-pathprefix-discover.c +++ b/test/parser/test-pxe-pathprefix-discover.c @@ -15,7 +15,8 @@ void run_test(struct parser_test *test) struct discover_boot_option *opt; struct discover_context *ctx; - test_read_conf_embedded_url(test, "tftp://host/path/to/C0A8"); + test_read_conf_embedded_url(test, + "tftp://host/path/to/pxelinux.cfg/C0A8"); test_set_event_source(test); test_set_event_param(test->ctx->event, "ip", "192.168.0.1"); @@ -34,5 +35,6 @@ void run_test(struct parser_test *test) check_resolved_url_resource(opt->boot_image, "tftp://host/path/to/./kernel"); - check_resolved_url_resource(opt->initrd, "tftp://host/initrd"); + check_resolved_url_resource(opt->initrd, + "tftp://host/initrd"); } -- cgit v1.2.1