summaryrefslogtreecommitdiffstats
path: root/discover
diff options
context:
space:
mode:
Diffstat (limited to 'discover')
-rw-r--r--discover/pxe-parser.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/discover/pxe-parser.c b/discover/pxe-parser.c
index ff86722..aef43b8 100644
--- a/discover/pxe-parser.c
+++ b/discover/pxe-parser.c
@@ -148,7 +148,7 @@ static void pxe_process_pair(struct conf_context *ctx,
return;
}
- if (streq(name, "LABEL")) {
+ if (streq(name, "LABEL") || streq(name, "PLUGIN")) {
if (opt)
pxe_finish(ctx);
@@ -158,8 +158,12 @@ static void pxe_process_pair(struct conf_context *ctx,
opt->option->id = talloc_asprintf(opt, "%s@%p",
ctx->dc->device->device->id, opt);
- opt->option->is_default = parser_info->default_name &&
- streq(parser_info->default_name, value);
+ if (streq(name, "LABEL")) {
+ opt->option->type = DISCOVER_BOOT_OPTION;
+ opt->option->is_default = parser_info->default_name &&
+ streq(parser_info->default_name, value);
+ } else
+ opt->option->type = DISCOVER_PLUGIN_OPTION;
parser_info->opt = opt;
return;
@@ -169,6 +173,14 @@ static void pxe_process_pair(struct conf_context *ctx,
if (!opt)
return;
+ if (streq(name, "TARBALL") &&
+ opt->option->type == DISCOVER_PLUGIN_OPTION) {
+ url = pxe_url_join(ctx->dc, ctx->dc->conf_url, value);
+ opt->boot_image = create_url_resource(opt, url);
+ /* All other options apply to boot options only */
+ return;
+ }
+
if (streq(name, "KERNEL")) {
url = pxe_url_join(ctx->dc, ctx->dc->conf_url, value);
opt->boot_image = create_url_resource(opt, url);
@@ -210,7 +222,6 @@ static void pxe_process_pair(struct conf_context *ctx,
url = pxe_url_join(ctx->dc, ctx->dc->conf_url, value);
opt->dtb = create_url_resource(opt, url);
}
-
}
static void pxe_load_next_filename(struct conf_context *conf)
OpenPOWER on IntegriCloud