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 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
22 echo -ne "remove@/net/${interface}\0name=netboot\0" | pb-event
36 echo "--- $1 ---" >> ${log}
38 echo "---------------" >> ${log}