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