Репозитории ALT
S: | 1.6.11.1-alt1 |
5.1: | 0.8.7-alt1 |
4.1: | 0.5.5-alt1 |
4.0: | 0.4.4-alt1 |
Группа :: Мониторинг
Пакет: freeipmi
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: freeipmi-1.6.10-alt1.patch
Скачать
Скачать
.gear/freeipmi.spec | 311 +++++++++++++++++++++++++++++++++++++++++++++++
.gear/freeipmi.watch | 2 +
.gear/rules | 5 +
.gear/tags/list | 1 +
.gear/upstream/remotes | 3 +
.gitignore | 1 -
Makefile.am | 1 +
configure.ac | 1 +
etc/Makefile.am | 8 +-
etc/bmc-watchdog.init.in | 152 ++++++++---------------
etc/ipmidetectd.init.in | 142 +++++++++-------------
etc/ipmiseld.init.in | 142 +++++++++-------------
12 files changed, 491 insertions(+), 278 deletions(-)
diff --git a/.gear/freeipmi.spec b/.gear/freeipmi.spec
new file mode 100644
index 000000000..f24dd3482
--- /dev/null
+++ b/.gear/freeipmi.spec
@@ -0,0 +1,311 @@
+# vim: set ft=spec: -*- rpm-spec -*-
+
+%define docdir %_defaultdocdir/%name-%version
+
+Name: freeipmi
+Version: 1.6.10
+Release: alt1
+
+Summary: GNU FreeIPMI - Intelligent Platform Management System
+Group: Monitoring
+License: GPLv3
+Url: http://www.gnu.org/software/freeipmi/
+VCS: https://git.savannah.gnu.org/git/freeipmi.git
+
+PreReq: lib%name = %EVR
+
+Source: %name-%version.tar
+Source1: %name.watch
+Patch: %name-%version-%release.patch
+
+BuildRequires: libgcrypt-devel texinfo
+
+%description
+This project provides "Remote-Console" (out-of-band) and
+"System Management Software" (in-band) based on Intelligent
+Platform Management Interface (IPMI v1.5/2.0) specification.
+
+%package -n lib%name
+Summary: FreeIPMI shared libraries
+Group: System/Libraries
+
+%description -n lib%name
+FreeIPMI shared libraries.
+
+%package -n lib%name-devel
+Summary: GNU FreeIPMI development files
+Group: Development/C
+Requires: lib%name = %version-%release
+
+%description -n lib%name-devel
+GNU FreeIPMI development files.
+
+%package bmc-watchdog
+Summary: GNU FreeIPMI BMC watchdog
+Group: Monitoring
+PreReq: lib%name = %version-%release
+
+%description bmc-watchdog
+Watchdog daemon for OS monitoring and recovery.
+
+%package ipmidetectd
+Summary: GNU FreeIPMI Detection daemon
+Group: Monitoring
+PreReq: lib%name = %version-%release
+
+%description ipmidetectd
+The ipmidetectd daemon regularly ipmipings remote nodes.
+The ipmidetect tool and library will determine detected vs. undetected
+ipmi systems based on the most recent ipmipings received.
+
+%package ipmiseld
+Summary: FreeIPMI SEL syslog logging daemon
+Group: Monitoring
+PreReq: lib%name = %EVR
+
+%description ipmiseld
+IPMI SEL syslog logging daemon.
+
+%package doc
+Summary: GNU FreeIPMI documentation
+Group: Documentation
+Conflicts: lib%name < %EVR
+Conflicts: lib%name > %EVR
+BuildArch: noarch
+
+%description doc
+GNU FreeIPMI documentation.
+
+%prep
+%setup
+%add_optflags -D_GNU_SOURCE
+%patch -p1
+
+%build
+%autoreconf
+
+%configure \
+ --localstatedir=%_var \
+ --disable-static
+%make_build
+
+%install
+%make_install DESTDIR=%buildroot \
+ docdir=%docdir \
+ install
+
+find %buildroot%docdir/ -type f -size +4k \( -iname changelog\* -or -iname COPYING\* -or -iname \*ipmi\* \) -print0 |
+xargs -r0 bzip2 -9f --
+
+%post -n lib%name
+touch %_localstatedir/%name/ipckey
+
+%preun -n lib%name
+[ "$1" -eq 0 ] && rm -f %_localstatedir/%name/ipckey ||: >/dev/null 2>&1
+
+%post ipmidetectd
+%post_service ipmidetectd
+
+%preun ipmidetectd
+%preun_service ipmidetectd
+
+%post bmc-watchdog
+%post_service bmc-watchdog
+
+%preun bmc-watchdog
+%preun_service bmc-watchdog
+
+%post ipmiseld
+%post_service bmc-watchdog
+
+%preun ipmiseld
+%preun_service bmc-watchdog
+
+%files
+%_sbindir/*
+%exclude %_sbindir/ipmiseld
+%exclude %_sbindir/bmc-watchdog
+%exclude %_sbindir/ipmidetectd
+%_man8dir/*.8*
+%exclude %_man8dir/ipmiseld.8*
+%exclude %_man8dir/bmc-watchdog.8*
+%exclude %_man8dir/*detectd*.8*
+%_man5dir/*.5*
+%exclude %_man5dir/*detectd*.5*
+%exclude %_man5dir/*ipmiseld*.5*
+%config %_sysconfdir/%name/freeipmi.conf
+%config %_sysconfdir/%name/ipmidetect.conf
+%config %_sysconfdir/%name/freeipmi_interpret_sel.conf
+%config %_sysconfdir/%name/freeipmi_interpret_sensor.conf
+%_man7dir/*.7*
+
+%files -n lib%name
+%_libdir/lib*.so.*
+%dir %_sysconfdir/%name
+%config %_sysconfdir/%name/libipmiconsole.conf
+%dir %_localstatedir/%name
+%ghost %_localstatedir/%name/ipckey
+
+%files -n lib%name-devel
+%_libdir/lib*.so
+%_includedir/*
+%_pkgconfigdir/*.pc
+%_man3dir/*
+
+%files bmc-watchdog
+%config(noreplace) %_sysconfdir/sysconfig/bmc-watchdog
+%config %_initdir/bmc-watchdog
+%_sbindir/bmc-watchdog
+%_man8dir/bmc-watchdog.8*
+
+%files ipmidetectd
+%_sbindir/ipmidetectd
+%config %_initdir/ipmidetectd
+%_man5dir/*detectd*.5*
+%_man8dir/*detectd*.8*
+%config %_sysconfdir/%name/ipmidetectd.conf
+
+%files ipmiseld
+%_sbindir/ipmiseld
+%config %_initdir/ipmiseld
+%_man5dir/*ipmiseld*.5*
+%_man8dir/ipmiseld*.8*
+%config %_sysconfdir/%name/ipmiseld.conf
+
+%files doc
+%docdir
+%_infodir/%name-faq.info*
+
+%changelog
+* Mon Feb 06 2023 Anton Farygin <rider@altlinux.ru> 1.6.10-alt1
+- 1.6.10
+
+* Thu Feb 17 2022 Ivan Alekseev <qwetwe@altlinux.org> 1.6.9-alt1
+- 1.6.9
+
+* Sun Dec 26 2021 Ivan Alekseev <qwetwe@altlinux.org> 1.6.8-alt1
+- 1.6.8
+
+* Wed Mar 03 2021 Anton Farygin <rider@altlinux.org> 1.6.7-alt1
+- 1.6.7
+
+* Wed Sep 30 2020 Anton Farygin <rider@altlinux.ru> 1.6.6-alt1
+- 1.6.6
+
+* Tue Jun 16 2020 Anton Farygin <rider@altlinux.ru> 1.6.5-alt1
+- new version 1.6.5
+
+* Wed Oct 02 2019 Anton Farygin <rider@altlinux.ru> 1.6.4-alt1
+- new version 1.6.4
+
+* Sat Mar 23 2019 Anton Farygin <rider@altlinux.ru> 1.6.3-alt1
+- new version 1.6.3
+
+* Tue May 08 2018 Anton Farygin <rider@altlinux.ru> 1.6.2-alt1
+- new version 1.6.2
+
+* Mon Feb 26 2018 Anton Farygin <rider@altlinux.ru> 1.6.1-alt1
+- new version 1.6.1
+
+* Mon Aug 21 2017 Anton Farygin <rider@altlinux.ru> 1.5.7-alt1
+- new version 1.5.7
+
+* Tue Aug 08 2017 Anton Farygin <rider@altlinux.ru> 1.5.6-alt1
+- new version 1.5.6
+
+* Tue May 02 2017 Anton Farygin <rider@altlinux.ru> 1.5.5-alt1
+- new version 1.5.5
+
+* Sun Oct 02 2016 Anton Farygin <rider@altlinux.ru> 1.5.4-alt1
+- new version 1.5.4
+
+* Tue Jun 14 2016 Anton Farygin <rider@altlinux.ru> 1.5.2-alt1
+- new version 1.5.2
+
+* Thu Dec 03 2015 Igor Vlasenko <viy@altlinux.ru> 1.4.9-alt1.1
+- NMU: added BR: texinfo
+
+* Fri Jun 19 2015 Anton Farygin <rider@altlinux.ru> 1.4.9-alt1
+- new version 1.4.9
+
+* Thu Jan 15 2015 Anton Farygin <rider@altlinux.ru> 1.4.8-alt1
+- new version 1.4.8
+
+* Mon Sep 08 2014 Anton Farygin <rider@altlinux.ru> 1.4.5-alt1
+- new version 1.4.5
+
+* Mon Jun 30 2014 Anton Farygin <rider@altlinux.ru> 1.4.4-alt1
+- new version 1.4.4
+
+* Fri Jun 06 2014 Anton Farygin <rider@altlinux.ru> 1.4.3-alt1
+- new version
+
+* Tue Mar 25 2014 Anton Farygin <rider@altlinux.ru> 1.4.1-alt1
+- new version
+
+* Thu Feb 20 2014 Anton Farygin <rider@altlinux.ru> 1.3.4-alt1
+- new version
+
+* Tue Nov 12 2013 Anton Farygin <rider@altlinux.ru> 1.3.3-alt1
+- new version
+
+* Fri Oct 11 2013 Anton Farygin <rider@altlinux.ru> 1.3.2-alt1
+- new version
+
+* Mon Jul 15 2013 Anton Farygin <rider@altlinux.ru> 1.2.8-alt1
+- new version
+
+* Thu Jun 07 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.10-alt1.1
+- Fixed build
+
+* Thu Dec 15 2011 Michael Shigorin <mike@altlinux.org> 1.0.10-alt1
+- new version
+
+* Tue Sep 13 2011 Anton Farygin <rider@altlinux.ru> 1.0.6-alt1
+- new version
+
+* Mon Apr 18 2011 Anton Farygin <rider@altlinux.ru> 1.0.3-alt2
+- use noarch for documentation package
+
+* Fri Apr 15 2011 Anton Farygin <rider@altlinux.ru> 1.0.3-alt1
+- new version
+
+* Wed Oct 06 2010 Anton Farygin <rider@altlinux.ru> 0.8.10-alt1
+- new version
+
+* Fri Aug 20 2010 Anton Farygin <rider@altlinux.ru> 0.8.8-alt1
+- new version
+
+* Mon Jun 28 2010 Anton Farygin <rider@altlinux.ru> 0.8.7-alt1
+- new version
+
+* Mon Feb 15 2010 Anton Farygin <rider@altlinux.ru> 0.8.3-alt1
+- new version
+
+* Wed Dec 23 2009 Anton Farygin <rider@altlinux.ru> 0.8.1-alt1
+- new version
+
+* Fri Dec 12 2008 Stanislav Ievlev <inger@altlinux.org> 0.6.4-alt2
+- fix build
+
+* Fri Jul 11 2008 Pavlov Konstantin <thresh@altlinux.ru> 0.6.4-alt1
+- 0.6.4 release.
+
+* Thu Mar 13 2008 Pavlov Konstantin <thresh@altlinux.ru> 0.5.5-alt1
+- 0.5.5 release.
+
+* Tue Nov 06 2007 Pavlov Konstantin <thresh@altlinux.ru> 0.4.6-alt1
+- 0.4.6 release.
+
+* Fri Sep 21 2007 Pavlov Konstantin <thresh@altlinux.ru> 0.4.4-alt1
+- 0.4.4 release.
+
+* Thu Aug 16 2007 Pavlov Konstantin <thresh@altlinux.ru> 0.4.3-alt1
+- 0.4.3 release.
+
+* Tue Jul 10 2007 Pavlov Konstantin <thresh@altlinux.ru> 0.4.0-alt0.beta1
+- 0.4.0 beta 1.
+
+* Mon Apr 09 2007 Sir Raorn <raorn@altlinux.ru> 0.3.2-alt1
+- Built for Sisyphus
+
diff --git a/.gear/freeipmi.watch b/.gear/freeipmi.watch
new file mode 100644
index 000000000..733d3d422
--- /dev/null
+++ b/.gear/freeipmi.watch
@@ -0,0 +1,2 @@
+version=3
+http://ftp.gnu.org/gnu/freeipmi/freeipmi-([\d\.]+)\.tar\.gz
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 000000000..7b90fce43
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,5 @@
+tar: v@version@:.
+diff: v@version@:. .
+copy?: .gear/*.patch
+copy: .gear/*.watch
+spec: .gear/freeipmi.spec
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 000000000..615a9751b
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+1f7eea294c2967802019100b07cf1e44b3160a2b v1.6.10
diff --git a/.gear/upstream/remotes b/.gear/upstream/remotes
new file mode 100644
index 000000000..f985e3ab1
--- /dev/null
+++ b/.gear/upstream/remotes
@@ -0,0 +1,3 @@
+[remote "upstream"]
+ fetch = +refs/heads/*:refs/remotes/upstream/*
+ url = https://git.savannah.gnu.org/git/freeipmi.git
diff --git a/.gitignore b/.gitignore
index 0d4df11be..3153154c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,7 +25,6 @@ config.status
*.5
*.7
*.8
-*.spec
*.pc
# Generated files/tools
diff --git a/Makefile.am b/Makefile.am
index cf757f634..573d4404e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -90,3 +90,4 @@ uninstall-extra:
EXTRA_DIST = $(EXTRA) freeipmi.spec
+ACLOCAL_AMFLAGS = -I config
diff --git a/configure.ac b/configure.ac
index aba4e43e9..341cedc26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,7 @@ dnl We require a modern autoconf and automake
AC_PREREQ([2.57])
AC_CONFIG_AUX_DIR([config])
+AC_CONFIG_MACRO_DIR([config])
dnl Locate the sources.
AC_CONFIG_SRCDIR([ChangeLog.0])
diff --git a/etc/Makefile.am b/etc/Makefile.am
index 5c023982f..4b83cb463 100644
--- a/etc/Makefile.am
+++ b/etc/Makefile.am
@@ -25,10 +25,10 @@ install-data-local: $(INSTALL_DAEMON_SCRIPTS)
$(INSTALL) -m 640 $(srcdir)/libipmiconsole.conf $(DESTDIR)$(LIBIPMICONSOLE_CONFIG_FILE_DEFAULT)
install-init-scripts: install-sysconfig
- $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/init.d
- $(INSTALL) -m 755 $(srcdir)/bmc-watchdog.init $(DESTDIR)$(sysconfdir)/init.d/bmc-watchdog
- $(INSTALL) -m 755 $(srcdir)/ipmidetectd.init $(DESTDIR)$(sysconfdir)/init.d/ipmidetectd
- $(INSTALL) -m 755 $(srcdir)/ipmiseld.init $(DESTDIR)$(sysconfdir)/init.d/ipmiseld
+ $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/rc.d/init.d
+ $(INSTALL) -m 755 $(srcdir)/bmc-watchdog.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/bmc-watchdog
+ $(INSTALL) -m 755 $(srcdir)/ipmidetectd.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/ipmidetectd
+ $(INSTALL) -m 755 $(srcdir)/ipmiseld.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/ipmiseld
install-systemd-scripts: install-sysconfig
$(INSTALL) -m 755 -d $(DESTDIR)$(systemdsystemunitdir)
diff --git a/etc/bmc-watchdog.init.in b/etc/bmc-watchdog.init.in
index a1207e6f7..877882fc2 100755
--- a/etc/bmc-watchdog.init.in
+++ b/etc/bmc-watchdog.init.in
@@ -2,6 +2,7 @@
#
# chkconfig: - 99 01
# description: bmc-watchdog startup script
+# processname: bmc-watchdog
#
### BEGIN INIT INFO
# Provides: bmc-watchdog
@@ -13,10 +14,19 @@
# Description: BMC watchdog timer daemon
### END INIT INFO
+# Do not load RH compatibility interface.
+WITHOUT_RC_COMPAT=1
+
+# Source function library.
+. /etc/init.d/functions
+
+SourceIfNotEmpty /etc/sysconfig/bmc-watchdog
+
DAEMON=@X_SBINDIR@/bmc-watchdog
PIDFILE=@X_LOCALSTATEDIR@/run/bmc-watchdog.pid
LOCKFILE=@X_LOCALSTATEDIR@/lock/subsys/bmc-watchdog
CONFFILE=@SYSTEMCONFIGDIR@/bmc-watchdog
+RETVAL=0
[ -f $DAEMON ] || exit 5
@@ -24,114 +34,54 @@ if [ -r $CONFFILE ]; then
. $CONFFILE
fi
-# Load Redhat or Suse appropriate libs
-if [ -f @X_SYSCONFDIR@/rc.d/init.d/functions ] ; then
- . @X_SYSCONFDIR@/rc.d/init.d/functions
- Xstart() {
-
- # Default deamon mode
- #
- # timer use = SMS/OS
- # pre-timeout interrupt = none
- # action = reset
- # -F, -P, -L, -S, -O - clear flags
- # initial-countdown = 900 seconds (15 mins)
- # reset-period = 60 seconds
-
- daemon -20 $DAEMON $OPTIONS
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch $LOCKFILE
- }
- Xstop() {
- killproc bmc-watchdog
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
- }
- Xstatus() {
- status bmc-watchdog
- RETVAL=$?
- return $RETVAL
- }
- Xcondrestart() {
- if test -e $LOCKFILE; then
- $0 stop
- $0 start
- RETVAL=$?
- fi
- }
- Xexit() {
- exit $RETVAL
- }
-elif [ -f @X_SYSCONFDIR@/rc.status ] ; then
- . @X_SYSCONFDIR@/rc.status
- Xstart() {
- startproc -20 $DAEMON $OPTIONS
- rc_status -v
+start()
+{
+ start_daemon $NICE --lockfile "$LOCKFILE" --expect-user root -- bmc-watchdog $OPTIONS
RETVAL=$?
return $RETVAL
- }
- Xstop() {
- killproc -TERM $DAEMON
- rc_status -v
- RETVAL=$?
- return $RETVAL
- }
- Xstatus() {
- echo -n "Checking for bmc-watchdog: "
- checkproc $DAEMON
- rc_status -v
- RETVAL=$?
- return $RETVAL
- }
- Xcondrestart() {
- $0 status
- if test $? = 0; then
- $0 restart
- else
- rc_reset
- fi
- rc_status
+}
+
+stop()
+{
+ stop_daemon --lockfile "$LOCKFILE" --expect-user root -- bmc-watchdog
RETVAL=$?
return $RETVAL
- }
- Xexit() {
- rc_exit
- }
-else
- echo "Unknown distribution type"
- exit 1
-fi
+}
-RETVAL=0
+restart()
+{
+ stop
+ start
+}
+# See how we were called.
case "$1" in
- start)
- echo -n "Starting bmc-watchdog: "
- Xstatus >/dev/null 2>&1 && exit 0
- Xstart
- ;;
-
- stop)
- echo -n "Shutting down bmc-watchdog: "
- Xstop
- ;;
-
- restart)
- $0 stop
- $0 start
- RETVAL=$?
- ;;
- status)
- Xstatus
- ;;
- condrestart|try-restart|force-reload)
- Xcondrestart
- ;;
- *)
- echo "Usage: $0 {start|stop|restart|status|condrestart|try-restart|force-reload}"
- exit 2
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ condstop)
+ if [ -e "$LOCKFILE" ]; then
+ stop
+ fi
+ ;;
+ condrestart|condreload)
+ if [ -e "$LOCKFILE" ]; then
+ restart
+ fi
+ ;;
+ status)
+ status --expect-user root -- bmc-watchdog
+ RETVAL=$?
+ ;;
+ *)
+ msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
+ RETVAL=1
esac
exit $RETVAL
diff --git a/etc/ipmidetectd.init.in b/etc/ipmidetectd.init.in
index cef2e8908..8e0721800 100644
--- a/etc/ipmidetectd.init.in
+++ b/etc/ipmidetectd.init.in
@@ -1,8 +1,8 @@
#!/bin/sh
-# $Id: ipmidetectd.init,v 1.1 2009-10-01 18:09:57 chu11 Exp $
#
# chkconfig: - 70 40
# description: ipmidetectd startup script
+# processname: ipmidetectd
#
### BEGIN INIT INFO
# Provides: ipmidetectd
@@ -14,100 +14,70 @@
# Description: IPMI node detection monitoring daemon
### END INIT INFO
+# Do not load RH compatibility interface.
+WITHOUT_RC_COMPAT=1
+
+# Source function library.
+. /etc/init.d/functions
+
+SourceIfNotEmpty /etc/sysconfig/ipmidetectd
+
IPMIDETECTD=@X_SBINDIR@/ipmidetectd
IPMIDETECTD_CONF=@X_SYSCONFDIR@/freeipmi/ipmidetectd.conf
LOCKFILE=@X_LOCALSTATEDIR@/lock/subsys/ipmidetectd
+RETVAL=0
[ -f $IPMIDETECTD ] || exit 5
[ -f $IPMIDETECTD_CONF ] || exit 6
-# Load Redhat or Suse appropriate libs
-if [ -f @X_SYSCONFDIR@/rc.d/init.d/functions ] ; then
- . @X_SYSCONFDIR@/rc.d/init.d/functions
- Xstart() {
- daemon $IPMIDETECTD
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch $LOCKFILE
- }
- Xstop() {
- killproc ipmidetectd -TERM
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
- }
- Xstatus() {
- status ipmidetectd
- RETVAL=$?
- return $RETVAL
- }
- Xcondrestart() {
- if test -e $LOCKFILE; then
- $0 stop
- $0 start
- RETVAL=$?
- fi
- }
- Xexit() {
- exit $RETVAL
- }
-elif [ -f @X_SYSCONFDIR@/rc.status ] ; then
- . @X_SYSCONFDIR@/rc.status
- Xstart() {
- startproc $IPMIDETECTD
- rc_status -v
- }
- Xstop() {
- killproc -TERM $IPMIDETECTD
- rc_status -v
- }
- Xstatus() {
- echo -n "Checking for ipmidetectd: "
- checkproc $IPMIDETECTD
- rc_status -v
- }
- Xcondrestart() {
- $0 status
- if test $? = 0; then
- $0 restart
- else
- rc_reset
- fi
- rc_status
- }
- Xexit() {
- rc_exit
- }
-else
- echo "Unknown distribution type"
- exit 1
-fi
+start()
+{
+ start_daemon $NICE --lockfile "$LOCKFILE" --expect-user root -- ipmidetectd $DAEMON_OPTIONS
+ RETVAL=$?
+ return $RETVAL
+}
-RETVAL=0
+stop()
+{
+ stop_daemon --lockfile "$LOCKFILE" --expect-user root -- ipmidetectd
+ RETVAL=$?
+ return $RETVAL
+}
+
+restart()
+{
+ stop
+ start
+}
+# See how we were called.
case "$1" in
- start)
- echo -n "Starting ipmidetectd: "
- Xstatus >/dev/null 2>&1 && exit 0
- Xstart
- ;;
- stop)
- echo -n "Shutting down ipmidetectd: "
- Xstop
- ;;
- restart)
- $0 stop
- $0 start
- RETVAL=$?
- ;;
- status)
- Xstatus
- ;;
- condrestart|try-restart|force-reload)
- Xcondrestart
- ;;
- *)
- echo "Usage: $0 {start|stop|restart|status|condrestart|try-restart|force-reload}"
- exit 2
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ condstop)
+ if [ -e "$LOCKFILE" ]; then
+ stop
+ fi
+ ;;
+ condrestart|condreload)
+ if [ -e "$LOCKFILE" ]; then
+ restart
+ fi
+ ;;
+ status)
+ status --expect-user root -- ipmidetectd
+ RETVAL=$?
+ ;;
+ *)
+ msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
+ RETVAL=1
esac
+
exit $RETVAL
diff --git a/etc/ipmiseld.init.in b/etc/ipmiseld.init.in
index d79685058..48a6b0710 100644
--- a/etc/ipmiseld.init.in
+++ b/etc/ipmiseld.init.in
@@ -1,8 +1,8 @@
#!/bin/sh
-# $Id: ipmiseld.init,v 1.1 2009-10-01 18:09:57 chu11 Exp $
#
# chkconfig: - 70 40
# description: ipmiseld startup script
+# processname: ipmiseld
#
### BEGIN INIT INFO
# Provides: ipmiseld
@@ -14,100 +14,70 @@
# Description: IPMI SEL sylog logging daemon
### END INIT INFO
+# Do not load RH compatibility interface.
+WITHOUT_RC_COMPAT=1
+
+# Source function library.
+. /etc/init.d/functions
+
+SourceIfNotEmpty /etc/sysconfig/ipmiseld
+
IPMISELD=@X_SBINDIR@/ipmiseld
IPMISELD_CONF=@X_SYSCONFDIR@/freeipmi/ipmiseld.conf
LOCKFILE=@X_LOCALSTATEDIR@/lock/subsys/ipmiseld
+RETVAL=0
[ -f $IPMISELD ] || exit 5
[ -f $IPMISELD_CONF ] || exit 6
-# Load Redhat or Suse appropriate libs
-if [ -f @X_SYSCONFDIR@/rc.d/init.d/functions ] ; then
- . @X_SYSCONFDIR@/rc.d/init.d/functions
- Xstart() {
- daemon $IPMISELD
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch $LOCKFILE
- }
- Xstop() {
- killproc ipmiseld -TERM
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
- }
- Xstatus() {
- status ipmiseld
- RETVAL=$?
- return $RETVAL
- }
- Xcondrestart() {
- if test -e $LOCKFILE; then
- $0 stop
- $0 start
- RETVAL=$?
- fi
- }
- Xexit() {
- exit $RETVAL
- }
-elif [ -f @X_SYSCONFDIR@/rc.status ] ; then
- . @X_SYSCONFDIR@/rc.status
- Xstart() {
- startproc $IPMISELD
- rc_status -v
- }
- Xstop() {
- killproc -TERM $IPMISELD
- rc_status -v
- }
- Xstatus() {
- echo -n "Checking for ipmiseld: "
- checkproc $IPMISELD
- rc_status -v
- }
- Xcondrestart() {
- $0 status
- if test $? = 0; then
- $0 restart
- else
- rc_reset
- fi
- rc_status
- }
- Xexit() {
- rc_exit
- }
-else
- echo "Unknown distribution type"
- exit 1
-fi
+start()
+{
+ start_daemon $NICE --lockfile "$LOCKFILE" --expect-user root -- ipmiseld $OPTIONS
+ RETVAL=$?
+ return $RETVAL
+}
-RETVAL=0
+stop()
+{
+ stop_daemon --lockfile "$LOCKFILE" --expect-user root -- ipmiseld
+ RETVAL=$?
+ return $RETVAL
+}
+
+restart()
+{
+ stop
+ start
+}
+# See how we were called.
case "$1" in
- start)
- echo -n "Starting ipmiseld: "
- Xstatus >/dev/null 2>&1 && exit 0
- Xstart
- ;;
- stop)
- echo -n "Shutting down ipmiseld: "
- Xstop
- ;;
- restart)
- $0 stop
- $0 start
- RETVAL=$?
- ;;
- status)
- Xstatus
- ;;
- condrestart|try-restart|force-reload)
- Xcondrestart
- ;;
- *)
- echo "Usage: $0 {start|stop|restart|status|condrestart|try-restart|force-reload}"
- exit 2
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ condstop)
+ if [ -e "$LOCKFILE" ]; then
+ stop
+ fi
+ ;;
+ condrestart|condreload)
+ if [ -e "$LOCKFILE" ]; then
+ restart
+ fi
+ ;;
+ status)
+ status --expect-user root -- ipmiseld
+ RETVAL=$?
+ ;;
+ *)
+ msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
+ RETVAL=1
esac
+
exit $RETVAL