Browse Source

Submit logic looks perfect now, and wanted to add that gdkbirdaa was added in 1.19.

master
freesource 25 years ago
parent
commit
039648bbf4
  1. 64
      gBootRoot

64
gBootRoot

@ -523,6 +523,7 @@ sub advanced_section {
label_advanced("append =",0,1,3,4); label_advanced("append =",0,1,3,4);
$ea3 = entry_advanced(1,2,3,4,2); $ea3 = entry_advanced(1,2,3,4,2);
my $append; (undef,undef,$append) = gdkbirdaao(); my $append; (undef,undef,$append) = gdkbirdaao();
$tooltips->set_tip( $ea3, "Add append options to brlilo.conf.", "");
$ea3->set_text($append) if defined $append; $ea3->set_text($append) if defined $append;
# Verbosity section # Verbosity section
@ -810,6 +811,7 @@ sub button {
sub submit { sub submit {
my($kernel,$root_image); my($kernel,$root_image);
# comment this out for testing # comment this out for testing
unlink("$verbosefn"); unlink("$verbosefn");
open (MTAB, "/etc/mtab") or die "no mtab!\n"; open (MTAB, "/etc/mtab") or die "no mtab!\n";
@ -906,24 +908,39 @@ elsif (defined $container[0] && defined $container[1] &&
$container[9] = $entry_advanced[0] . "ea1"; $container[9] = $entry_advanced[0] . "ea1";
} }
# not quite there .. .* to "" not working yet # Works now .. whoosh!
if ($entry_advanced[1]) { if ($container[10]) {
push(@original_container,$entry_advanced[1]) if !$container[10]; if ($container[10] ne "") {
if ($container[10]) { $container[10] = $entry_advanced[1] if $entry_advanced[1];
$container[10] = $entry_advanced[1]; }
if (defined $entry_advanced[1] and $entry_advanced[1] eq "") {
$container[10] = "";
}
elsif ($container[10] eq "") {
push(@original_container,$entry_advanced[1]);
} }
} }
else {
# pretty complex and works properly push(@original_container,$entry_advanced[1])
if ($container[11] ne "") { if $entry_advanced[1];
$container[11] = $entry_advanced[2] if $entry_advanced[2];
}
if (defined $entry_advanced[2] and $entry_advanced[2] eq "") {
$container[11] = "";
} }
elsif ($container[11] eq "") {
push(@original_container,$entry_advanced[2]); # pretty complex and works properly even for !-e lilo.conf
if ($container[11]) {
if ($container[11] ne "") {
$container[11] = $entry_advanced[2] if $entry_advanced[2];
}
if (defined $entry_advanced[2] and $entry_advanced[2] eq "") {
$container[11] = "";
}
elsif ($container[11] eq "") {
push(@original_container,$entry_advanced[2]);
}
} }
else {
push(@original_container,$entry_advanced[2])
if $entry_advanced[2];
}
if (@original_container) { # defined array deprecate Perl 5.6 - zas@metaconcept.com if (@original_container) { # defined array deprecate Perl 5.6 - zas@metaconcept.com
# a hash check isn't perfect for two values which are the same # a hash check isn't perfect for two values which are the same
@ -931,12 +948,18 @@ elsif (defined $container[0] && defined $container[1] &&
my @temp_container = @container; my @temp_container = @container;
# Got it! # Got it! - how to deal with fields with no init value
if ($container[10] and $container[10] eq "") { if (defined $container[10] and $container[10] eq "") {
$container[10] = $entry_advanced[1];
}
if (!defined $container[10]) {
$container[10] = $entry_advanced[1]; $container[10] = $entry_advanced[1];
} }
if ($container[11] eq "") { if (defined $container[11] and $container[11] eq "") {
$container[11] = $entry_advanced[2] $container[11] = $entry_advanced[2];
}
if (!defined $container[11]) {
$container[11] = $entry_advanced[2];
} }
# no sense looking at undef values # no sense looking at undef values
@ -958,7 +981,7 @@ elsif (defined $container[0] && defined $container[1] &&
splice(@temp_container,1,1); splice(@temp_container,1,1);
# A test which I've had to run too often # A test which I've had to run too often
# print "BEFORE @temp_container\nAFTER @original_container\n"; #print "BEFORE @temp_container\nAFTER @original_container\n";
my %diff; my %diff;
grep($diff{$_}++,@temp_container); grep($diff{$_}++,@temp_container);
@ -979,9 +1002,6 @@ elsif (defined $container[0] && defined $container[1] &&
} }
# reset # reset
# entry fun
@original_container = ($container[0],$root_image,$device,$size, @original_container = ($container[0],$root_image,$device,$size,
$compress,$container[6],$container[7], $compress,$container[6],$container[7],
$container[8],$container[9],$container[10], $container[8],$container[9],$container[10],

Loading…
Cancel
Save