These set of files has the changes needed to support the new location for the CASA install under the /usr directory.

This commit is contained in:
Cameron (Kamran) Mashayekhi
2006-02-07 21:05:39 +00:00
parent e59741c2ca
commit e6fccaf346
9 changed files with 182 additions and 197 deletions

View File

@@ -11,7 +11,7 @@
# Short-Description: miCASA daemon
# Description: miCASA daemon
### END INIT INFO
MICASAD_BIN=/opt/novell/CASA/bin/micasad.sh
MICASAD_BIN=/usr/bin/micasad.sh
test -x $MICASAD_BIN || exit 5
. /etc/rc.status
@@ -31,24 +31,28 @@ rc_reset
case "$1" in
start)
echo -n "Starting miCASA daemon"
for file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm"
for pam_file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm"
do
if [ -f $name ]
if [ -f $pam_file ]
then
awk '
/auth/ { authSeen++; }
/account/ {
if (!acctSeen && authSeen)
{
print "auth\trequired\tpam_micasa.so";}
acctSeen++;
}
/session/ { sesSeen++; }
// {print $0; }
END { if (sesSeen)
print "session\trequired\tpam_micasa.so"; }
' $file > $file.sav
mv $file.sav $file
MICASA_D=`grep -i micasad $pam_file`
if [ -z "$MICASA_D"]
then
awk '
/auth/ { authSeen++; }
/account/ {
if (!acctSeen && authSeen)
{
print "auth\trequired\tpam_micasa.so";}
acctSeen++;
}
/session/ { sesSeen++; }
// {print $0; }
END { if (sesSeen)
print "session\trequired\tpam_micasa.so"; }
' $pam_file > $pam_file.sav
mv $pam_file.sav $pam_file
fi
fi
done
startproc -f $MICASAD_BIN
@@ -61,12 +65,11 @@ case "$1" in
pid=`cat /var/run/micasad.pid`
kill -s TERM $pid
for file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm"
for pam_file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm"
do
if [ -f $name ]
if [ -f $pam_file ]
then
sed '/pam_micasa/d' $file > $file.sav
mv $file.sav $file
sed -i '/pam_micasa/d' $pam_file
fi
done
# Remember status and be verbose

View File

@@ -7,5 +7,5 @@ ARCH_LIB=
fi
export MONO_PATH=/opt/novell/CASA/lib$ARCH_LIB/
mono /opt/novell/CASA/bin/micasad.exe
export MONO_PATH=/usr/lib$ARCH_LIB/
mono /usr/bin/micasad.exe