#!/bin/sh
# etc-tc.sh : test case for /etc directory

##########################################################################
# (C) Copyright 1998-2001 The Open Group
#
# All rights reserved.  No part of this source code may be reproduced,
# stored in a retrieval system, or transmitted, in any form or by any
# means, electronic, mechanical, photocopying, recording or otherwise,
# except as stated in the end-user licence agreement, without the prior
# permission of the copyright owners.
#
# X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
# the UK and other countries.
#
#	PROJECT:	LSB-FHS
#	PRODUCT:	LSB.fhs/root/etc/etc-tc.sh
#	AUTHOR:		Andrew Josey, The Open Group
#	DATE CREATED:	21 Dec 1998
##########################################################################

# This is $Revision: 1.9 $
#
# $Log: etc-tc.sh,v $
# Revision 1.9  2004/02/12 13:24:19  ajosey
# update tps 8,9,10,11,13,14,16,18,19,20,22,25,27,28,33 and 36 changing FIP to UNSUPPORTED for class C assertions
#
# Revision 1.8  2002/09/23 13:41:07  ajosey
# tps 7,23,24,29,30,31,32 and 38 now return UNSUPPORTED rather than FIP
#
# Revision 1.7  2001/08/14 14:27:36  ajosey
# update the assertion numbers for FHS2.2
#
# Revision 1.6  2001/07/19 11:29:45  ajosey
# update for FHS2.2
#
# Revision 1.5  2001/07/18 15:14:43  ajosey
# alignment of tests, and addition of tp38 for FHS2.2
#
# Revision 1.4  2001/07/18 09:31:59  ajosey
# alignment of further tests for FHS2.2
#
# Revision 1.3  2001/07/17 16:46:35  ajosey
# update tps 4,5,6,12,21 for FHS2.2
#
# Revision 1.2  2001/07/17 16:40:53  ajosey
# add copyright header and cvs log info
#
#
# -- original cvs history below now out of date
# This is 1.4
#
# etc-tc.sh,v
# Revision 1.4  2000/04/16 09:14:47  ajosey
# update comment on line 2
#
# Revision 1.3  2000/04/16 09:13:00  ajosey
# revert to pass/fail for tps 4,12,15,22,23,27,28,29,30 and 33 for FHS2.1
#
# Revision 1.2  2000/04/09 07:15:22  cyeoh
# Added CVS header information
#
#

tet_startup="startup"			# startup function
tet_cleanup="cleanup"			# cleanup function
iclist="ic1 ic2 ic3 ic4 ic5 ic6 ic7 ic8 ic9 ic10 ic11 ic12 ic13 ic14 ic15 ic16 ic17 ic18 ic19 ic20 ic21 ic22 ic23 ic24 ic25 ic26 ic27 ic28 ic29 ic30 ic31 ic32 ic33 ic34 ic35 ic36 ic37 ic38"
ic1="tp1"
ic2="tp2"
ic3="tp3"
ic4="tp4"
ic5="tp5"
ic6="tp6"
ic7="tp7"
ic8="tp8"
ic9="tp9"
ic10="tp10"
ic11="tp11"
ic12="tp12"
ic13="tp13"
ic14="tp14"
ic15="tp15"
ic16="tp16"
ic17="tp17"
ic18="tp18"
ic19="tp19"
ic20="tp20"
ic21="tp21"
ic22="tp22"
ic23="tp23"
ic24="tp24"
ic25="tp25"
ic26="tp26"
ic27="tp27"
ic28="tp28"
ic29="tp29"
ic30="tp30"
ic31="tp31"
ic32="tp32"
ic33="tp33"
ic34="tp34"
ic35="tp35"
ic36="tp36"
ic37="tp37"
ic38="tp38"


tp1()
{
	tpstart "Reference 3.7-1(A)" 
	tet_infoline "The /etc directory exists and is searchable"

	lsb_test_dir_searchable /etc >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult				# set result code
}

