3 # Petitboot udhcpc user script. Should be run by udhcpc when
4 # there is a change in the dhcp configuration. For more info
5 # see the udhcpc man page and the Linux kernel source file
6 # Documentation/filesystems/nfsroot.txt.
9 PBOOT_USER_EVENT_SOCKET="/tmp/petitboot.ev"
10 log="/var/log/petitboot/pb-udhcpc.log"
13 k_server_ip=${rootpath%%:*}
14 k_root_dir=${rootpath#*:}
16 [ ${k_server_ip} != ${rootpath} ] || k_server_ip=${serverid}
18 pb-event add@/net/${interface} \
20 image=tftp://${siaddr}/${boot_file} \
21 args="root=/dev/nfs ip=any nfsroot=${k_server_ip}:${k_root_dir}"
25 pb-event remove@/net/${interface} name=netboot
39 printf "--- $1 ---\n" >> ${log}
41 printf "---------------\n" >> ${log}