SPECS: ccs.spec - add init scripts
arekm
arekm at pld-linux.org
Sun Nov 6 01:05:47 CET 2005
Author: arekm Date: Sun Nov 6 00:05:47 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- add init scripts
---- Files affected:
SPECS:
ccs.spec (1.9 -> 1.10)
---- Diffs:
================================================================
Index: SPECS/ccs.spec
diff -u SPECS/ccs.spec:1.9 SPECS/ccs.spec:1.10
--- SPECS/ccs.spec:1.9 Sun Nov 6 00:35:21 2005
+++ SPECS/ccs.spec Sun Nov 6 01:05:40 2005
@@ -8,6 +8,8 @@
Group: Applications/System
Source0: ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
# Source0-md5: e98551b02ee8ed46ae0ab8fca193d751
+Source1: %{name}.init
+Source2: %{name}.sysconfig
URL: http://sources.redhat.com/cluster/ccs/
BuildRequires: libxml2-devel >= 2.0
BuildRequires: magma-devel >= 1.0
@@ -54,6 +56,7 @@
%install
rm -rf $RPM_BUILD_ROOT
cd %{name}
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -61,9 +64,28 @@
install -d $RPM_BUILD_ROOT%{_sysconfdir}/cluster
touch $RPM_BUILD_ROOT%{_sysconfdir}/cluster/cluster.xml
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+/sbin/chkconfig --add %{name}
+if [ -f /var/lock/subsys/%{name} ]; then
+ /etc/rc.d/init.d/%{name} restart 1>&2
+else
+ echo "Type \"/etc/rc.d/init.d/%{name} start\" to start %{name}" 1>&2
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+ if [ -f /var/lock/subsys/%{name} ]; then
+ /etc/rc.d/init.d/%{name} stop >&2
+ fi
+ /sbin/chkconfig --del %{name}
+fi
+
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_sbindir}/*
@@ -72,7 +94,8 @@
%{_mandir}/man5/cluster.conf.5*
%{_mandir}/man7/ccs.7*
%{_mandir}/man8/ccs*.8*
-#%attr(754,root,root) /etc/rc.d/init.d/ccsd
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/%{name}
%files devel
%defattr(644,root,root,755)
@@ -85,6 +108,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.10 2005/11/06 00:05:40 arekm
+- add init scripts
+
Revision 1.9 2005/11/05 23:35:21 arekm
- release 1.01.00
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/ccs.spec?r1=1.9&r2=1.10&f=u
More information about the pld-cvs-commit
mailing list