wok rev 19326

ipxe: add ip config in menu
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 14 16:39:07 2016 +0200 (2016-07-14)
parents abdd572ba26d
children dd1a1c7a653a
files ipxe/stuff/ipxe.cmd
line diff
     1.1 --- a/ipxe/stuff/ipxe.cmd	Thu Jul 14 06:55:17 2016 -0300
     1.2 +++ b/ipxe/stuff/ipxe.cmd	Thu Jul 14 16:39:07 2016 +0200
     1.3 @@ -2,18 +2,23 @@
     1.4  
     1.5  set menu-timeout 3000
     1.6  dhcp || echo No DHCP
     1.7 +console --picture http://mirror.slitaz.org/pxe/ipxe/slitaz.png
     1.8  
     1.9  :menu
    1.10  menu SliTaz net boot menu ${ip} ${gateway} ${dns}
    1.11  item --key b boot	Local boot
    1.12 +item --gap
    1.13 +item --gap Network boot
    1.14  item --key l lan	Your PXE boot ${filename}
    1.15  item --key w web	SliTaz WEB boot
    1.16  item --key r rolling	SliTaz development version
    1.17 +item --gap
    1.18 +item --gap Configuration
    1.19 +isset ${ip} || item --key i ipset	IP settings
    1.20  item --key c config	iPXE configuration
    1.21  item --key e exit	iPXE command line
    1.22  choose --timeout ${menu-timeout} --default web target || goto exit
    1.23  set menu-timeout 0
    1.24 -isset $(ip} || dhcp || echo No DHCP again
    1.25  isset ${dns} || set dns 8.8.8.8
    1.26  goto ${target}
    1.27  
    1.28 @@ -26,7 +31,16 @@
    1.29  shell
    1.30  goto menu
    1.31  
    1.32 +:ipset
    1.33 +echo -n IP address: && read net0/ip
    1.34 +set net0/netmask 255.255.255.0
    1.35 +echo -n Subnet mask: ${} && read net0/netmask
    1.36 +echo -n Default gateway: && read net0/gateway
    1.37 +echo -n DNS server: ${} && read dns
    1.38 +goto menu
    1.39 +
    1.40  :web
    1.41 +isset $(ip} || dhcp || echo No DHCP again
    1.42  imgfree
    1.43  set weburl http://mirror.slitaz.org/pxe/
    1.44  chain --autofree ${weburl}ipxe/menu.ipxe && boot ||
    1.45 @@ -43,10 +57,12 @@
    1.46  goto menu
    1.47  
    1.48  :lan
    1.49 +isset $(ip} || dhcp || echo No DHCP again
    1.50  autoboot ||
    1.51  goto menu
    1.52  
    1.53  :rolling
    1.54 +isset $(ip} || dhcp || echo No DHCP again
    1.55  sanboot http://mirror.slitaz.org/iso/rolling/slitaz-rolling.iso ||
    1.56  goto menu
    1.57