- fix subsys locking in initscript

This commit is contained in:
Peter Jones 2006-09-13 19:12:56 +00:00
parent 7164c59053
commit e56f10fca8
2 changed files with 11 additions and 5 deletions

View File

@ -42,7 +42,7 @@ start(){
RETVAL=$?
echo
if test $RETVAL = 0 ; then
touch /var/lock/subsys/$prog
touch /var/lock/subsys/setroubleshoot
fi
return $RETVAL
}
@ -52,7 +52,7 @@ stop(){
killproc $prog
RETVAL=$?
echo
rm -f /var/lock/subsys/$prog
rm -f /var/lock/subsys/setroubleshoot
return $RETVAL
}
@ -70,13 +70,13 @@ restart(){
}
condrestart(){
[ -e /var/lock/subsys/$prog ] && restart
[ -e /var/lock/subsys/setroubleshoot ] && restart
return 0
}
cleardb(){
running=0
[ -e /var/lock/subsys/$prog ] && running=1
[ -e /var/lock/subsys/setroubleshoot ] && running=1
[ $running == 1 ] && stop
echo $"Clearing database"
rm -f /var/lib/setroubleshoot/database.xml

View File

@ -1,7 +1,7 @@
Summary: Helps troubleshoot SELinux problems
Name: setroubleshoot
Version: 0.42
Release: 1
Release: 2
License: GPL
Group: Applications/System
URL: http://www.redhat.com/
@ -64,6 +64,9 @@ touch %{buildroot}%{pkgvardatadir}/database.xml
%find_lang %{name}
%post
if [ -f /var/lock/subsys/setroubleshootd ]; then
mv /var/lock/subsys/setroubleshootd /var/lock/subsys/setroubleshoot
fi
[ -f %{pkgvardatadir}/database.xml ] && chmod 644 %{pkgvardatadir}/database.xml
/usr/bin/update-desktop-database %{_datadir}/applications
/sbin/chkconfig --add %{name}
@ -108,6 +111,9 @@ rm -rf %{buildroot}
%{_datadir}/dbus-1/services/sealert.service
%changelog
* Wed Sep 13 2006 Peter Jones <pjones@redhat.com> - 0.42-2
- Fix subsystem locking in init script
* Thu Sep 7 2006 Dan Walsh <dwalsh@redhat.com> - 0.42-1
- Karl MacMillan
* Add rpm information for target.