rpms/mt-st/devel stinit.init,NONE,1.1 mt-st.spec,1.26,1.27

Radek Brich (rbrich) fedora-extras-commits at redhat.com
Mon May 26 12:58:00 UTC 2008


Author: rbrich

Update of /cvs/extras/rpms/mt-st/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6099

Modified Files:
	mt-st.spec 
Added Files:
	stinit.init 
Log Message:
Resolves: #249665


--- NEW FILE stinit.init ---
#!/bin/bash
#
# stinit	This calls /sbin/stinit if /etc/stinit.def exists
# 
# chkconfig: 2345 40 99
# description: calls stinit if /etc/stinit.def exists

. /etc/init.d/functions

# See how we were called.
case "$1" in
  start)
	[ -f /etc/stinit.def ] && /sbin/stinit
        ;;
  stop)
	;;
  *)
        echo $"Usage: $0 {start}"
        exit 1
esac
exit 0


Index: mt-st.spec
===================================================================
RCS file: /cvs/extras/rpms/mt-st/devel/mt-st.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- mt-st.spec	19 Feb 2008 20:57:25 -0000	1.26
+++ mt-st.spec	26 May 2008 12:57:18 -0000	1.27
@@ -1,16 +1,19 @@
 Summary: Install mt-st if you need a tool to control tape drives
 Name: mt-st
 Version: 0.9b
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: GPLv2
 Group: Applications/System
-Source: ftp://metalab.unc.edu/pub/Linux/system/backup/mt-st-%{version}.tar.gz
+Source0: ftp://metalab.unc.edu/pub/Linux/system/backup/mt-st-%{version}.tar.gz
+Source1: stinit.init
 Patch0: mt-st-0.8-redhat.patch
 Patch1: mt-st-0.7-SDLT.patch
 Patch2: mt-st-0.7-config-files.patch
 Patch3: mt-st-0.9b-manfix.patch
 Patch4: mt-st-0.9b-mtio.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
 
 %description
 The mt-st package contains the mt and st tape drive management
@@ -33,18 +36,31 @@
 %install
 rm -rf ${RPM_BUILD_ROOT}
 make install mandir=%{_mandir}
+install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/stinit
 
 %clean
 rm -rf ${RPM_BUILD_ROOT}
 
+%post
+/sbin/chkconfig --add stinit
+
+%preun
+if [ $1 -eq 0 ]; then
+    /sbin/chkconfig --del stinit
+fi
+
 %files
 %defattr(-,root,root)
 %doc COPYING README README.stinit mt-st-0.* stinit.def.examples
 /bin/mt
 /sbin/stinit
 %{_mandir}/man[18]/*
+%config %{_sysconfdir}/rc.d/init.d/stinit
 
 %changelog
+* Mon May 26 2008 Radek Brich <rbrich at redhat.com> - 0.9b-6
+- add init script to call /sbin/stinit (#249665)
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 0.9b-5
 - Autorebuild for GCC 4.3
 




More information about the fedora-extras-commits mailing list