rpms/openhpi-subagent/devel openhpi-subagent.initd, NONE, 1.1 openhpi-subagent.sysconfig, NONE, 1.1 openhpi-subagent.spec, 1.9, 1.10 openhpi-subagent-2.3.4-initd.patch, 1.2, NONE
Dan Horák
sharkcz at fedoraproject.org
Mon Feb 8 16:29:43 UTC 2010
Author: sharkcz
Update of /cvs/pkgs/rpms/openhpi-subagent/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14833
Modified Files:
openhpi-subagent.spec
Added Files:
openhpi-subagent.initd openhpi-subagent.sysconfig
Removed Files:
openhpi-subagent-2.3.4-initd.patch
Log Message:
* Mon Feb 8 2010 Dan Horák <dan[at]danny.cz> - 2.3.4-11
- switched to completely new initscript (#521804, #521656)
--- NEW FILE openhpi-subagent.initd ---
#! /bin/sh
# chkconfig: - 91 09
# description: HPI SNMP Subagent
# processname: hpiSubagent
### BEGIN INIT INFO
# Provides: openhpi-subagent
# Required-Start: $network net-snmp
# Required-Stop: $network net-snmp
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: Start HPI SNMP Subagent at boot time
# Description: Enable HPI SNMP Subagent service
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
exec="/usr/bin/hpiSubagent"
prog="openhpi-subagent"
config="/etc/snmp/hpiSubagent.conf"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/subsys/$prog
start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
daemon $exec $OPTIONS
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $exec
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
# run checks to determine if the service is running or use generic status
status -l $prog $exec
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?
--- NEW FILE openhpi-subagent.sysconfig ---
#
# options passed to hpiSubagent
#
OPTIONS=-f
Index: openhpi-subagent.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openhpi-subagent/devel/openhpi-subagent.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- openhpi-subagent.spec 5 Feb 2010 15:02:56 -0000 1.9
+++ openhpi-subagent.spec 8 Feb 2010 16:29:43 -0000 1.10
@@ -1,14 +1,16 @@
Name: openhpi-subagent
Version: 2.3.4
-Release: 10%{?dist}
+Release: 11%{?dist}
Summary: NetSNMP subagent for OpenHPI
Group: System Environment/Base
License: BSD
URL: http://www.openhpi.org
Source0: http://downloads.sourceforge.net/openhpi/%{name}-%{version}.tar.gz
-Patch1: %{name}-2.3.4-initd.patch
-Patch2: %{name}-2.3.4-format.patch
+Source1: %{name}.initd
+Source2: %{name}.sysconfig
+# https://sourceforge.net/tracker/?func=detail&aid=2849869&group_id=71730&atid=532251
+Patch1: %{name}-2.3.4-format.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: openhpi-devel >= 2.10, net-snmp-devel, openssl-devel
@@ -24,8 +26,7 @@ Hardware Platform Interface SNMP sub-age
%prep
%setup -q
-%patch1 -p1 -b .initd
-%patch2 -p1 -b .format
+%patch1 -p1 -b .format
%build
@@ -38,8 +39,11 @@ make -C docs subagent-manual/book1.html
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{_initrddir}
-mv $RPM_BUILD_ROOT%{_sysconfdir}/init.d/* $RPM_BUILD_ROOT%{_initrddir}
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name}
+mkdir -p $RPM_BUILD_ROOT%{_initddir}
+install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/%{name}
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
+install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
%clean
@@ -63,12 +67,16 @@ fi
%files
%defattr(-,root,root,-)
%doc COPYING README docs/subagent-manual
-%{_initrddir}/%{name}
-%config(noreplace) %{_sysconfdir}/snmp/*.conf
+%{_initddir}/%{name}
+%config(noreplace) %{_sysconfdir}/snmp/hpiSubagent.conf
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_bindir}/hpiSubagent
%{_datadir}/snmp/mibs/*.mib
%changelog
+* Mon Feb 8 2010 Dan Horák <dan[at]danny.cz> - 2.3.4-11
+- switched to completely new initscript (#521804, #521656)
+
* Fri Feb 5 2010 Dan Horák <dan[at]danny.cz> - 2.3.4-10
- updated the initscript patch (#521804)
--- openhpi-subagent-2.3.4-initd.patch DELETED ---
More information about the scm-commits
mailing list