]> git.ozlabs.org Git - petitboot/blobdiff - utils/pb-udhcpc
discover: add reinit path
[petitboot] / utils / pb-udhcpc
index f0703ae6df75ff55ba1ac3b9bd897a92afb956ac..7ed9035d5e9dad89f7880a0815e645320b8939d4 100644 (file)
@@ -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