slitaz-tools rev 160

netbox: fix siaddr in dhcpd.conf
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 23 16:07:01 2008 +0000 (2008-04-23)
parents 8a91091fc00a
children ec2dc67b803d
files tinyutils/netbox
line diff
     1.1 --- a/tinyutils/netbox	Tue Apr 22 22:58:12 2008 +0200
     1.2 +++ b/tinyutils/netbox	Wed Apr 23 16:07:01 2008 +0000
     1.3 @@ -448,7 +448,7 @@
     1.4  	  <action>dir=$(dirname $PXE_CONF); [ -d $dir ] || mkdir -p $dir</action>
     1.5  	  <action>lzma d /usr/share/boot/pxelinux.0.lzma $(dirname $PXE_CONF)/../pxelinux.0</action>
     1.6  	  <action>grep -q "^boot_file" $UDHCPD_CONF || echo "boot_file pxelinux.0" >> $UDHCPD_CONF</action>
     1.7 -	  <action>grep -q "^siaddr" $UDHCPD_CONF || echo "siaddr $(ifconfig $INTERFACE | grep inet.ad | cut -d: -f2 | cut -c -15)" >> $UDHCPD_CONF</action>
     1.8 +	  <action>grep -q "^siaddr" $UDHCPD_CONF || echo "siaddr $(ifconfig $INTERFACE | grep inet.ad | cut -d: -f2 | cut -d\  -f1)" >> $UDHCPD_CONF</action>
     1.9  	  <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.10            <action type="lauch">leafpad $PXE_CONF</action>
    1.11          </button>