mirror of
https://github.com/fspc/gbootroot.git
synced 2025-02-23 00:53:23 -05:00
Submit logic looks perfect now, and wanted to add that gdkbirdaa was added in 1.19.
This commit is contained in:
parent
1a246aadbe
commit
039648bbf4
66
gBootRoot
66
gBootRoot
@ -523,6 +523,7 @@ sub advanced_section {
|
||||
label_advanced("append =",0,1,3,4);
|
||||
$ea3 = entry_advanced(1,2,3,4,2);
|
||||
my $append; (undef,undef,$append) = gdkbirdaao();
|
||||
$tooltips->set_tip( $ea3, "Add append options to brlilo.conf.", "");
|
||||
$ea3->set_text($append) if defined $append;
|
||||
|
||||
# Verbosity section
|
||||
@ -810,6 +811,7 @@ sub button {
|
||||
sub submit {
|
||||
|
||||
my($kernel,$root_image);
|
||||
|
||||
# comment this out for testing
|
||||
unlink("$verbosefn");
|
||||
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";
|
||||
}
|
||||
|
||||
# not quite there .. .* to "" not working yet
|
||||
if ($entry_advanced[1]) {
|
||||
push(@original_container,$entry_advanced[1]) if !$container[10];
|
||||
if ($container[10]) {
|
||||
$container[10] = $entry_advanced[1];
|
||||
# Works now .. whoosh!
|
||||
if ($container[10]) {
|
||||
if ($container[10] ne "") {
|
||||
$container[10] = $entry_advanced[1] if $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 {
|
||||
push(@original_container,$entry_advanced[1])
|
||||
if $entry_advanced[1];
|
||||
}
|
||||
|
||||
# pretty complex and works properly
|
||||
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]);
|
||||
# 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
|
||||
# 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;
|
||||
|
||||
# Got it!
|
||||
if ($container[10] and $container[10] eq "") {
|
||||
# Got it! - how to deal with fields with no init value
|
||||
if (defined $container[10] and $container[10] eq "") {
|
||||
$container[10] = $entry_advanced[1];
|
||||
}
|
||||
if ($container[11] eq "") {
|
||||
$container[11] = $entry_advanced[2]
|
||||
if (!defined $container[10]) {
|
||||
$container[10] = $entry_advanced[1];
|
||||
}
|
||||
if (defined $container[11] and $container[11] eq "") {
|
||||
$container[11] = $entry_advanced[2];
|
||||
}
|
||||
if (!defined $container[11]) {
|
||||
$container[11] = $entry_advanced[2];
|
||||
}
|
||||
|
||||
# no sense looking at undef values
|
||||
@ -958,7 +981,7 @@ elsif (defined $container[0] && defined $container[1] &&
|
||||
splice(@temp_container,1,1);
|
||||
|
||||
# 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;
|
||||
grep($diff{$_}++,@temp_container);
|
||||
@ -979,9 +1002,6 @@ elsif (defined $container[0] && defined $container[1] &&
|
||||
}
|
||||
|
||||
# reset
|
||||
|
||||
# entry fun
|
||||
|
||||
@original_container = ($container[0],$root_image,$device,$size,
|
||||
$compress,$container[6],$container[7],
|
||||
$container[8],$container[9],$container[10],
|
||||
|
Loading…
x
Reference in New Issue
Block a user