utils/pb-udhcpc: Use command-line format of pb-event
[petitboot] / 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