slitaz-tools diff tinyutils/netbox @ rev 152
netbox: tftp root not hardcoded
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Apr 19 20:04:26 2008 +0000 (2008-04-19) |
parents | 8e442e9b5ba2 |
children | 6d2bfc63ab4f |
line diff
1.1 --- a/tinyutils/netbox Sat Apr 19 19:38:33 2008 +0000 1.2 +++ b/tinyutils/netbox Sat Apr 19 20:04:26 2008 +0000 1.3 @@ -420,22 +420,24 @@ 1.4 <label>"<b>Configuration :</b>"</label> 1.5 </text> 1.6 <entry editable="false"> 1.7 - <default>pxelinux.cfg/default</default> 1.8 + <default>' 1.9 +tmp="$tmp$(grep bin/tftpd /etc/inetd.conf | awk '{ print $NF }')" 1.10 +tmp2='/pxelinux.cfg/default</default> 1.11 <variable>PXE_CONF</variable> 1.12 </entry> 1.13 <button> 1.14 <input file icon="accessories-text-editor"></input> 1.15 - <action>dir=$(dirname /boot/$PXE_CONF); [ -d $dir ] || mkdir -p $dir</action> 1.16 - <action>lzma d /usr/share/boot/pxelinux.0.lzma /boot/pxelinux.0</action> 1.17 - <action>grep "^option bootfile=pxelinux.0" $UDHCPD_CONF || echo "option bootfile=pxelinux.0" >> $UDHCPD_CONF</action> 1.18 - <action>[ -f /boot/$PXE_CONF ] || echo -e "label slitaz\n\tkernel bzImage\n\tappend initrd=rootfs.gz rw root=/dev/null vga=normal" > /boot/$PXE_CONF</action> 1.19 - <action type="lauch">leafpad /boot/$PXE_CONF</action> 1.20 + <action>dir=$(dirname $PXE_CONF); [ -d $dir ] || mkdir -p $dir</action> 1.21 + <action>lzma d /usr/share/boot/pxelinux.0.lzma $(dirname $PXE_CONF)/../pxelinux.0</action> 1.22 + <action>grep "^option bootfile pxelinux.0" $UDHCPD_CONF || echo "option bootfile pxelinux.0" >> $UDHCPD_CONF</action> 1.23 + <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.24 + <action type="lauch">leafpad $PXE_CONF</action> 1.25 </button> 1.26 </hbox> 1.27 </frame> 1.28 ' 1.29 [ -f /usr/share/boot/pxelinux.0.lzma -a -x /usr/bin/tftpd -a \ 1.30 - -x /usr/sbin/inetd -a -x /usr/sbin/udhcpd ] && NET_BOX="${NET_BOX}${tmp}" 1.31 + -x /usr/sbin/inetd -a -x /usr/sbin/udhcpd ] && NET_BOX="$NET_BOX$tmp$tmp2" 1.32 tmp='<frame Dnsd> 1.33 <hbox> 1.34 <text use-markup="true">