Convert echo to printf in scripts
[petitboot] / utils / pb-udhcpc
index f15706431ee0e692a6a366ea2cc2131e7e10fdb0..45c801909f3a72c62dbf0c80cea434b0ce76c74d 100644 (file)
@@ -15,11 +15,11 @@ pb_add () {
 
        [ ${k_server_ip} != ${rootpath} ] || k_server_ip=${serverid}
 
-       echo -ne "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
+       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_remove () {
-       echo -ne "remove@/net/${interface}\0name=netboot\0" | pb-event
+       printf "remove@/net/${interface}\0name=netboot\0" | pb-event
 }
 
 case "$1" in
@@ -33,6 +33,6 @@ deconfig)
        ;;
 esac
 
-echo "--- $1 ---" >> ${log}
+printf "--- $1 ---\n" >> ${log}
 set >> ${log}
-echo "---------------" >> ${log}
+printf "---------------\n" >> ${log}