slitaz-tools rev 154

netbox: pxe option in udhcpd.conf for etherboot
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 20 22:32:26 2008 +0000 (2008-04-20)
parents 6886d5f746d1
children a068217244d2
files tinyutils/netbox
line diff
     1.1 --- a/tinyutils/netbox	Sat Apr 19 22:13:18 2008 +0000
     1.2 +++ b/tinyutils/netbox	Sun Apr 20 22:32:26 2008 +0000
     1.3 @@ -429,7 +429,8 @@
     1.4            <input file icon="accessories-text-editor"></input>
     1.5  	  <action>dir=$(dirname $PXE_CONF); [ -d $dir ] || mkdir -p $dir</action>
     1.6  	  <action>lzma d /usr/share/boot/pxelinux.0.lzma $(dirname $PXE_CONF)/../pxelinux.0</action>
     1.7 -	  <action>grep "^option bootfile pxelinux.0" $UDHCPD_CONF || echo "option bootfile pxelinux.0" >> $UDHCPD_CONF</action>
     1.8 +	  <action>grep -q "^boot_file" $UDHCPD_CONF || echo "boot_file pxelinux.0" >> $UDHCPD_CONF</action>
     1.9 +	  <action>grep -q "^siaddr" $UDHCPD_CONF || echo "siaddr $(ifconfig $INTERFACE | grep inet.ad | cut -d: -f2 | cut -c -15)" >> $UDHCPD_CONF</action>
    1.10  	  <action>[ -f $PXE_CONF ] || echo -e "label slitaz\n\tkernel bzImage\n\tappend initrd=rootfs.gz rw root=/dev/null vga=normal" > $PXE_CONF</action>
    1.11            <action type="lauch">leafpad $PXE_CONF</action>
    1.12          </button>