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

View File

@ -1,7 +1,7 @@
Summary: Helps troubleshoot SELinux problems Summary: Helps troubleshoot SELinux problems
Name: setroubleshoot Name: setroubleshoot
Version: 0.42 Version: 0.42
Release: 1 Release: 2
License: GPL License: GPL
Group: Applications/System Group: Applications/System
URL: http://www.redhat.com/ URL: http://www.redhat.com/
@ -64,6 +64,9 @@ touch %{buildroot}%{pkgvardatadir}/database.xml
%find_lang %{name} %find_lang %{name}
%post %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 [ -f %{pkgvardatadir}/database.xml ] && chmod 644 %{pkgvardatadir}/database.xml
/usr/bin/update-desktop-database %{_datadir}/applications /usr/bin/update-desktop-database %{_datadir}/applications
/sbin/chkconfig --add %{name} /sbin/chkconfig --add %{name}
@ -108,6 +111,9 @@ rm -rf %{buildroot}
%{_datadir}/dbus-1/services/sealert.service %{_datadir}/dbus-1/services/sealert.service
%changelog %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 * Thu Sep 7 2006 Dan Walsh <dwalsh@redhat.com> - 0.42-1
- Karl MacMillan - Karl MacMillan
* Add rpm information for target. * Add rpm information for target.