Browse Source

Made the termcap check just a warning if terminfo or termcap don't exist,

If a terminfo directory is found, linux will need to exist or the test will
return error.  This is better because the root filesystem can still work
if this information doesn't exist.  A minority of gettys will fail if they
use termcap or terminfo, but this check was removed from the chrooted tests
several months ago for the reason just cited.  Note: check_getty_type_call
was removed from Yard.pm, but exists in chrooted tests without the termcap
check.  Also, added a close which was missing.
master
freesource 23 years ago
parent
commit
58e7a202da
  1. 42
      BootRoot/Yard.pm
  2. 16
      Changes

42
BootRoot/Yard.pm

@ -2246,12 +2246,19 @@ sub which_tests {
## from distribution to distribution, and more than likely this is the ## from distribution to distribution, and more than likely this is the
## "login" used in the mounted version, too. ## "login" used in the mounted version, too.
## Once PATH is complete, there will be a separate check just to look at ## Once PATH is complete, there will be a separate check just to look at
## the non-local $mount_point PATH. ## the non-local $mount_point PATH. --freesource
$login_binary = "$mount_point" . find_file_in_path("login"); $login_binary = "$mount_point" . find_file_in_path("login");
# This goes first so we define %Termcap for use in children # This goes first so we define %Termcap for use in children
## This now checks for ncurse setups, too. ## This now checks for ncurse setups, too.
## This is a nice auto test to have, but issuing warning
## is more appropriate, and this function isn't used by
## the chrooted tests anymore, before it was used by
## check_getty_type_call from withing test_inittab, but this
## is mostly an agetty issue .. ususually a root_fs can
## run quite nicely with a getty without a termcap or
## terminfo. --freesource
if ( $fs_type ne "genext2fs" ) { if ( $fs_type ne "genext2fs" ) {
return "ERROR" if errm(mount_device($device,$mount_point)) == 2; return "ERROR" if errm(mount_device($device,$mount_point)) == 2;
check_termcap(); check_termcap();
@ -2630,33 +2637,6 @@ sub check_scripts {
find(\&check_interpreter, "/"); find(\&check_interpreter, "/");
} }
sub check_getty_type_call {
my($prog, @args) = @_;
if ($prog eq 'getty') {
my($tty, $speed, $type) = @args;
if (!-e "$mount_point/dev/$tty") {
warning_test "\tLine $.: $prog for $tty, but /dev/$tty doesn't exist.\n";
}
if (!defined($Termcap{$type})) {
warning_test "\tLine $.: Type $type not defined in termcap\n";
}
}
## If getty or getty_ps, look for /etc/gettydefs, /etc/issue
## Check that term type matches one in termcap db.
if ($prog =~ /^getty/) {
if (!$checked_for_getty_files) {
warning_test "\tLine $.: $prog expects /etc/gettydefs, which is missing.\n"
unless -e "$mount_point/etc/gettydefs";
warning_test "\tLine $.: $prog expects /etc/issue, which is missing.\n"
unless -e "$mount_point/etc/issue";
$checked_for_getty_files = 1;
}
}
}
### ###
### NB. This is *not* run under chroot ### NB. This is *not* run under chroot
### ###
@ -2784,6 +2764,7 @@ sub check_termcap {
@Termcap{@terms} = (1) x ($#terms + 1); @Termcap{@terms} = (1) x ($#terms + 1);
} }
close(TERMCAP);
} }
# termcap next # termcap next
@ -2815,8 +2796,9 @@ sub check_termcap {
close(TERMCAP); close(TERMCAP);
} }
else { else {
$error = error("No termcap file or terminfo directory.");
return if $error && $error eq "ERROR"; return warning_test("Warning: No file $mount_point/etc/terminfo/l/linux"
. " or $mount_point/etc/termcap");
} }
} # end sub check_termcap } # end sub check_termcap

16
Changes

@ -1,9 +1,17 @@
1.3.0 - 12/07/2001 1.3.0 - 12/07/2001
------------------ ------------------
Removed an unecessary check from the fstab test, and improved a regexp which Made the termcap check just a warning if terminfo or termcap don't exist,
was failing if tabs were used in the fstab. Also, added a close for the If a terminfo directory is found, linux will need to exist or the test will
background termcap test. return error. This is better because the root filesystem can still work
if this information doesn't exist. A minority of gettys will fail if they
use termcap or terminfo, but this check was removed from the chrooted tests
several months ago for the reason just cited. Note: check_getty_type_call
was removed from Yard.pm, but exists in chrooted tests without the termcap
check. Also, added a close which was missing.
Removed an unnecessary check from the fstab test, and improved a regexp which
was failing if tabs were used in the fstab.
State is saved for all check buttons when the yard box is opened and State is saved for all check buttons when the yard box is opened and
closed. Deciding whether to save state between invocations of gbootroot closed. Deciding whether to save state between invocations of gbootroot
@ -114,7 +122,7 @@ device hadn't been umounted yet, this was observed with genext2fs but was
certainly a global bug. This has been fixed. certainly a global bug. This has been fixed.
The majority of add-on replacements except for passwd*, shadow, and The majority of add-on replacements except for passwd*, shadow, and
ld.so.conf have $Id: Changes,v 1.1 2001/12/07 07:02:04 freesource Exp $ and "make_debian replacement". ld.so.conf have $Id: Changes,v 1.2 2001/12/08 03:20:22 freesource Exp $ and "make_debian replacement".
Original CVS information is now preserved so Original CVS information is now preserved so
that non-root users and root can't edit global replacements, the basic idea that non-root users and root can't edit global replacements, the basic idea

Loading…
Cancel
Save