wok-current rev 2338

gpxe: add url redondancy
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 01 22:17:59 2009 +0000 (2009-03-01)
parents 5947b2955548
children bbd4c519c147
files gpxe/receipt gpxe/stuff/url_list.u
line diff
     1.1 --- a/gpxe/receipt	Sun Mar 01 12:04:20 2009 +0000
     1.2 +++ b/gpxe/receipt	Sun Mar 01 22:17:59 2009 +0000
     1.3 @@ -13,7 +13,7 @@
     1.4  compile_rules()
     1.5  {
     1.6  	cd $src/src
     1.7 -	for i in prefix.u default_boot.u cmdline.u; do
     1.8 +	for i in prefix.u default_boot.u cmdline.u url_list.u; do
     1.9  		[ -f done.$i ] && continue
    1.10  		echo "Apply $i..."
    1.11  		patch -p2 < ../../stuff/$i || return 1
    1.12 @@ -27,9 +27,12 @@
    1.13  {
    1.14  	mkdir -p $fs/boot
    1.15  	cp $src/src/bin/gpxe.lkrn $fs/boot/gpxe
    1.16 -	# install 127 bytes of forced url at offset 519
    1.17 -	echo -n "http://boot.slitaz.org/pxe/pxelinux.0" | cat - /dev/zero | \
    1.18 -		dd bs=1 seek=519 count=127 conv=notrunc of=$fs/boot/gpxe
    1.19 +	# install 255 bytes of forced url at offset 519
    1.20 +	echo -n "\
    1.21 +http://boot.slitaz.org/pxe/pxelinux.0,\
    1.22 +http://mirror.slitaz.org/pxe/pxelinux.0,\
    1.23 +http://download.tuxfamily.org/slitaz/pxe/pxelinux.0" | cat - /dev/zero | \
    1.24 +		dd bs=1 seek=519 count=255 conv=notrunc of=$fs/boot/gpxe
    1.25  	# Package all gpxe pkgs
    1.26  	for i in $(cd $WOK; ls -d gpxe-*)
    1.27  	do
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/gpxe/stuff/url_list.u	Sun Mar 01 22:17:59 2009 +0000
     2.3 @@ -0,0 +1,20 @@
     2.4 +--- gpxe-0.9.3/src/usr/autoboot.c
     2.5 ++++ gpxe-0.9.3/src/usr/autoboot.c
     2.6 +@@ -229,9 +229,14 @@
     2.7 + 		set_url ( buf, forced_url.url );
     2.8 + 	}
     2.9 +     while (1) {
    2.10 +-	if ( buf[0] ) {
    2.11 +-		printf ( "Booting from filename \"%s\"\n", buf );
    2.12 +-		return boot_filename ( buf );
    2.13 ++	while ( buf[0] ) {
    2.14 ++		char *p;
    2.15 ++		for ( p = buf; *p && *p != ','; p++ );
    2.16 ++		if ( *p ) *p++ = 0;
    2.17 ++		set_url ( buf, buf );
    2.18 ++		printf ( "Booting from filename \"%s\"\n", buf );
    2.19 ++		if ( boot_filename ( buf ) == 0 ) return 0;
    2.20 ++		strcpy( buf, p );
    2.21 + 	}
    2.22 + 	
    2.23 + 	/* No filename; try the root path */