diff --git a/ChangeLog b/ChangeLog index ef75489c..0f527d2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-05-02 Mats Erik Andersson + + * tests/inetd.sh (PASSWD, PWDDB, PROTOCOLS): New variables. + Check for system files required by `inetd'. Skip test when + not found, which can happen in incomplete chroots. + 2015-04-17 Mats Erik Andersson * ftpd/conf.c, ftpd/ftpd.c, ifconfig/system/bsd.c, diff --git a/tests/inetd.sh b/tests/inetd.sh index ab51945d..8a9b1809 100755 --- a/tests/inetd.sh +++ b/tests/inetd.sh @@ -37,6 +37,30 @@ USER=${USER:-`func_id_user`} # $need_mktemp || exit_no_mktemp +PASSWD=/etc/passwd +PWDDB=/etc/pwd.db +PROTOCOLS=/etc/protocols + +# Keep the following two tests separate for better diagnosis! +# +if test ! -r $PROTOCOLS; then + cat <<-EOT >&2 + This test requires the availability of "$PROTOCOLS", + a file which can not be found in the current system. + Therefore skipping this test. + EOT + exit 77 +fi + +if test ! -r $PASSWD && test ! -r $PWDDB; then + cat <<-EOT >&2 + This test requires availability of either "$PASSWD" + or "$PWDDB". The requirement can not be met in the + current system. Therefore skipping this test. + EOT + exit 77 +fi + # Execution control. Initialise early! # do_cleandir=false