]> git.pld-linux.org Git - packages/ocfs2-tools.git/commitdiff
- add initscripts
authoraredridel <aredridel@pld-linux.org>
Tue, 17 Oct 2006 00:50:15 +0000 (00:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ocfs2-tools.spec -> 1.4

ocfs2-tools.spec

index 3883b77108cd063bb5ab1d91ec8426ef0b865a9e..9cc3ec717ec9e6e8692ca96a546f2e2f9645fe8b 100644 (file)
@@ -7,6 +7,8 @@ License:        GPL v2
 Group:         Applications/System
 Source0:       http://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v1.2/%{name}-%{version}.tar.gz
 # Source0-md5: 62c24ae0f3016eb5c15f0dfc90fe956a
+Source1:       ocfs2.init
+Source2:       o2cb.init
 URL:           http://oss.oracle.com/projects/ocfs2-tools/
 BuildRequires: e2fsprogs-devel
 BuildRequires: glib2-devel
@@ -48,21 +50,41 @@ Interfejs GTK+ do narz
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ocfs2
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/o2cb
+
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post  -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
+%post
+/sbin/ldconfig
+/sbin/chkconfig --add o2cb
+/sbin/chkconfig --add %{name}
+%service o2cb restart
+%service %{name} restart
+
+%preun
+if [ "$1" = "0" ]; then
+       %service -q %{name} stop
+       %service -q o2cb stop
+       /sbin/chkconfig --del %{name}
+       /sbin/chkconfig --del o2cb
+fi
+
 %files
 %defattr(644,root,root,755)
+%attr(754,root,root) /etc/rc.d/init.d/o2cb
+%attr(754,root,root) /etc/rc.d/init.d/ocfs2
 %attr(755,root,root) /sbin/*
 %{_mandir}/man8/*
 
This page took 0.074806 seconds and 4 git commands to generate.