X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=utils%2Fpb-udhcpc;h=f0703ae6df75ff55ba1ac3b9bd897a92afb956ac;hp=3494985d3fc33dfcb6ed0b74b9b5d74368ba10b4;hb=416647ec10a0ca505de35348620391fde80043c0;hpb=b8e53cb4b96eb17dc7fa0ffc505dfebae37e6cbf diff --git a/utils/pb-udhcpc b/utils/pb-udhcpc index 3494985..f0703ae 100644 --- a/utils/pb-udhcpc +++ b/utils/pb-udhcpc @@ -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 conffile 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 () {