summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--discover/user-event.c4
-rw-r--r--utils/pb-udhcpc18
2 files changed, 12 insertions, 10 deletions
diff --git a/discover/user-event.c b/discover/user-event.c
index 7acd237..dc671d9 100644
--- a/discover/user-event.c
+++ b/discover/user-event.c
@@ -89,9 +89,9 @@ static struct resource *user_event_resource(struct discover_boot_option *opt,
return NULL;
}
- boot_file = event_get_param(event, "boot_file");
+ boot_file = event_get_param(event, "bootfile");
if (!boot_file) {
- pb_log("%s: boot_file not found\n", __func__);
+ pb_log("%s: bootfile not found\n", __func__);
return NULL;
}
diff --git a/utils/pb-udhcpc b/utils/pb-udhcpc
index f0703ae..7ed9035 100644
--- a/utils/pb-udhcpc
+++ b/utils/pb-udhcpc
@@ -29,17 +29,18 @@ pb_add () {
pb-event dhcp@${interface} $paramstr
- # Check if an explicit config file present
- if [ -n "${conffile}" ]
+ # Check if an explicit boot file present. If there is, add it as
+ # an option directly.
+ if [ -z "${bootfile}" ]
then
return;
fi
- # Finally, add an option for the boot_file parameter
- paramstr='name=netboot'
+ paramstr=""
- # Collect relevant parameters to add an option to the boot_file parameter
- for name in rootpath siaddr boot_file
+ # Collect relevant parameters to add an option to the bootfile
+ # parameter
+ for name in rootpath siaddr bootfile
do
value=$(eval "echo \${$name}")
[ -n "$value" ] || continue;
@@ -47,11 +48,12 @@ pb_add () {
paramstr="$paramstr $name=$value"
done
- pb-event add@${interface} $paramstr
+ pb-event add@${interface} name="netboot $interface ($bootfile)" \
+ $paramstr
}
pb_remove () {
- pb-event remove@${interface} name=netboot
+ pb-event remove@${interface}
}
case "$1" in
OpenPOWER on IntegriCloud