utils/pb-udhcpc: Use command-line format of pb-event
authorJeremy Kerr <jk@ozlabs.org>
Mon, 6 May 2013 06:55:36 +0000 (14:55 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 9 May 2013 00:47:54 +0000 (08:47 +0800)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
utils/pb-udhcpc

index 91d40f6c01f37eb89ea468cd8ee9a8afca8b699e..ff231780829630dd4823c7c56396acb8ab760e1a 100644 (file)
@@ -15,11 +15,14 @@ pb_add () {
 
        [ ${k_server_ip} != ${rootpath} ] || k_server_ip=${serverid}
 
-       printf "add@/net/${interface}\0name=netboot\0image=tftp://${siaddr}/${boot_file}\0args=root=/dev/nfs ip=any nfsroot=${k_server_ip}:${k_root_dir}\0" | pb-event
+       pb-event add@/net/${interface} \
+               name=netboot \
+               image=tftp://${siaddr}/${boot_file} \
+               args="root=/dev/nfs ip=any nfsroot=${k_server_ip}:${k_root_dir}"
 }
 
 pb_remove () {
-       printf "remove@/net/${interface}\0name=netboot\0" | pb-event
+       pb-event remove@/net/${interface} name=netboot
 }
 
 case "$1" in