- initial addition of initscripts
authoraredridel <aredridel@pld-linux.org>
Thu, 5 Apr 2007 04:24:39 +0000 (04:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cman.spec -> 1.16

cman.spec

index e75d6fc..a77607e 100644 (file)
--- a/cman.spec
+++ b/cman.spec
@@ -11,6 +11,8 @@ License:      GPL v2
 Group:         Applications/System
 Source0:       ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
 # Source0-md5: 2ef3f4ba9d3c87b50adfc9b406171085
+Source1:       %{name}.init
+Source2:       %{name}.sysconfig
 URL:           http://sources.redhat.com/cluster/cman/
 %{!?with_libonly:BuildRequires:        ccs-devel}
 BuildRequires: openais-devel
@@ -88,19 +90,34 @@ cd %{name}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d}
 cd %{name}
 
 %{__make} %{?with_libonly:-C lib} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+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  -p /sbin/ldconfig
+%post  
+/sbin/ldconfig
+/sbin/chkconfig --add %{name}
+
 %postun        -p /sbin/ldconfig
 
+%preun
+if [ "$1" = "0" ]; then
+       %service -q %{name} stop
+       /sbin/chkconfig --del %{name}
+fi
+
 %files
 %defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
 %{!?with_libonly:%attr(755,root,root) %{_sbindir}/*}
 %attr(755,root,root) %{_libdir}/libcman.so.*.*
 %if %{without libonly}
This page took 0.035218 seconds and 4 git commands to generate.