rpms/opensm/FC-4 opensm.initd,NONE,1.1 opensm.spec,1.2,1.3
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Nov 14 23:45:43 UTC 2005
Author: dledford
Update of /cvs/dist/rpms/opensm/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv29542
Modified Files:
opensm.spec
Added Files:
opensm.initd
Log Message:
Add dist tag, add the init.d file
--- NEW FILE opensm.initd ---
#!/bin/bash
#
# opensm This starts and stops the OpenIB Subnet Manager.
#
# chkconfig: - 12 88
# description: The opensm daemon is needed on at least one machine in \
# an Infiniband subnet to manage the link IDs and routing \
# information that Infiniband host controllers use to access \
# other host controllers or switches in the subnet fabric.
#
# processname: /usr/sbin/opensm
# pidfile: /var/run/opensm.pid
PATH=/sbin:/bin:/usr/bin:/usr/sbin
# Source function library.
. /etc/init.d/functions
OPENSM_OPTS="-r -maxsmps 0"
# Check that we are root ... so non-root users stop here
[ `id -u` = 0 ] || exit 1
RETVAL=0
prog="opensm"
start(){
echo -n $"Starting $prog: "
($prog $OPENSM_OPTS) &>/var/log/opensm.log </dev/null &
RETVAL=$?
DAEMON_PID=$!
if [ "$RETVAL" -eq 0 ]; then
echo $DAEMON_PID > /var/run/opensm.pid
touch /var/lock/subsys/opensm
success $"$prog startup"
else
failure $"$prog startup"
fi
echo
return $RETVAL
}
stop(){
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
rm -f /var/lock/subsys/opensm
return $RETVAL
}
reload(){
stop
start
}
restart(){
stop
start
}
condrestart(){
[ -e /var/lock/subsys/opensm ] && restart
return 0
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
;;
restart)
restart
;;
reload)
reload
;;
condrestart)
condrestart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
RETVAL=1
esac
exit $RETVAL
Index: opensm.spec
===================================================================
RCS file: /cvs/dist/rpms/opensm/FC-4/opensm.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- opensm.spec 10 Nov 2005 19:24:14 -0000 1.2
+++ opensm.spec 14 Nov 2005 23:45:41 -0000 1.3
@@ -3,11 +3,12 @@
%define osm osm
%define util util/*
%define diag diags/*
+%define dist .1.FC4
Name: opensm
Version: 1.0
Release: 0.%{ver}%{?dist}
-Summary: OpenIB InfiniBand Subnet Manager
+Summary: OpenIB InfiniBand Subnet Manager and management utilities
Group: System Environment/Base
License: GPL/BSD
@@ -15,6 +16,7 @@
Source: opensm-%{ver}.tar.bz2
Source1: opensm.sh
Source2: opensm.csh
+Source3: opensm.initd
Patch: opensm-3965-build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -24,11 +26,18 @@
the infiniband fabric to manage the maintenance of the fabric's routing
state. This package also contains various tools for diagnosing and testing
Infiniband networks that can be used from any machine and do not need
-to be run on the machine running the actual opensm daemon.
+to be run on a machine running the opensm daemon.
+
+%package libs
+Summary: Libraries used by opensm and included utilities
+Group: System Environment/Libraries
+
+%description libs
+Shared libraries for Infiniband user space access
%package devel
Summary: Development files for the opensm-libs libraries
-Group: System Environment/Libraries
+Group: Development/System
Requires: %{name} = %{version}-%{release}
%description devel
@@ -70,18 +79,32 @@
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -m755 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
+install -D -m755 %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/opensm
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post
+/sbin/chkconfig --add opensm
+
+%preun
+/sbin/chkconfig --del opensm
+
+%post libs
+/sbin/ldconfig
+
+%postun libs
+/sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_bindir}/*
-%{_libdir}/lib*.so*
%{_sysconfdir}/profile.d/*
+%{_initrddir}/opensm
+
+%files libs
+%defattr(-,root,root,-)
+%{_libdir}/lib*.so*
%files devel
%defattr(-,root,root,-)
@@ -90,5 +113,11 @@
%changelog
+* Mon Nov 14 2005 Doug Ledford <dledford at redhat.com>
+- Split the libs out from the programs in case anyone needs 32bit libs
+ on 64bit arches
+- Add an init script to start the subnet manager, defaults to off, must
+ be enabled on at least one machine in the subnet.
+
* Mon Nov 7 2005 Doug Ledford <dledford at redhat.com>
- Initial import
More information about the fedora-cvs-commits
mailing list