#!/bin/bash
set -x
#
DESKTOP=`grep -i desktop /etc/SuSE-release`
INS=`rpm -qa |grep ^CASA-[1-9]`
if [ "$INS" != "" ]
then
    if [ "$DESKTOP" != "" ]
    then
	PAM=`find /etc/pam.d -exec grep -i casa \{\} \;`
	if [ "$PAM" != "" ]
	then
		exit 0
	else
		exit 1
	fi
    else
	CONFIGED=`chkconfig --list | grep -i micasad | grep -i on`
	if [ "$CONFIGED" == "" ]
	then
	    exit 1
	else
            exit 0
	fi    
    fi
else
exit 0
fi	


