From 5939e9b0b19d6daf9f8aecc09dc4ca75bfb68efa Mon Sep 17 00:00:00 2001 From: Jiří Moskovčák Date: May 21 2010 13:38:43 +0000 Subject: - spec file fixes rhbz#593670 - updated init script --- diff --git a/abrt.init b/abrt.init index f1dc410..dde5950 100644 --- a/abrt.init +++ b/abrt.init @@ -11,24 +11,32 @@ # Default-Stop: 0 1 2 6 # Default-Start: 3 5 # Short-Description: start and stop abrt daemon -# Description: Listen and dispatch crash events +# Description: Listen to and dispatch crash events ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions - +ABRT_BIN="/usr/sbin/abrtd" +LOCK="/var/lock/subsys/abrtd" +OLD_LOCK="/var/lock/subsys/abrt" RETVAL=0 # +# Set these variables if you are behind proxy +# +#export http_proxy= +#export https_proxy= + +# # See how we were called. # check() { # Check that we're a privileged user - [ `id -u` = 0 ] || exit 4 + [ "`id -u`" = 0 ] || exit 4 # Check if abrt is executable - test -x /usr/sbin/abrtd || exit 5 + test -x $ABRT_BIN || exit 5 } start() { @@ -36,11 +44,11 @@ start() { check # Check if it is already running - if [ ! -f /var/lock/subsys/abrt ]; then + if [ ! -f $LOCK ] && [ ! -f $OLD_LOCK ]; then echo -n $"Starting abrt daemon: " - daemon /usr/sbin/abrtd + daemon $ABRT_BIN RETVAL=$? - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/abrt + [ $RETVAL -eq 0 ] && touch $LOCK echo fi return $RETVAL @@ -51,9 +59,10 @@ stop() { check echo -n $"Stopping abrt daemon: " - killproc /usr/sbin/abrtd + killproc $ABRT_BIN RETVAL=$? - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/abrt + [ $RETVAL -eq 0 ] && rm -f $LOCK + [ $RETVAL -eq 0 ] && rm -f $OLD_LOCK echo return $RETVAL } @@ -86,12 +95,16 @@ restart) restart ;; condrestart) - if [ -f /var/lock/subsys/abrt ]; then - restart + if [ -f $LOCK ]; then + restart + fi + # update from older version + if [ -f $OLD_LOCK ]; then + restart fi ;; status) - status abrt + status abrtd RETVAL=$? ;; *) diff --git a/abrt.spec b/abrt.spec index 2c849ce..9e02313 100644 --- a/abrt.spec +++ b/abrt.spec @@ -11,7 +11,7 @@ %if 0%{?_buildid} %define pkg_release 0.%{?_buildid}%{?dist} %else -%define pkg_release 1%{?dist} +%define pkg_release 2%{?dist} %endif Summary: Automatic bug detection and reporting tool @@ -261,6 +261,7 @@ install -m 755 %SOURCE1 ${RPM_BUILD_ROOT}/%{_initrddir}/abrtd mkdir -p $RPM_BUILD_ROOT/var/cache/%{name} mkdir -p $RPM_BUILD_ROOT/var/cache/%{name}-di mkdir -p $RPM_BUILD_ROOT/var/run/%{name} +mkdir -p $RPM_BUILD_ROOT/var/spool/%{name} desktop-file-install \ --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ @@ -322,6 +323,7 @@ fi %config(noreplace) %{_sysconfdir}/dbus-1/system.d/dbus-%{name}.conf %{_initrddir}/%{name}d %dir %attr(0755, abrt, abrt) %{_localstatedir}/cache/%{name} +%dir %attr(0755, abrt, abrt) %{_localstatedir}/spool/%{name} %dir /var/run/%{name} %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/plugins @@ -462,6 +464,10 @@ fi %defattr(-,root,root,-) %changelog +* Fri May 21 2010 Jiri Moskovcak 1.1.2-3 +- fixed spec file to create /var/spool/abrt rhbz#593670 +- updated init script to reflect the pid file renaming + * Wed May 19 2010 Jiri Moskovcak 1.1.2-1 - updated translation - obsolete gnome-python2-bugbuddy rhbz#579748 (jmoskovc@redhat.com)