wok-6.x rev 2343
mirror-tools: add pxe config
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Mar 03 19:40:59 2009 +0000 (2009-03-03) |
parents | 544b621b4f41 |
children | a981e582687d |
files | mirror-tools/stuff/var/www/slitaz/mirror/pxe/defaults.cfg mirror-tools/stuff/var/www/slitaz/mirror/pxe/mkcfg.sh |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mirror-tools/stuff/var/www/slitaz/mirror/pxe/defaults.cfg Tue Mar 03 19:40:59 2009 +0000 1.3 @@ -0,0 +1,17 @@ 1.4 +default menu.c32 1.5 +prompt 0 1.6 + 1.7 +MENU TITLE Slitaz Web boot http://www.slitaz.org/ 1.8 +ALLOWOPTIONS 0 1.9 +MENU MARGIN 0 1.10 +MENU ROWS 17 1.11 +MENU COLOR BORDER 37;44 #40000000 #00000000 std 1.12 +MENU COLOR TITLE 1;33;44 #c00090f0 #00000000 std 1.13 +MENU COLOR SCROLLBAR 37;44 #40000000 #00000000 std 1.14 + 1.15 +#MENU COLOR TIMEOUT_MSG 1;33;44 #c00090f0 #00000000 std 1.16 +#MENU COLOR TIMEOUT 37;40 #80ffffff #00000000 std 1.17 +MENU TIMEOUTROW 25 1.18 +MENU AUTOBOOT Start cooking in # second{,s} 1.19 +timeout 100 1.20 +TOTALTIMEOUT 9000
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/mirror-tools/stuff/var/www/slitaz/mirror/pxe/mkcfg.sh Tue Mar 03 19:40:59 2009 +0000 2.3 @@ -0,0 +1,128 @@ 2.4 +#!/bin/sh 2.5 + 2.6 +cd $(dirname $0) 2.7 + 2.8 +# Status functions. 2.9 +status() 2.10 +{ 2.11 + local CHECK=$? 2.12 + echo -en "\\033[70G[ " 2.13 + if [ $CHECK = 0 ]; then 2.14 + echo -en "\\033[1;33mOK" 2.15 + else 2.16 + echo -en "\\033[1;31mFailed" 2.17 + fi 2.18 + echo -e "\\033[0;39m ]" 2.19 +} 2.20 + 2.21 +echo -n "Building cooking" 2.22 +rm -f cooking/*-*.cfg 2.23 +( cd ../boot/cooking ; ls rootfs-*.gz 2> /dev/null ) | \ 2.24 +sed 's/rootfs-\(.*\).gz/\1/' | while read flavor; do 2.25 + [ -f cooking/$flavor.cfg ] && continue 2.26 + cp cooking/core.cfg cooking/$flavor.cfg 2.27 + sed -i -e "s/core-common/$flavor-common/" \ 2.28 + -e "s/rootfs.gz/rootfs-$flavor.gz/" cooking/$flavor.cfg 2.29 +done 2.30 +for flavor in $(cd cooking ; ls *.cfg | sed 's/.cfg//') ; do 2.31 + echo -n " $flavor" 2.32 + cat > cooking/$flavor-common.cfg <<EOT 2.33 +default slitaz 2.34 +label deCH 2.35 + config cooking/$flavor-de_CH.cfg 2.36 +label frCH 2.37 + config cooking/$flavor-fr_CH.cfg 2.38 +label reboot 2.39 + com32 reboot.c32 2.40 + 2.41 +implicit 0 2.42 +prompt 1 2.43 +timeout 80 2.44 +F1 cooking/help.txt 2.45 +F2 cooking/options.txt 2.46 +F3 cooking/isolinux.msg 2.47 +F4 cooking/display.txt 2.48 +F5 cooking/enhelp.txt 2.49 +F6 cooking/enopts.txt 2.50 + 2.51 +EOT 2.52 + while read cfg kbd loc ; do 2.53 + info="Now using $kbd keyboard and $loc locale." 2.54 + sed -e "s/^display/kbdmap cooking\/$cfg.kbd\ndisplay/" \ 2.55 + -e "s/^label slitaz$/say $info\nlabel slitaz/" \ 2.56 + -e "s/gz/gz lang=$loc kmap=$kbd/" \ 2.57 + < cooking/$flavor.cfg > cooking/$flavor-$cfg.cfg 2.58 + cat >> cooking/$flavor-common.cfg <<EOT 2.59 +label $cfg 2.60 + config cooking/$flavor-$cfg.cfg 2.61 +EOT 2.62 + done <<EOT 2.63 +be be-latin1 fr_FR 2.64 +br br-abnt2 pt_PT 2.65 +ca cf fr_FR 2.66 +de de-latin1 de_DE 2.67 +de_CH de_CH-latin1 de_DE 2.68 +en uk C 2.69 +es es es_ES 2.70 +fi fi-latin1 fi 2.71 +fr fr-latin1 fr_FR 2.72 +fr_CH fr_CH-latin1 fr_FR 2.73 +hu hu hu 2.74 +it it it_IT 2.75 +jp jp106 jp_JP 2.76 +pt pt-latin1 pt_PT 2.77 +ru ru ru_RU 2.78 +us us C 2.79 +EOT 2.80 +done 2.81 +status 2.82 + 2.83 +echo -n "Building 1.0" 2.84 +rm -f 1.0/*-*.cfg 2.85 +( cd ../boot/1.0 ; ls rootfs-*.gz 2> /dev/null ) | \ 2.86 +sed 's/rootfs-\(.*\).gz/\1/' | while read flavor; do 2.87 + [ -f 1.0/$flavor.cfg ] && continue 2.88 + cp 1.0/core.cfg 1.0/$flavor.cfg 2.89 + sed -i -e "s/core-common/$flavor-common/" \ 2.90 + -e "s/rootfs.gz/rootfs-$flavor.gz/" 1.0/$flavor.cfg 2.91 +done 2.92 +for flavor in $(cd 1.0; ls *.cfg | sed 's/.cfg//') ; do 2.93 + echo -n " $flavor" 2.94 + cat > 1.0/$flavor-common.cfg <<EOT 2.95 +default slitaz 2.96 + 2.97 +label def 2.98 + config 1.0/$flavor.cfg 2.99 + 2.100 +label reboot 2.101 + com32 reboot.c32 2.102 + 2.103 +implicit 0 2.104 +prompt 1 2.105 +timeout 80 2.106 +F1 1.0/help.txt 2.107 +F2 1.0/options.txt 2.108 +F3 1.0/isolinux.msg 2.109 +F4 1.0/display.txt 2.110 +EOT 2.111 + while read cfg kbd loc ; do 2.112 + sed -e "s/^display/KBDMAP 1.0\/$cfg.kbd\ndisplay/" \ 2.113 + -e "s/gz/gz lang=$loc kmap=$kbd/" \ 2.114 + < 1.0/$flavor.cfg > 1.0/$flavor-$cfg.cfg 2.115 + cat >> 1.0/$flavor-common.cfg <<EOT 2.116 +label $cfg 2.117 + config 1.0/$flavor-$cfg.cfg 2.118 +EOT 2.119 + done <<EOT 2.120 +be be fr 2.121 +ca ca fr 2.122 +de_CH fr_CH fr_CH 2.123 +en en en 2.124 +es es en 2.125 +fr fr fr 2.126 +fr_CH fr_CH fr_CH 2.127 +it it en 2.128 +us us en 2.129 +EOT 2.130 +done 2.131 +status