From 3c4870785a683d9d9a23160553483015a1fc08f3 Mon Sep 17 00:00:00 2001 From: Miroslav Grepl Date: Thu, 17 Sep 2009 09:44:36 +0000 Subject: [PATCH] - Fix init script --- mcstrans-0.3.1-init.patch | 65 +++++++++++++++++++++++++++++++++++++++ mcstrans.spec | 11 +++++-- 2 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 mcstrans-0.3.1-init.patch diff --git a/mcstrans-0.3.1-init.patch b/mcstrans-0.3.1-init.patch new file mode 100644 index 0000000..cd55fb3 --- /dev/null +++ b/mcstrans-0.3.1-init.patch @@ -0,0 +1,65 @@ +--- mcstrans-0.3.1/src/mcstrans.init~ 2009-09-16 11:01:17.646738932 +0200 ++++ mcstrans-0.3.1/src/mcstrans.init 2009-09-16 11:23:47.605763983 +0200 +@@ -20,6 +20,7 @@ + + PATH=/sbin:/bin:/usr/bin:/usr/sbin + prog="mcstransd" ++lockfile=/var/lock/subsys/$prog + + # Source function library. + . /etc/init.d/functions +@@ -54,7 +55,7 @@ + RETVAL=$? + echo + if test $RETVAL = 0 ; then +- touch /var/lock/subsys/mcstrans ++ touch $lockfile + fi + return $RETVAL + } +@@ -64,15 +65,7 @@ + killproc $prog + RETVAL=$? + echo +- rm -f /var/lock/subsys/mcstrans +- return $RETVAL +-} +- +-reload(){ +- echo -n $"Reloading configuration: " +- killproc $prog -HUP +- RETVAL=$? +- echo ++ rm -f $lockfile + return $RETVAL + } + +@@ -82,7 +75,7 @@ + } + + condrestart(){ +- [ -e /var/lock/subsys/mcstrans ] && restart ++ [ -e $lockfile ] && restart + return 0 + } + +@@ -95,17 +88,14 @@ + stop) + stop + ;; +- restart) ++ restart|force-reload) + restart + ;; +- reload) +- reload +- ;; + condrestart) + condrestart + ;; + *) +- echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|rotate}" ++ echo $"Usage: $0 {start|stop|status|restart|force-reload|condrestart}" + RETVAL=3 + esac + diff --git a/mcstrans.spec b/mcstrans.spec index 8e192cc..226f575 100644 --- a/mcstrans.spec +++ b/mcstrans.spec @@ -1,7 +1,7 @@ Summary: SELinux Translation Daemon Name: mcstrans Version: 0.3.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL+ Group: System Environment/Daemons Source: http://fedora.redhat.com/projects/%{name}-%{version}.tgz @@ -13,6 +13,7 @@ Requires(pre): /sbin/chkconfig /sbin/service Requires(post):/sbin/chkconfig /sbin/service Provides: setransd Provides: libsetrans +Patch: mcstrans-0.3.1-init.patch Obsoletes: libsetrans %description @@ -31,6 +32,7 @@ from internal representations to user defined representation. %prep %setup -q +%patch -p1 %build make clean @@ -53,8 +55,8 @@ rm -rf %{buildroot} %post chkconfig --add mcstrans -if [ -f /var/lock/subsys/mcstransd ]; then - mv /var/lock/subsys/mcstransd /var/lock/subsys/mcstrans +if [ -f /var/lock/subsys/mcstrans ]; then + mv /var/lock/subsys/mcstrans /var/lock/subsys/mcstransd fi %preun @@ -86,6 +88,9 @@ fi %{_usr}/share/mcstrans/util/* %changelog +* Thu Sep 17 2009 Miroslav Grepl 0.3.1-3 +- Fix init script + * Sat Jul 25 2009 Fedora Release Engineering - 0.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild