Browse Source

This gets read_contents_file working, hopefully error() is the only gtk related

sub to watch out for.
master
freesource 22 years ago
parent
commit
2f4e1cdcc6
  1. 40
      BootRoot/BootRoot.pm
  2. 7
      BootRoot/Yard.pm

40
BootRoot/BootRoot.pm

@ -779,7 +779,7 @@ else {
# STAGE LOGIC - skip space_left and test # STAGE LOGIC - skip space_left and test
# Stages all have my $error return if $error && $error eq "ERROR"; # Stages all have my $error return if $error && $error eq "ERROR";
# kernel_version_check() # kernel_version_check() -- automatically
# #
# check() read_contents_file( "$template_dir$template", $tmp, # check() read_contents_file( "$template_dir$template", $tmp,
# $filesystem_size, \%uml_expect ); # $filesystem_size, \%uml_expect );
@ -796,28 +796,50 @@ else {
# return if $error && $error eq "ERROR"; # return if $error && $error eq "ERROR";
# #
# create_uml() create_expect_uml($filesystem_size, $tmp, $filename); # create_uml() create_expect_uml($filesystem_size, $tmp, $filename);
########################################################
# Let's read in the ARGV # Let's read in the ARGV
die "specify a template found in $template_dir\nuse --template\n"
if !$option{template};
start_logging_output($verbosefn,$verbosity); # Yard "tmp dir name" start_logging_output($verbosefn,$verbosity); # Yard "tmp dir name"
# "verbosity level"
#info(1, "hello there\n");
# $kernel = $ars->{kernel};
# $kernel_version_choice = $ars->{kernel_version_choice};
my $it = kernel_version_check(); $ars->{kernel} = $option{kernel};
print $it; ars2($ars);
$ars->{kernel_version_choice} = $option{"kernel-version"};
ars2($ars);
# read_contents_file( "$template_dir$template", $tmp, #my $it = kernel_version_check($option{kernel},$option{"kernel-version"});
# $filesystem_size, \%uml_expect );
my $template = $option{template};
$option{"filesystem-size"}
? ($filesystem_size = $option{"filesystem-size"})
: ($filesystem_size = 8192);
#print kernel_version_check(), "Hi there!\n"; my $uml_exclusively = 0; # assume genext2fs
if ( $option{"uml-exclusively"} ) {
$option{"uml-exclusively"} eq "on"
? ($uml_exclusively = 1)
: ($uml_exclusively = 0);
}
$ars->{uml_exclusively} = $uml_exclusively;
ars2($ars); #not used in function below
read_contents_file( "$template_dir$template", $tmp,
$filesystem_size);
#print kernel_version_check(), "Hi there!\n";
######################################################
} # end if $::commandline } # end if $::commandline
} # end start } # end start

7
BootRoot/Yard.pm

@ -1,4 +1,4 @@
############################################################################ #############################################################################
## ##
## Yard.pm combining ## Yard.pm combining
## MAKE_ROOT_FS, CHECK_ROOT_FS, and YARD_UTILS.PL by Tom Fawcett ## MAKE_ROOT_FS, CHECK_ROOT_FS, and YARD_UTILS.PL by Tom Fawcett
@ -199,6 +199,7 @@ sub read_contents_file {
kernel_version_check($kernel, $kernel_version_choice); kernel_version_check($kernel, $kernel_version_choice);
# Open DEVICE_TABLE # Open DEVICE_TABLE
if ( $fs_type eq "genext2fs" ) { if ( $fs_type eq "genext2fs" ) {
unlink("$mnt/device_table.txt") if -e "$mnt/device_table.txt"; unlink("$mnt/device_table.txt") if -e "$mnt/device_table.txt";
@ -1660,7 +1661,7 @@ sub cf_die {
info(0, "$contents_file($cf_line): $line\n"); info(0, "$contents_file($cf_line): $line\n");
foreach (@msgs) { info(0, "\t$_\n"); } foreach (@msgs) { info(0, "\t$_\n"); }
my $output = join("\n",@msgs); my $output = join("\n",@msgs);
error_window("gBootRoot: ERROR: ", $output); error_window("gBootRoot: ERROR: ", $output) if !%option;
return "ERROR"; return "ERROR";
} }
@ -1838,7 +1839,7 @@ sub error {
print LOGFILE "Error: ", @_; print LOGFILE "Error: ", @_;
info(0, "Error: ", @_); info(0, "Error: ", @_);
error_window("gBootRoot: ERROR: ", @_); error_window("gBootRoot: ERROR: ", @_) if !%option;
return "ERROR"; return "ERROR";
} }

Loading…
Cancel
Save