tp2() 
{
	tpstart "Reference 3.7-2(A)"
	tet_infoline "The implementation provides the file /etc/adjtime"
	tet_infoline "Note: not in use in FHS 2.2"
	tpresult NOTINUSE			# set result code

#	lsb_test_file /etc/adjtime >out.stdout 2>out.stderr 
#	check_exit_value $? 0
#	check_nostdout			# should be no stdout
#	check_nostderr			# should be no stderr
#	tpresult			# set result code
}
tp3() 
{
	tpstart "Reference 3.7-3(C)"
	tet_infoline "If the implementation provides a C-shell"
	tet_infoline "	The implementation provides the file /etc/csh.login"
	tet_infoline "	(test dependent on the LSB_C_SHELL_SUPP parameter)"

	if test -z $LSB_C_SHELL_SUPP
	then
		tpresult UNSUPPORTED
		return
	fi
	lsb_test_file /etc/csh.login >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult			# set result code
}
tp4() 
{
	tpstart "Reference 3.7-4(A)"
	tet_infoline "The implementation provides the file /etc/disktab"
	tet_infoline "Note: not in use in FHS 2.2"
	tpresult NOTINUSE			# set result code
#	lsb_test_file /etc/disktab >out.stdout 2>out.stderr 
#	check_exit_value $? 0
#	check_nostdout			# should be no stdout
#	check_nostderr			# should be no stderr
#	if [ $FAIL = Y ]
#	then
#		tet_infoline "/etc/disktab not found"
#		if [ "$LSB_FHS_TEST_MODE" = "2.0" ]
#		then 
#		    tet_infoline "This appears to be an issue with the FHS2.0 specification"
#		    FAIL=N
#		    tpresult WARNING
#		else
#		    tpresult FAIL
#		fi
#	else
#		tpresult		# set result code
#	fi
}

tp5() 
{
	tpstart "Reference 3.7-5(A)"
	tet_infoline "The implementation provides the file /etc/fdprm"
	tet_infoline "Note: not in use in FHS 2.2"
	tpresult NOTINUSE			# set result code
#	lsb_test_file /etc/fdprm >out.stdout 2>out.stderr 
#	check_exit_value $? 0
#	check_nostdout			# should be no stdout
#	check_nostderr			# should be no stderr
#	tpresult			# set result code
}

