This commit is contained in:
Cameron (Kamran) Mashayekhi 2005-10-27 23:21:53 +00:00
parent 3012345ebd
commit 5f5e1c891c

View File

@ -23,37 +23,32 @@ 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"
do
if [ -f $name ]
then
awk '
/auth/ { authSeen++; }
/account/ {
if (!acctSeen && authSeen)
{
print "auth\trequired\tpam_micasa.so\n";}
acctSeen++;
}
# /session/ { sesSeen++; }
// {print $0; }
END
# { if (sesSeen)
# print "session\trequired\tpam_micasa.so\n"; }
' $file > $file.sav
mv $file.sav $file
for 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 ]
then
awk '
/auth/ { authSeen++; }
/account/ {
if (!acctSeen && authSeen)
{
print "auth\trequired\tpam_micasa.so\n";}
acctSeen++;
}
/session/ { sesSeen++; }
// {print $0; }
END { if (sesSeen)
print "session\trequired\tpam_micasa.so\n"; }
' $file > $file.sav
mv $file.sav $file
fi
done
startproc -f $MICASAD_BIN
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting miCASA daemon down"
#killproc -TERM $MICASAD_BIN
pid=`cat /var/run/micasad.pid`
kill -s TERM $pid
@ -66,7 +61,6 @@ case "$1" in
mv $file.sav $file
fi
done
# Remember status and be verbose
rc_status -v
;;