diff --git a/testcases/commands/mail/mail_tests.sh b/testcases/commands/mail/mail_tests.sh index 7458944..a2c6487 100755 --- a/testcases/commands/mail/mail_tests.sh +++ b/testcases/commands/mail/mail_tests.sh @@ -59,6 +59,11 @@ RC=0 export TCID=SETUP export TST_COUNT=1 +`which mail` +if [ $? != 0 ]; then + MAIL_NOT_INSTALLED=1 +fi + # check if the user mail_test exists on this system. # if not add that user mail_test, will removed before exiting test. RC=$(awk '/^mail_test/ {print 1}' /etc/passwd) @@ -97,6 +102,7 @@ $LTPBIN/tst_resm TINFO "Test #1: mail root@localhost will send mail to root" $LTPBIN/tst_resm TINFO "Test #1: user on local machine." +if [ -z $MAIL_NOT_INSTALLED ]; then cat > $LTPTMP/tst_mail.in < $LTPTMP/tst_mail.in < $LTPTMP/tst_mail.in <