Author: glen Date: Mon Feb 27 23:01:35 2006 GMT Module: SPECS Tag: HEAD ---- Log message: - use %service, fixed scripts, rel 3
---- Files affected: SPECS: eximstate.spec (1.16 -> 1.17) ---- Diffs: ================================================================ Index: SPECS/eximstate.spec diff -u SPECS/eximstate.spec:1.16 SPECS/eximstate.spec:1.17 --- SPECS/eximstate.spec:1.16 Tue Dec 13 19:01:46 2005 +++ SPECS/eximstate.spec Tue Feb 28 00:01:30 2006 @@ -3,7 +3,7 @@ Summary(pl): Monitorowanie instalacji exima Name: eximstate Version: 1.1 -Release: 2 +Release: 3 License: GPL Group: Applications/Mail Source0: http://www.olliecook.net/projects/eximstate/releases/%{name}-%{version}.tar.gz @@ -15,6 +15,7 @@ Patch0: %{name}-debug.patch URL: http://www.olliecook.net/projects/eximstate/ BuildRequires: ncurses-devel +BuildRequires: rpmbuild(macros) >= 1.268 BuildRequires: rrdtool-devel >= 1.2.10 Requires(post,preun): /sbin/chkconfig BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -87,32 +88,27 @@ %post /sbin/chkconfig --add %{name}d -if [ -f %{_var}/lock/subsys/%{name}d ]; then - /etc/rc.d/init.d/%{name}d restart 1>&2 -else - echo "Run \"/usr/sbin/makenewrrd.sh <host>\" for each your monitored host." - echo "Run \"/etc/rc.d/init.d/%{name}d start\" to start %{name}d daemon." +if [ "$1" = 1 ]; then + echo "Run \"%{_sbindir}/makenewrrd.sh <host>\" for each your monitored host." fi +%service %{name}d restart "%{name}d daemon" %preun -if [ "$1" = "0" -a -f %{_var}/lock/subsys/%{name}d ]; then - /etc/rc.d/init.d/%{name}d stop 1>&2 +if [ "$1" = "0" ]; then + %service %{name}d stop + /sbin/chkconfig --del %{name}d fi -/sbin/chkconfig --del %{name}d %post client /sbin/chkconfig --add %{name} -if [ -f %{_var}/lock/subsys/%{name} ]; then - /etc/rc.d/init.d/%{name} restart 1>&2 -else - echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon." -fi +%service %{name} restart "%{name} daemon" %preun client -if [ "$1" = "0" -a -f %{_var}/lock/subsys/%{name} ]; then +if [ "$1" = "0" ]; then /etc/rc.d/init.d/%{name} stop 1>&2 + %service %{name} stop + /sbin/chkconfig --del %{name} fi -/sbin/chkconfig --del %{name} %files %defattr(644,root,root,755) @@ -143,6 +139,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.17 2006/02/27 23:01:30 glen +- use %service, fixed scripts, rel 3 + Revision 1.16 2005/12/13 18:01:46 glen - adapterized (avoid macros with /usr/include/{ncurses,freetype}*) ================================================================ ---- CVS-web: http://cvs.pld-linux.org/SPECS/eximstate.spec?r1=1.16&r2=1.17&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
