This commit is contained in:
Radek Brich 2008-05-26 12:57:18 +00:00
parent b96c6473d2
commit 55fe7223ba
2 changed files with 39 additions and 2 deletions

View File

@ -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 @@ make CFLAGS="$RPM_OPT_FLAGS"
%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@redhat.com> - 0.9b-6
- add init script to call /sbin/stinit (#249665)
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9b-5
- Autorebuild for GCC 4.3

21
stinit.init Executable file
View File

@ -0,0 +1,21 @@
#!/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