Browse Source

This will now create an fstab when the Create/Replacements/fstab check box

is chosen.  The OLDROOT stuff from create_fstab are ignored, this isn't a
factor because gbootroot provides it's own boot methods.
master
freesource 24 years ago
parent
commit
a1443bfc21
  1. 73
      BootRoot/YardBox.pm

73
BootRoot/YardBox.pm

@ -1,4 +1,4 @@
############################################################################# ############################################################################
## ##
## YardBox.pm ## YardBox.pm
## Copyright (C) 2000 by Jonathan Rosenbaum ## Copyright (C) 2000 by Jonathan Rosenbaum
@ -155,14 +155,14 @@ my @menu_items = ( { path => '/File',
action => 16, action => 16,
type => '<CheckItem>', type => '<CheckItem>',
callback => \&check_stage }, callback => \&check_stage },
{ path => '/Create/Replacements/rc', ## { path => '/Create/Replacements/rc',
action => 17, ## action => 17,
type => '<CheckItem>', ## type => '<CheckItem>',
callback => \&check_stage }, ## callback => \&check_stage },
{ path => '/Create/Replacements/fstab directory name', ## { path => '/Create/Replacements/fstab directory name',
action => 18, ## action => 18,
type => '<Title>', ## type => '<Title>',
callback => \&check_stage }, ## callback => \&check_stage },
{ path => '/_Tests', { path => '/_Tests',
@ -659,7 +659,7 @@ sub tests {
else { else {
$tests{$action}{$label[0]} = 1; $tests{$action}{$label[0]} = 1;
} }
print "$label[0]", $tests{$action}{$label[0]} , "\n"; ## print "$label[0]", $tests{$action}{$label[0]} , "\n";
} }
@ -677,12 +677,12 @@ my %checks = (
16 => { 16 => {
fstab => 0, fstab => 0,
}, },
18 => { ## 18 => {
fstab_directory_name => 0, ## fstab_directory_name => 0,
}, ## },
17 => { ## 17 => {
rc => 0, ## rc => 0,
} ## }
); );
# try show hide & use variables # try show hide & use variables
@ -694,27 +694,36 @@ sub check_stage {
# off # off
if ($checks{$action}{$label[0]} == 1) { if ($checks{$action}{$label[0]} == 1) {
$checks{$action}{$label[0]} = 0; $checks{$action}{$label[0]} = 0;
if ($label[0] eq "fstab") { ## if ($label[0] eq "fstab") {
$item_factory->delete_item ## $item_factory->delete_item
('/Create/Replacements/fstab directory name'); ## ('/Create/Replacements/fstab directory name');
} ## }
} }
# on # on
else { else {
$checks{$action}{$label[0]} = 1; $checks{$action}{$label[0]} = 1;
# Fancy, but not quite what I want # Fancy, but not quite what I want
if ($label[0] eq "fstab") { ## if ($label[0] eq "fstab") {
$item_factory->delete_item ## $item_factory->delete_item
('/Create/Replacements/fstab directory name'); ## ('/Create/Replacements/fstab directory name');
$item_factory->create_item ## $item_factory->create_item
(['/Create/Replacements/fstab directory name', ## (['/Create/Replacements/fstab directory name',
undef, undef, <Item>]); ## undef, undef, <Item>]);
} ## }
}
# print "$label[0]", $checks{$action}{$label[0]} , "\n";
if ($label[0] eq "fstab") {
if ($checks{$action}{$label[0]} == 1) {
create_fstab("$main::global_yard/Replacements/etc/fstab.new");
}
} }
print "$label[0]", $checks{$action}{$label[0]} , "\n";
} }
########### ###########
# YARDBOX # # YARDBOX #
########### ###########
@ -794,6 +803,9 @@ sub yard_box {
# Check Stage Variables HOH = %checks # Check Stage Variables HOH = %checks
# ----------------------------------- # -----------------------------------
# 16 fstab 1 0 (default) # 16 fstab 1 0 (default)
## These next two were removed, because there isn't any
## script to make rc, and I can't remember what the
# fstab directory name entry was for. :*?
# 17 rc 1 0 (default # 17 rc 1 0 (default
# 18 'fstab directory name' if fstab == 0 # 18 'fstab directory name' if fstab == 0
# #
@ -1249,6 +1261,8 @@ sub Replacements {
#_______________________________________ #_______________________________________
# Submit button # Submit button
my $submit_b = button(0,1,2,3,"Submit",$table_replacements); my $submit_b = button(0,1,2,3,"Submit",$table_replacements);
#$submit_b->can_default($true);
#$submit_b->grab_default();
$submit_b->signal_connect( "clicked", sub { $submit_b->signal_connect( "clicked", sub {
if ($entry[0] && $entry[1]) { if ($entry[0] && $entry[1]) {
@ -1278,6 +1292,7 @@ sub Replacements {
} }
waitpid($pid,0); waitpid($pid,0);
} }
} ); } );
#_______________________________________ #_______________________________________
@ -1406,6 +1421,8 @@ sub file_ok_sel {
} }
###### Replacement Stuff
1; 1;

Loading…
Cancel
Save