nomsg
This commit is contained in:
parent
92075e8aff
commit
3012345ebd
@ -24,6 +24,28 @@ 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
|
||||
fi
|
||||
|
||||
startproc -f $MICASAD_BIN
|
||||
|
||||
# Remember status and be verbose
|
||||
@ -36,7 +58,15 @@ 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"
|
||||
do
|
||||
if [ -f $name ]
|
||||
then
|
||||
sed '/pam_micasa/d' $file > $file.sav
|
||||
mv $file.sav $file
|
||||
fi
|
||||
done
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
|
@ -182,57 +182,50 @@ cp %{buildroot}%{prefix}/CASA/bin/micasad %{buildroot}/etc/init.d
|
||||
if [ $1 -eq 1 ]
|
||||
then
|
||||
insserv /etc/init.d/micasad
|
||||
%ifarch x86_64
|
||||
echo "/opt/novell/CASA/lib64/" >> /etc/ld.so.conf.d/CASA.conf
|
||||
echo "/opt/novell/CASA/%{_lib}/" >> /etc/ld.so.conf.d/CASA.conf
|
||||
/sbin/ldconfig
|
||||
%else
|
||||
echo "/opt/novell/CASA/lib/" >> /etc/ld.so.conf.d/CASA.conf
|
||||
/sbin/ldconfig
|
||||
%endif
|
||||
|
||||
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"
|
||||
# for file in "/etc/security/pam_unix2.conf"
|
||||
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
|
||||
# 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
|
||||
|
||||
fi
|
||||
%preun
|
||||
|
||||
if [ $1 -eq 0 ]
|
||||
then
|
||||
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"
|
||||
# for file in "/etc/security/pam_unix2.conf"
|
||||
do
|
||||
if [ -f $name ]
|
||||
then
|
||||
sed '/pam_micasa/d' $file > $file.sav
|
||||
mv $file.sav $file
|
||||
fi
|
||||
done
|
||||
|
||||
sed '/CASA/d' "/etc/ld.so.conf" > "/etc/ld.so.conf.sav"
|
||||
mv /etc/ld.so.conf.sav /etc/ld.so.conf
|
||||
|
||||
/sbin/ldconfig
|
||||
insserv -r /etc/init.d/micasad
|
||||
# do
|
||||
# if [ -f $name ]
|
||||
# then
|
||||
# sed '/pam_micasa/d' $file > $file.sav
|
||||
# mv $file.sav $file
|
||||
# fi
|
||||
# done
|
||||
#
|
||||
rm -f /etc/ld.so.conf.d/CASA.conf
|
||||
/sbin/ldconfig
|
||||
insserv -r /etc/init.d/micasad
|
||||
fi
|
||||
|
||||
%clean
|
||||
|
Loading…
Reference in New Issue
Block a user