tp6() 
{
	tpstart "Reference 3.7-6(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/fstab"
	lsb_test_file /etc/fstab >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp7() 
{
# now optional in FHS2.2
	tpstart "Reference 3.7-7(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/gettydefs"
	lsb_test_file /etc/gettydefs >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "/etc/gettydefs not supported"
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp8() 
{
	tpstart "Reference 3.7-8(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/group"
	lsb_test_file /etc/group >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp9() 
{
	tpstart "Reference 3.7-9(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/inittab"
	lsb_test_file /etc/inittab >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp10() 
{
	tpstart "Reference 3.7-10(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/issue"
	lsb_test_file /etc/issue >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp11() 
{
	tpstart "Reference 3.7-11(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/ld.so.conf"
	lsb_test_file /etc/ld.so.conf >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp12() 
{
	tpstart "Reference 3.7-12(A)"
	tet_infoline "The implementation provides the file /etc/lilo.conf"
	tet_infoline "Note: not in use in FHS 2.2"
	tpresult NOTINUSE			# set result code
#	lsb_test_file /etc/lilo.conf >out.stdout 2>out.stderr 
#	check_exit_value $? 0
#	check_nostdout			# should be no stdout
#	check_nostderr			# should be no stderr
#	if [ $FAIL = Y ]
#	then
#		tet_infoline "/etc/lilo.conf not found"
#		if [ "$LSB_FHS_TEST_MODE" = "2.0" ]
#		then 
#		    tet_infoline "This appears to be an issue with the FHS2.0 specification"
#		    tet_infoline "since on sparc the file is called silo.conf, and on alpha milo.conf"
#		    tet_infoline "This test will probably be updated to test conditionally since "
#		    tet_infoline "lilo.conf may also not exist on x86"
#		    FAIL=N
#		    tpresult WARNING
#		else
#		    tpresult FAIL
#		fi
#	else
#		tpresult		# set result code
#	fi
}

tp13() 
{
	tpstart "Reference 3.7-13(A)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/motd"
	lsb_test_file /etc/motd >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp14() 
{
	tpstart "Reference 3.7-14(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/mtab"
	lsb_test_file /etc/mtab >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp15() 
{
	tpstart "Reference 3.7-15(C)"
# previously this was /etc/mtools, now updated to mtools.conf in FHS2.2
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/mtools.conf"
	lsb_test_file /etc/mtools.conf >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp16() 
{
	tpstart "Reference 3.7-16(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/passwd"
	lsb_test_file /etc/passwd >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "This test result needs to be manually resolved, returning FIP result"
		tpresult FIP
		return
	fi
	tpresult			# set result code
}

tp17() 
{
	tpstart "Reference 3.7-17(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/profile"
	lsb_test_file /etc/profile >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "This test result needs to be manually resolved, returning FIP result"
		tpresult FIP
		return
	fi
	tpresult			# set result code
}

tp18() 
{
# now optional in FHS2.2
	tpstart "Reference 3.7-18(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/securetty"
	lsb_test_file /etc/securetty >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp19() 
{
	tpstart "Reference 3.7-19(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/shells"
	lsb_test_file /etc/shells >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp20() 
{
	tpstart "Reference 3.7-20(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/syslog.conf"
	lsb_test_file /etc/syslog.conf >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult			# set result code
}

tp21() 
{
	tpstart "Reference 3.7-21(A)"
	tet_infoline "The implementation provides the file /etc/ttytype"
	tet_infoline "Note: not in use in FHS 2.2"
	tpresult NOTINUSE			# set result code
#	lsb_test_file /etc/ttytype >out.stdout 2>out.stderr 
#	check_exit_value $? 0
#	check_nostdout			# should be no stdout
#	check_nostderr			# should be no stderr
#	tpresult			# set result code
}

tp22() 
{
#now optional in FHS2.2
	tpstart "Reference 3.7-22(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/exports"
	lsb_test_file /etc/exports >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp23() 
{
	tpstart "Reference 3.7-23(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/ftpusers"
	lsb_test_file /etc/ftpusers >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "/etc/ftpusers not supported"
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp24() 
{
	tpstart "Reference 3.7-24(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/gateways"
	lsb_test_file /etc/gateways >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "/etc/gateways not supported"
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp25() 
{
	tpstart "Reference 3.7-25(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/host.conf"
	lsb_test_file /etc/host.conf >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp26() 
{
	tpstart "Reference 3.7-26(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/hosts"
	lsb_test_file /etc/hosts >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "This test result needs to be manually resolved, returning FIP result"
		tpresult FIP
		return
	fi
	tpresult		# set result code
}

tp27() 
{
	tpstart "Reference 3.7-27(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/hosts.allow"
	lsb_test_file /etc/hosts.allow >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp28() 
{
	tpstart "Reference 3.7-28(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/hosts.deny"
	lsb_test_file /etc/hosts.deny >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}
tp29() 
{
	tpstart "Reference 3.7-29(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/hosts.equiv"
	lsb_test_file /etc/hosts.equiv >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "/etc/hosts.equiv not supported"
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

# now optional in FHS 2.2
tp30() 
{
	tpstart "Reference 3.7-30(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "The implementation provides the file /etc/hosts.lpd"
	lsb_test_file /etc/hosts.lpd >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "/etc/hosts.lpd not supported"
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp31() 
{
	tpstart "Reference 3.7-31(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/inetd.conf"
	lsb_test_file /etc/inetd.conf >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "/etc/inetd.conf not supported"
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp32() 
{
	tpstart "Reference 3.7-32(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/networks"
	lsb_test_file /etc/networks >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "/etc/networks not supported"
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp33() 
{
	tpstart "Reference 3.7-33(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/printcap"
	lsb_test_file /etc/printcap >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp34() 
{
	tpstart "Reference 3.7-34(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/protocols"
	lsb_test_file /etc/protocols >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "This test result needs to be manually resolved, returning FIP result"
		tpresult FIP
		return
	fi
	tpresult		# set result code
}

tp35() 
{
	tpstart "Reference 3.7-35(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/resolv.conf"
	lsb_test_file /etc/resolv.conf >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "This test result needs to be manually resolved, returning FIP result"
		tpresult FIP
		return
	fi
	tpresult		# set result code
}

tp36() 
{
	tpstart "Reference 3.7-36(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/rpc"
	lsb_test_file /etc/rpc >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
#update for LSB2.0/FHS2.3 return UNSUPPORTED
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}

tp37() 
{
	tpstart "Reference 3.7-37(C)"
	tet_infoline "If the implementation supports the subsystem"
	tet_infoline "the implementation provides the file /etc/services"
	lsb_test_file /etc/services >out.stdout 2>out.stderr 
	check_exit_value $? 0
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "This test result needs to be manually resolved, returning FIP result"
		tpresult FIP
		return
	fi
	tpresult		# set result code
}

# new in FHS2.2
tp38()
{
	tpstart "Reference 3.7-38(C)" 
	tet_infoline "If the system supports the subsystem"
	tet_infoline "the /etc/sgml directory exists and is searchable"

	lsb_test_dir_searchable /etc/sgml >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	if [ $FAIL = Y ]
	then
		FAIL=N
		tet_infoline "/etc/sgml not supported"
		tpresult UNSUPPORTED
		return
	fi
	tpresult		# set result code
}


startup() # startup function
{
     rm -f out.stdout out.stderr out.experr >/dev/null 2>&1
}


cleanup() # clean-up function
{
     rm -f out.stdout out.stderr out.experr >/dev/null 2>&1
}

# source common shell functions

. $TET_EXECUTE/LIB/shfuncs.sh
. $TET_EXECUTE/LIB/lsbfuncs.sh

# execute shell test case manager - must be last line
. $TET_ROOT/lib/xpg3sh/tcm.sh
