mirror of
https://github.com/fspc/gbootroot.git
synced 2025-02-23 09:03:23 -05:00
This gets read_contents_file working, hopefully error() is the only gtk related
sub to watch out for.
This commit is contained in:
parent
830a1c109a
commit
2f4e1cdcc6
@ -779,7 +779,7 @@ else {
|
||||
|
||||
# STAGE LOGIC - skip space_left and test
|
||||
# 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,
|
||||
# $filesystem_size, \%uml_expect );
|
||||
@ -796,27 +796,49 @@ else {
|
||||
# return if $error && $error eq "ERROR";
|
||||
#
|
||||
# create_uml() create_expect_uml($filesystem_size, $tmp, $filename);
|
||||
|
||||
########################################################
|
||||
# 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"
|
||||
|
||||
# "verbosity level"
|
||||
#info(1, "hello there\n");
|
||||
start_logging_output($verbosefn,$verbosity); # Yard "tmp dir name"
|
||||
|
||||
|
||||
|
||||
# $kernel = $ars->{kernel};
|
||||
# $kernel_version_choice = $ars->{kernel_version_choice};
|
||||
|
||||
my $it = kernel_version_check();
|
||||
print $it;
|
||||
$ars->{kernel} = $option{kernel};
|
||||
ars2($ars);
|
||||
$ars->{kernel_version_choice} = $option{"kernel-version"};
|
||||
ars2($ars);
|
||||
|
||||
# read_contents_file( "$template_dir$template", $tmp,
|
||||
# $filesystem_size, \%uml_expect );
|
||||
#my $it = kernel_version_check($option{kernel},$option{"kernel-version"});
|
||||
|
||||
my $template = $option{template};
|
||||
|
||||
$option{"filesystem-size"}
|
||||
? ($filesystem_size = $option{"filesystem-size"})
|
||||
: ($filesystem_size = 8192);
|
||||
|
||||
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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
############################################################################
|
||||
#############################################################################
|
||||
##
|
||||
## Yard.pm combining
|
||||
## 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);
|
||||
|
||||
# Open DEVICE_TABLE
|
||||
|
||||
if ( $fs_type eq "genext2fs" ) {
|
||||
|
||||
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");
|
||||
foreach (@msgs) { info(0, "\t$_\n"); }
|
||||
my $output = join("\n",@msgs);
|
||||
error_window("gBootRoot: ERROR: ", $output);
|
||||
error_window("gBootRoot: ERROR: ", $output) if !%option;
|
||||
return "ERROR";
|
||||
}
|
||||
|
||||
@ -1837,8 +1838,8 @@ sub info {
|
||||
sub error {
|
||||
|
||||
print LOGFILE "Error: ", @_;
|
||||
info(0, "Error: ", @_);
|
||||
error_window("gBootRoot: ERROR: ", @_);
|
||||
info(0, "Error: ", @_);
|
||||
error_window("gBootRoot: ERROR: ", @_) if !%option;
|
||||
return "ERROR";
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user