From 74b1eb7d7a36dd519fcb6cd9440a64315446b5f1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 13 May 2004 14:12:14 +0000 Subject: write syslinux.cfg before cp'ing the .rdz to catch the "not enough room" case --- make_boot_img | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/make_boot_img b/make_boot_img index 4b18ad11f..ad8297ba0 100755 --- a/make_boot_img +++ b/make_boot_img @@ -220,6 +220,22 @@ sub boot_img_i386 { (my $initrd_type = $type) =~ s/-changedisk//; initrd($tmp_mnt_initrd, $initrd_type, $I, $rdz); my $short_type = substr($type, 0, 8); + + my $timeout = 72; + output "$mnt/syslinux.cfg", +"default linux +prompt 1 +timeout $timeout +display boot.msg +F1 help.msg +F2 advanced.msg +F3 boot.msg +" . join('', map { +"label $_->[0] + kernel vmlinuz + append initrd=$short_type.rdz $_->[1] +" } entries_append($type)); + eval { _ "cp -f $rdz $mnt/$short_type.rdz" }; if ($@) { unlink "$mnt/$short_type.rdz"; @@ -241,21 +257,6 @@ sub boot_img_i386 { } unlink $rdz; - my $timeout = 72; - output "$mnt/syslinux.cfg", -"default linux -prompt 1 -timeout $timeout -display boot.msg -F1 help.msg -F2 advanced.msg -F3 boot.msg -" . join('', map { -"label $_->[0] - kernel vmlinuz - append initrd=$short_type.rdz $_->[1] -" } entries_append($type)); - _ "sync"; _ "df $mnt"; _ "$sudo umount $mnt"; -- cgit v1.2.1