utils/pb-udhcpc: remove bashism when reading mac address
authorJeremy Kerr <jk@ozlabs.org>
Mon, 20 Jan 2014 00:42:44 +0000 (08:42 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 20 Jan 2014 00:42:44 +0000 (08:42 +0800)
The $(< FILE) syntax we use to read an interface's MAC address doesn't
work in dash or busybox sh. Instead, use cat.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
utils/pb-udhcpc

index 714d5b4c74200feebaaec4ee2076794a327b8bbf..60cfa58df604d2567121a749a7be586b1c8ab982 100644 (file)
@@ -14,7 +14,7 @@ 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