mirror of
https://github.com/fspc/gbootroot.git
synced 2025-02-23 17:13:22 -05:00
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.
This commit is contained in:
parent
a9cee74c7e
commit
58e7a202da
@ -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
|
||||||
###
|
###
|
||||||
@ -2760,7 +2740,7 @@ sub check_termcap {
|
|||||||
# There should at least be a linux entry, and infocmp needs to exist.
|
# There should at least be a linux entry, and infocmp needs to exist.
|
||||||
my $infocmp = "infocmp -A $mount_point/etc/terminfo -C linux|";
|
my $infocmp = "infocmp -A $mount_point/etc/terminfo -C linux|";
|
||||||
|
|
||||||
open(TERMCAP, "$infocmp") or
|
open(TERMCAP, "$infocmp") or
|
||||||
( $error = error("No file $mount_point/etc/terminfo/l/linux"));
|
( $error = error("No file $mount_point/etc/terminfo/l/linux"));
|
||||||
return if $error && $error eq "ERROR";
|
return if $error && $error eq "ERROR";
|
||||||
|
|
||||||
@ -2784,12 +2764,13 @@ sub check_termcap {
|
|||||||
@Termcap{@terms} = (1) x ($#terms + 1);
|
@Termcap{@terms} = (1) x ($#terms + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(TERMCAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
# termcap next
|
# termcap next
|
||||||
elsif (-e "$mount_point/etc/termcap") {
|
elsif (-e "$mount_point/etc/termcap") {
|
||||||
|
|
||||||
open(TERMCAP, "<$mount_point/etc/termcap") or
|
open(TERMCAP, "<$mount_point/etc/termcap") or
|
||||||
( $error = error("No file $mount_point/etc/termcap"));
|
( $error = error("No file $mount_point/etc/termcap"));
|
||||||
return if $error && $error eq "ERROR";
|
return if $error && $error eq "ERROR";
|
||||||
|
|
||||||
@ -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
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…
x
Reference in New Issue
Block a user