]> git.ozlabs.org Git - petitboot/blobdiff - utils/pb-udhcpc
utils/pb-udhcpc: Fix incorrect reference to $interface
[petitboot] / utils / pb-udhcpc
index 4ff0dcf2dc9328d71cd8deaff2b69e4120a2dc58..f0703ae6df75ff55ba1ac3b9bd897a92afb956ac 100644 (file)
@@ -14,11 +14,12 @@ pb_add () {
        # parameter was in the header, or specified by options
        [ -z "$bootfile" ] && bootfile=${boot_file}
 
-       mac=$(< /sys/class/net/$interface/address)
+       mac=$(cat /sys/class/net/$interface/address)
        paramstr=''
 
        # Collect relevant DHCP response parameters into $paramstr
-       for name in pxeconffile bootfile mac ip siaddr serverid tftp
+       for name in pxeconffile pxepathprefix bootfile mac ip siaddr \
+               serverid tftp
        do
                value=$(eval "echo \${$name}")
                [ -n "$value" ] || continue;
@@ -26,7 +27,7 @@ pb_add () {
                paramstr="$paramstr $name=$value"
        done
 
-       pb-event dhcp@{interface} $paramstr
+       pb-event dhcp@${interface} $paramstr
 
        # Check if an explicit config file present
        if [ -n "${conffile}" ]
@@ -46,7 +47,7 @@ pb_add () {
                 paramstr="$paramstr $name=$value"
         done
 
-       pb-event add@{interface} $paramstr
+       pb-event add@${interface} $paramstr
 }
 
 pb_remove () {