[PATCH 0/9] Unsorted init script tuning

View: New views
17 Messages — Rating Filter:   Alert me  

[PATCH 0/9] Unsorted init script tuning

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

here comes short sequence of various small and stupid fixes in bmc-watchdog and
ipmidetectd initscripts. The goal is to make them LSB-compliant, with proper
exit codes and actions, which is required by Fedora guidelines.

I am maintainer of Fedora packages and I can have these changes there as Fedora
patches, but you might find some of them interesting. I intentionally made the
patches as small as possible, so you can pick only some of them.

Feel free to comment any of the patches, I expect you won't like all of them
(especially the last one :).

Jan


_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

[PATCH 1/9] Initscript should return '5' when 'program is not installed'

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Initscript should return exit code 5 if the executable cannot be found
(i.e. 'program is not installed').


Signed-off-by: Jan Safranek <jsafrane@...>
---

 bmc-watchdog/freeipmi-bmc-watchdog.init |    2 +-
 ipmidetect/freeipmi-ipmidetectd.init    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bmc-watchdog/freeipmi-bmc-watchdog.init b/bmc-watchdog/freeipmi-bmc-watchdog.init
index 18214f2..0d07a11 100755
--- a/bmc-watchdog/freeipmi-bmc-watchdog.init
+++ b/bmc-watchdog/freeipmi-bmc-watchdog.init
@@ -17,7 +17,7 @@ PIDFILE=/var/run/freeipmi-bmc-watchdog.pid
 LOCKFILE=/var/lock/subsys/freeipmi-bmc-watchdog
 CONFFILE=/etc/sysconfig/freeipmi-bmc-watchdog
 
-[ -f $DAEMON ] || exit 1
+[ -f $DAEMON ] || exit 5
 
 if [ -r $CONFFILE ]; then
         . $CONFFILE
diff --git a/ipmidetect/freeipmi-ipmidetectd.init b/ipmidetect/freeipmi-ipmidetectd.init
index 0979ceb..d0edc2c 100644
--- a/ipmidetect/freeipmi-ipmidetectd.init
+++ b/ipmidetect/freeipmi-ipmidetectd.init
@@ -15,7 +15,7 @@
 
 IPMIDETECTD=/usr/sbin/ipmidetectd
 
-[ -f $IPMIDETECTD ] || exit 1
+[ -f $IPMIDETECTD ] || exit 5
 
 # Load Redhat or Suse appropriate libs
 if [ -f /etc/rc.d/init.d/functions ] ; then



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

[PATCH 2/9] Return '6' if there is no config file

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The init script should check, if an config file exists, and return
appropriate exit code if it does not. There is no message printed (feel free
to add one), I suggest to provide example config file, so the error message is
not needed.

Signed-off-by: Jan Safranek <jsafrane@...>
---

 ipmidetect/freeipmi-ipmidetectd.init |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ipmidetect/freeipmi-ipmidetectd.init b/ipmidetect/freeipmi-ipmidetectd.init
index d0edc2c..cb2325d 100644
--- a/ipmidetect/freeipmi-ipmidetectd.init
+++ b/ipmidetect/freeipmi-ipmidetectd.init
@@ -14,8 +14,10 @@
 ### END INIT INFO
 
 IPMIDETECTD=/usr/sbin/ipmidetectd
+IPMIDETECTD_CONF=/etc/ipmidetectd.conf
 
 [ -f $IPMIDETECTD ] || exit 5
+[ -f $IPMIDETECTD_CONF ] || exit 6
 
 # Load Redhat or Suse appropriate libs
 if [ -f /etc/rc.d/init.d/functions ] ; then



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

[PATCH 3/9] Add sample configuration file for ipmidetectd

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As noted in previous patch, it would help if there is sample configuration
file for ipmidetectd. Here is my proposal.

Signed-off-by: Jan Safranek <jsafrane@...>
---

 ipmidetect/Makefile.am      |    5 ++++-
 ipmidetect/ipmidetectd.conf |   15 +++++++++++++++
 2 files changed, 19 insertions(+), 1 deletions(-)
 create mode 100644 ipmidetect/ipmidetectd.conf

diff --git a/ipmidetect/Makefile.am b/ipmidetect/Makefile.am
index d869f22..b265564 100644
--- a/ipmidetect/Makefile.am
+++ b/ipmidetect/Makefile.am
@@ -16,9 +16,10 @@ CLEANFILES = $(MANS_CPP) *~
 
 DISTCLEANFILES = $(MANS_CPP) $(MANS_CPP:%=%.pre) .deps/*.P
 
-EXTRA_DIST = freeipmi-ipmidetectd.init
+EXTRA_DIST = freeipmi-ipmidetectd.init ipmidetectd.conf
 
 install-data-local: $(INSTALL_INIT_SCRIPTS)
+ $(INSTALL) -m 644 $(srcdir)/ipmidetectd.conf $(DESTDIR)$(sysconfdir)/ipmidetectd.conf
 
 install-init-scripts:
  $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/init.d
@@ -26,3 +27,5 @@ install-init-scripts:
 
 uninstall-local:
  $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/freeipmi-ipmidetectd
+ $(RM) -f $(DESTDIR)$(sysconfdir)/ipmidetectd.conf
+
diff --git a/ipmidetect/ipmidetectd.conf b/ipmidetect/ipmidetectd.conf
new file mode 100644
index 0000000..769f43e
--- /dev/null
+++ b/ipmidetect/ipmidetectd.conf
@@ -0,0 +1,15 @@
+##########################################################################################################
+#
+# IPMIdetectd configuration file.
+#
+# For more information on the fields below, please see the manpage
+# ipmidetectd.conf(5).
+#
+# P.S.  If you configure different values, remember to uncomment the line :-)
+#
+##########################################################################################################
+#
+# ipmiping_period 15000
+# ipmidetectd_server_port 9225
+#
+# host <hostname>



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

[PATCH 4/9] Don't start running service

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

LSB specifies that 'start' operation on already running service should
return exit code 0 and do nothing.

I am not sure how the code path with /etc/rc.status instead of
/etc/init.d/functions works, does rc_status -v set RETVAL and returns the same
exit code?

Signed-off-by: Jan Safranek <jsafrane@...>
---

 bmc-watchdog/freeipmi-bmc-watchdog.init |    2 ++
 ipmidetect/freeipmi-ipmidetectd.init    |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/bmc-watchdog/freeipmi-bmc-watchdog.init b/bmc-watchdog/freeipmi-bmc-watchdog.init
index 0d07a11..d161931 100755
--- a/bmc-watchdog/freeipmi-bmc-watchdog.init
+++ b/bmc-watchdog/freeipmi-bmc-watchdog.init
@@ -51,6 +51,7 @@ if [ -f /etc/rc.d/init.d/functions ] ; then
     Xstatus() {
         status bmc-watchdog
  RETVAL=$?
+        return $RETVAL
     }
     Xcondrestart() {
         if test -e $LOCKFILE; then
@@ -99,6 +100,7 @@ RETVAL=0
 case "$1" in
    start)
       echo -n "Starting bmc-watchdog: "
+      Xstatus >/dev/null 2>&1 && exit 0
       Xstart
       ;;
 
diff --git a/ipmidetect/freeipmi-ipmidetectd.init b/ipmidetect/freeipmi-ipmidetectd.init
index cb2325d..101fe58 100644
--- a/ipmidetect/freeipmi-ipmidetectd.init
+++ b/ipmidetect/freeipmi-ipmidetectd.init
@@ -37,6 +37,7 @@ if [ -f /etc/rc.d/init.d/functions ] ; then
     Xstatus() {
         status ipmidetectd
  RETVAL=$?
+        return $RETVAL
     }
     Xcondrestart() {
         if test -e /var/lock/subsys/freeipmi-ipmidetectd; then
@@ -85,6 +86,7 @@ RETVAL=0
 case "$1" in
    start)
    echo -n "Starting ipmidetectd: "
+        Xstatus >/dev/null 2>&1 && exit 0
         Xstart
         ;;
   stop)



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

[PATCH 5/9] Reload operation is not supported by the daemons

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

LSB defines 'reload' as 'configuration of the service to be reloaded
without actually stopping and restarting the service', which is definitely
not the same as 'restart', where it leads now.

Signed-off-by: Jan Safranek <jsafrane@...>
---

 bmc-watchdog/freeipmi-bmc-watchdog.init |    2 +-
 ipmidetect/freeipmi-ipmidetectd.init    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bmc-watchdog/freeipmi-bmc-watchdog.init b/bmc-watchdog/freeipmi-bmc-watchdog.init
index d161931..9a20d2a 100755
--- a/bmc-watchdog/freeipmi-bmc-watchdog.init
+++ b/bmc-watchdog/freeipmi-bmc-watchdog.init
@@ -109,7 +109,7 @@ case "$1" in
       Xstop
       ;;
 
-  restart|reload)
+  restart)
    $0 stop
    $0 start
    RETVAL=$?
diff --git a/ipmidetect/freeipmi-ipmidetectd.init b/ipmidetect/freeipmi-ipmidetectd.init
index 101fe58..b04d0d7 100644
--- a/ipmidetect/freeipmi-ipmidetectd.init
+++ b/ipmidetect/freeipmi-ipmidetectd.init
@@ -93,7 +93,7 @@ case "$1" in
    echo -n "Shutting down ipmidetectd: "
  Xstop
    ;;
-  restart|reload)
+  restart)
    $0 stop
    $0 start
    RETVAL=$?



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

[PATCH 6/9] Add missing actions

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Add missing actions, which are either required by LSB or simple to
ipmlement. And while doing it, fix exit code of invalid/not-supported
actions.

Signed-off-by: Jan Safranek <jsafrane@...>
---

 bmc-watchdog/freeipmi-bmc-watchdog.init |    6 +++---
 ipmidetect/freeipmi-ipmidetectd.init    |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/bmc-watchdog/freeipmi-bmc-watchdog.init b/bmc-watchdog/freeipmi-bmc-watchdog.init
index 9a20d2a..217de89 100755
--- a/bmc-watchdog/freeipmi-bmc-watchdog.init
+++ b/bmc-watchdog/freeipmi-bmc-watchdog.init
@@ -117,12 +117,12 @@ case "$1" in
   status)
    Xstatus
  ;;
-  condrestart)
+  condrestart|try-restart|force-reload)
         Xcondrestart
         ;;
   *)
- echo "Usage: $0 {start|stop|restart|status|condrestart}"
- exit 1
+ echo "Usage: $0 {start|stop|restart|status|condrestart|try-restart|force-reload}"
+ exit 2
 esac
 
 exit $RETVAL
diff --git a/ipmidetect/freeipmi-ipmidetectd.init b/ipmidetect/freeipmi-ipmidetectd.init
index b04d0d7..a51e07e 100644
--- a/ipmidetect/freeipmi-ipmidetectd.init
+++ b/ipmidetect/freeipmi-ipmidetectd.init
@@ -101,10 +101,10 @@ case "$1" in
   status)
         Xstatus
    ;;
-  condrestart)
+  condrestart|try-restart|force-reload)
         Xcondrestart
    ;;
   *)
- echo "Usage: $0 {start|stop|restart|status|condrestart}"
- exit 1
+ echo "Usage: $0 {start|stop|restart|status|condrestart|try-restart|force-reload}"
+ exit 2
 esac



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

[PATCH 7/9] Return proper exit code

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

/etc/init.d/freeipmi-ipmidetectd should return some no-zero exit code
sometimes...


Signed-off-by: Jan Safranek <jsafrane@...>
---

 ipmidetect/freeipmi-ipmidetectd.init |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ipmidetect/freeipmi-ipmidetectd.init b/ipmidetect/freeipmi-ipmidetectd.init
index a51e07e..f099c92 100644
--- a/ipmidetect/freeipmi-ipmidetectd.init
+++ b/ipmidetect/freeipmi-ipmidetectd.init
@@ -108,3 +108,4 @@ case "$1" in
  echo "Usage: $0 {start|stop|restart|status|condrestart|try-restart|force-reload}"
  exit 2
 esac
+exit $RETVAL



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

[PATCH 8/9] Rename lockfiles

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

status() function from /etc/init.d/functions expects that the binary name
(/usr/bin/ipmidetectd) and lock file
(/var/lock/subsys/freeipmi-ipmidetectd) have the same file name. Otherwise
the function returns wrong exit codes, which leads to wrong exit code of
the whole initscript.

Signed-off-by: Jan Safranek <jsafrane@...>
---

 bmc-watchdog/freeipmi-bmc-watchdog.init |    2 +-
 ipmidetect/freeipmi-ipmidetectd.init    |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/bmc-watchdog/freeipmi-bmc-watchdog.init b/bmc-watchdog/freeipmi-bmc-watchdog.init
index 217de89..b49416c 100755
--- a/bmc-watchdog/freeipmi-bmc-watchdog.init
+++ b/bmc-watchdog/freeipmi-bmc-watchdog.init
@@ -14,7 +14,7 @@
 
 DAEMON=/usr/sbin/bmc-watchdog
 PIDFILE=/var/run/freeipmi-bmc-watchdog.pid
-LOCKFILE=/var/lock/subsys/freeipmi-bmc-watchdog
+LOCKFILE=/var/lock/subsys/bmc-watchdog
 CONFFILE=/etc/sysconfig/freeipmi-bmc-watchdog
 
 [ -f $DAEMON ] || exit 5
diff --git a/ipmidetect/freeipmi-ipmidetectd.init b/ipmidetect/freeipmi-ipmidetectd.init
index f099c92..e5521b4 100644
--- a/ipmidetect/freeipmi-ipmidetectd.init
+++ b/ipmidetect/freeipmi-ipmidetectd.init
@@ -15,6 +15,7 @@
 
 IPMIDETECTD=/usr/sbin/ipmidetectd
 IPMIDETECTD_CONF=/etc/ipmidetectd.conf
+LOCKFILE=//var/lock/subsys/ipmidetectd
 
 [ -f $IPMIDETECTD ] || exit 5
 [ -f $IPMIDETECTD_CONF ] || exit 6
@@ -26,13 +27,13 @@ if [ -f /etc/rc.d/init.d/functions ] ; then
         daemon $IPMIDETECTD
         RETVAL=$?
         echo
-        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/freeipmi-ipmidetectd
+        [ $RETVAL -eq 0 ] && touch $LOCKFILE
     }
     Xstop() {
         killproc ipmidetectd -TERM
         RETVAL=$?
         echo
-        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/freeipmi-ipmidetectd
+        [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
     }
     Xstatus() {
         status ipmidetectd
@@ -40,7 +41,7 @@ if [ -f /etc/rc.d/init.d/functions ] ; then
         return $RETVAL
     }
     Xcondrestart() {
-        if test -e /var/lock/subsys/freeipmi-ipmidetectd; then
+        if test -e $LOCKFILE; then
     $0 stop
     $0 start
       RETVAL=$?



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

[PATCH 9/9] Remove freeipmi- prefix from initscript

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As result of previous patch, there is inconsistency in naming of init
script, daemon and lock file. I propose to remove the freeipmi- prefix from
all these file names.

If you are concerned about conflicts in /etc/init.d/ directory, I can
assure you there is no other ipmieventd or bmc-watchdog service. In
addition, if there were one, it would probably conflict in
/usr/bin/ipmidetectd and /usr/bin/bpm_watchdog.

There is no policy in LSB, how the initscript and their lockfiles should be
named, it's just common practice to have the same daemon name, initscript
name and lockfile.

Of course, I could modify only the Makefile.am to rename the files during
installation, if you prefer no renaming in CVS.

Signed-off-by: Jan Safranek <jsafrane@...>
---

 bmc-watchdog/Makefile.am                     |   14 +--
 bmc-watchdog/bmc-watchdog.init               |  127 ++++++++++++++++++++++++++
 bmc-watchdog/bmc-watchdog.logrotate          |   16 +++
 bmc-watchdog/bmc-watchdog.sysconfig          |   44 +++++++++
 bmc-watchdog/freeipmi-bmc-watchdog.init      |  128 --------------------------
 bmc-watchdog/freeipmi-bmc-watchdog.logrotate |   16 ---
 bmc-watchdog/freeipmi-bmc-watchdog.sysconfig |   44 ---------
 freeipmi.spec.in                             |   61 ++++++------
 ipmidetect/Makefile.am                       |    6 +
 ipmidetect/freeipmi-ipmidetectd.init         |  112 -----------------------
 ipmidetect/ipmidetectd.init                  |  112 +++++++++++++++++++++++
 11 files changed, 340 insertions(+), 340 deletions(-)
 create mode 100644 bmc-watchdog/bmc-watchdog.init
 create mode 100644 bmc-watchdog/bmc-watchdog.logrotate
 create mode 100644 bmc-watchdog/bmc-watchdog.sysconfig
 delete mode 100755 bmc-watchdog/freeipmi-bmc-watchdog.init
 delete mode 100644 bmc-watchdog/freeipmi-bmc-watchdog.logrotate
 delete mode 100644 bmc-watchdog/freeipmi-bmc-watchdog.sysconfig
 delete mode 100644 ipmidetect/freeipmi-ipmidetectd.init
 create mode 100644 ipmidetect/ipmidetectd.init

diff --git a/bmc-watchdog/Makefile.am b/bmc-watchdog/Makefile.am
index 5067f6e..08fee08 100644
--- a/bmc-watchdog/Makefile.am
+++ b/bmc-watchdog/Makefile.am
@@ -17,25 +17,25 @@ DISTCLEANFILES = $(MANS_CPP) $(MANS_CPP:%=%.pre) .deps/*.P
 
 BMCWATCHDOGLOGdir = $(localstatedir)/log/$(PACKAGE)
 
-EXTRA_DIST = freeipmi-bmc-watchdog.init freeipmi-bmc-watchdog.logrotate freeipmi-bmc-watchdog.sysconfig
+EXTRA_DIST = bmc-watchdog.init bmc-watchdog.logrotate bmc-watchdog.sysconfig
 
 install-data-local: $(INSTALL_INIT_SCRIPTS) $(INSTALL_LOGROTATE_CONFIG) \
  $(INSTALL_LOGDIR)
 
 install-init-scripts:
  $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/init.d
- $(INSTALL) -m 755 $(srcdir)/freeipmi-bmc-watchdog.init $(DESTDIR)$(sysconfdir)/init.d/freeipmi-bmc-watchdog
+ $(INSTALL) -m 755 $(srcdir)/bmc-watchdog.init $(DESTDIR)$(sysconfdir)/init.d/bmc-watchdog
  $(INSTALL) -m 755 -d $(DESTDIR)/$(sysconfdir)/sysconfig
- $(INSTALL) -m 444 $(srcdir)/freeipmi-bmc-watchdog.sysconfig $(DESTDIR)$(sysconfdir)/sysconfig/freeipmi-bmc-watchdog
+ $(INSTALL) -m 444 $(srcdir)/bmc-watchdog.sysconfig $(DESTDIR)$(sysconfdir)/sysconfig/bmc-watchdog
 
 install-logrotate-config:
  $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/logrotate.d
- $(INSTALL) -m 444 $(srcdir)/freeipmi-bmc-watchdog.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/freeipmi-bmc-watchdog
+ $(INSTALL) -m 444 $(srcdir)/bmc-watchdog.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/bmc-watchdog
 
 install-logdir:
  $(INSTALL) -m 755 -d $(DESTDIR)$(BMCWATCHDOGLOGdir)
 
 uninstall-local:
- $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/freeipmi-bmc-watchdog
- $(RM) -f $(DESTDIR)$(sysconfdir)/logrotate.d/freeipmi-bmc-watchdog
- $(RM) -f $(DESTDIR)$(sysconfdir)/sysconfig/freeipmi-bmc-watchdog
+ $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/bmc-watchdog
+ $(RM) -f $(DESTDIR)$(sysconfdir)/logrotate.d/bmc-watchdog
+ $(RM) -f $(DESTDIR)$(sysconfdir)/sysconfig/bmc-watchdog
diff --git a/bmc-watchdog/bmc-watchdog.init b/bmc-watchdog/bmc-watchdog.init
new file mode 100644
index 0000000..6be5d7a
--- /dev/null
+++ b/bmc-watchdog/bmc-watchdog.init
@@ -0,0 +1,127 @@
+#!/bin/sh
+#
+# chkconfig: - 99 01
+# description: bmc-watchdog startup script
+#
+### BEGIN INIT INFO
+# Provides: bmc-watchdog
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop:  $network $remote_fs $syslog
+# Default-Stop:   0 1 2 6
+# Short-Description: Start and stop bmc-watchdog
+# Description: BMC watchdog timer daemon
+### END INIT INFO
+
+DAEMON=/usr/sbin/bmc-watchdog
+LOCKFILE=/var/lock/subsys/bmc-watchdog
+CONFFILE=/etc/sysconfig/bmc-watchdog
+
+[ -f $DAEMON ] || exit 5
+
+if [ -r $CONFFILE ]; then
+        . $CONFFILE
+fi
+
+# Load Redhat or Suse appropriate libs
+if [ -f /etc/rc.d/init.d/functions ] ; then
+    . /etc/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 /etc/rc.status ] ; then
+    . /etc/rc.status
+    Xstart() {
+        startproc -20 $DAEMON $OPTIONS
+        rc_status -v
+    }
+    Xstop() {
+        killproc -TERM $DAEMON
+        rc_status -v
+    }
+    Xstatus() {
+        echo -n "Checking for bmc-watchdog: "
+        checkproc $DAEMON
+        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
+
+RETVAL=0
+
+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
+esac
+
+exit $RETVAL
diff --git a/bmc-watchdog/bmc-watchdog.logrotate b/bmc-watchdog/bmc-watchdog.logrotate
new file mode 100644
index 0000000..5de8754
--- /dev/null
+++ b/bmc-watchdog/bmc-watchdog.logrotate
@@ -0,0 +1,16 @@
+##
+# $Id: freeipmi-bmc-watchdog.logrotate,v 1.1 2006/05/15 17:58:42 chu11 Exp $
+##
+
+/var/log/freeipmi/bmc-watchdog.log {
+  rotate 21
+  daily
+  compress
+  missingok
+  nocreate
+  nomail
+  notifempty
+  postrotate
+      /etc/init.d/bmc-watchdog condrestart
+  endscript
+}
diff --git a/bmc-watchdog/bmc-watchdog.sysconfig b/bmc-watchdog/bmc-watchdog.sysconfig
new file mode 100644
index 0000000..4d39cf4
--- /dev/null
+++ b/bmc-watchdog/bmc-watchdog.sysconfig
@@ -0,0 +1,44 @@
+#
+# This configuration file controls the behaviour of the bmc-watchdog daemon
+# from FreeIPMI.
+#
+#       -u INT, --timer-use=INT
+#              Set timer use.  The timer use value can be set  to  one  of  the
+#              following:  1  =  BIOS FRB2, 2 = BIOS POST, 3 = OS_LOAD, 4 = SMS
+#              OS, 5 = OEM.
+#
+#       -p INT, --pre-timeout-interrupt=INT
+#              Set pre-timeout interrupt.  The pre timeout interrupt can be set
+#              to one of the following: 0 = None, 1 = SMI, 2 = NMI, 3 = Messag-
+#              ing Interrupt.
+#
+#       -a INT, --timeout-action=INT
+#              Set timeout action.  The timeout action can be set to one of the
+#              following: 0 = No action, 1 = Hard Reset, 2 = Power  Down,  3  =
+#              Power Cycle.
+#
+#       -F, --clear-bios-frb2
+#              Clear  BIOS FRB2 Timer Use Flag.
+#
+#       -P, --clear-bios-post
+#              Clear BIOS POST Timer Use Flag.
+#
+#       -L, --clear-os-load
+#              Clear OS Load Timer Use Flag.
+#
+#       -S, --clear-sms-os
+#              Clear SMS/OS Timer Use Flag.
+#
+#       -O, --clear-oem
+#              Clear OEM Timer Use Flag.
+#
+#       -i SECS, --initial-countdown=SECS
+#              Set initial countdown in seconds.
+#
+#       -e, --reset-period
+#              Time interval to wait before resetting timer.  The default is 60
+#              seconds.
+#
+# For the remaining options, consult man bmc-watchdog
+#
+OPTIONS="-d -u 4 -p 0 -a 1 -F -P -L -S -O -i 900 -e 60"
diff --git a/bmc-watchdog/freeipmi-bmc-watchdog.init b/bmc-watchdog/freeipmi-bmc-watchdog.init
deleted file mode 100755
index b49416c..0000000
--- a/bmc-watchdog/freeipmi-bmc-watchdog.init
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/bin/sh
-#
-# chkconfig: - 99 01
-# description: bmc-watchdog startup script
-#
-### BEGIN INIT INFO
-# Provides: bmc-watchdog
-# Required-Start: $network $remote_fs $syslog
-# Required-Stop:  $network $remote_fs $syslog
-# Default-Stop:   0 1 2 6
-# Short-Description: Start and stop bmc-watchdog
-# Description: BMC watchdog timer daemon
-### END INIT INFO
-
-DAEMON=/usr/sbin/bmc-watchdog
-PIDFILE=/var/run/freeipmi-bmc-watchdog.pid
-LOCKFILE=/var/lock/subsys/bmc-watchdog
-CONFFILE=/etc/sysconfig/freeipmi-bmc-watchdog
-
-[ -f $DAEMON ] || exit 5
-
-if [ -r $CONFFILE ]; then
-        . $CONFFILE
-fi
-
-# Load Redhat or Suse appropriate libs
-if [ -f /etc/rc.d/init.d/functions ] ; then
-    . /etc/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 /etc/rc.status ] ; then
-    . /etc/rc.status
-    Xstart() {
-        startproc -20 $DAEMON $OPTIONS
-        rc_status -v
-    }
-    Xstop() {
-        killproc -TERM $DAEMON
-        rc_status -v
-    }
-    Xstatus() {
-        echo -n "Checking for bmc-watchdog: "
-        checkproc $DAEMON
-        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
-
-RETVAL=0
-
-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
-esac
-
-exit $RETVAL
diff --git a/bmc-watchdog/freeipmi-bmc-watchdog.logrotate b/bmc-watchdog/freeipmi-bmc-watchdog.logrotate
deleted file mode 100644
index a367e17..0000000
--- a/bmc-watchdog/freeipmi-bmc-watchdog.logrotate
+++ /dev/null
@@ -1,16 +0,0 @@
-##
-# $Id: freeipmi-bmc-watchdog.logrotate,v 1.1 2006/05/15 17:58:42 chu11 Exp $
-##
-
-/var/log/freeipmi/bmc-watchdog.log {
-  rotate 21
-  daily
-  compress
-  missingok
-  nocreate
-  nomail
-  notifempty
-  postrotate
-      /etc/init.d/freeipmi-bmc-watchdog condrestart
-  endscript
-}
diff --git a/bmc-watchdog/freeipmi-bmc-watchdog.sysconfig b/bmc-watchdog/freeipmi-bmc-watchdog.sysconfig
deleted file mode 100644
index 4d39cf4..0000000
--- a/bmc-watchdog/freeipmi-bmc-watchdog.sysconfig
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# This configuration file controls the behaviour of the bmc-watchdog daemon
-# from FreeIPMI.
-#
-#       -u INT, --timer-use=INT
-#              Set timer use.  The timer use value can be set  to  one  of  the
-#              following:  1  =  BIOS FRB2, 2 = BIOS POST, 3 = OS_LOAD, 4 = SMS
-#              OS, 5 = OEM.
-#
-#       -p INT, --pre-timeout-interrupt=INT
-#              Set pre-timeout interrupt.  The pre timeout interrupt can be set
-#              to one of the following: 0 = None, 1 = SMI, 2 = NMI, 3 = Messag-
-#              ing Interrupt.
-#
-#       -a INT, --timeout-action=INT
-#              Set timeout action.  The timeout action can be set to one of the
-#              following: 0 = No action, 1 = Hard Reset, 2 = Power  Down,  3  =
-#              Power Cycle.
-#
-#       -F, --clear-bios-frb2
-#              Clear  BIOS FRB2 Timer Use Flag.
-#
-#       -P, --clear-bios-post
-#              Clear BIOS POST Timer Use Flag.
-#
-#       -L, --clear-os-load
-#              Clear OS Load Timer Use Flag.
-#
-#       -S, --clear-sms-os
-#              Clear SMS/OS Timer Use Flag.
-#
-#       -O, --clear-oem
-#              Clear OEM Timer Use Flag.
-#
-#       -i SECS, --initial-countdown=SECS
-#              Set initial countdown in seconds.
-#
-#       -e, --reset-period
-#              Time interval to wait before resetting timer.  The default is 60
-#              seconds.
-#
-# For the remaining options, consult man bmc-watchdog
-#
-OPTIONS="-d -u 4 -p 0 -a 1 -F -P -L -S -O -i 900 -e 60"
diff --git a/freeipmi.spec.in b/freeipmi.spec.in
index d30e449..2f7de99 100644
--- a/freeipmi.spec.in
+++ b/freeipmi.spec.in
@@ -66,8 +66,8 @@ IPMI node detection daemon.
 
 %build
 %configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \
-           %{?_enable_debug} --disable-static
-CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags}
+           %{?_enable_debug} --disable-static CFLAGS="$RPM_OPT_FLAGS -DINT_MAX=65536"
+make %{?_smp_mflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -78,8 +78,8 @@ mkdir -p $RPM_BUILD_ROOT/%{_initrddir}/
 # if check needed for SLES systems
 if [[ "%{_sysconfdir}/init.d" != "%{_initrddir}" ]]
 then
-mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/freeipmi-bmc-watchdog $RPM_BUILD_ROOT/%{_initrddir}/freeipmi-bmc-watchdog
-mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/freeipmi-ipmidetectd $RPM_BUILD_ROOT/%{_initrddir}/freeipmi-ipmidetectd
+mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/bmc-watchdog $RPM_BUILD_ROOT/%{_initrddir}/bmc-watchdog
+mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/ipmidetectd $RPM_BUILD_ROOT/%{_initrddir}/ipmidetectd
 fi
 rm -f %{buildroot}%{_infodir}/dir
 # kludge to get around rpmlint complaining about 0 length semephore file
@@ -109,17 +109,17 @@ fi
 
 %post bmc-watchdog
 if [ "$1" = 1 ]; then
-   if [ -x %{_initrddir}/freeipmi-bmc-watchdog ]; then
-      /sbin/chkconfig --add freeipmi-bmc-watchdog
-      /sbin/chkconfig freeipmi-bmc-watchdog off
+   if [ -x %{_initrddir}/bmc-watchdog ]; then
+      /sbin/chkconfig --add bmc-watchdog
+      /sbin/chkconfig bmc-watchdog off
    fi
 fi
 if [ $1 -ge 1 ]; then
-   if [ -x %{_initrddir}/freeipmi-bmc-watchdog ]; then
-      if %{_initrddir}/freeipmi-bmc-watchdog status | grep -q running; then
-         %{_initrddir}/freeipmi-bmc-watchdog restart
+   if [ -x %{_initrddir}/bmc-watchdog ]; then
+      if %{_initrddir}/bmc-watchdog status | grep -q running; then
+         %{_initrddir}/bmc-watchdog restart
       else
-         %{_initrddir}/freeipmi-bmc-watchdog condrestart
+         %{_initrddir}/bmc-watchdog condrestart
       fi
    fi
 fi
@@ -129,27 +129,27 @@ fi
 # Stop bmc-watchdog if it is running
 #
 if [ "$1" = 0 ]; then
-    if [ -x %{_initrddir}/freeipmi-bmc-watchdog ]; then
-       if %{_initrddir}/freeipmi-bmc-watchdog status | grep -q running; then
-          %{_initrddir}/freeipmi-bmc-watchdog stop
+    if [ -x %{_initrddir}/bmc-watchdog ]; then
+       if %{_initrddir}/bmc-watchdog status | grep -q running; then
+          %{_initrddir}/bmc-watchdog stop
        fi
-       /sbin/chkconfig --del freeipmi-bmc-watchdog
+       /sbin/chkconfig --del bmc-watchdog
     fi
 fi
 
 %post ipmidetectd
 if [ "$1" = 1 ]; then
-   if [ -x %{_initrddir}/freeipmi-ipmidetectd ]; then
-      /sbin/chkconfig --add freeipmi-ipmidetectd
-      /sbin/chkconfig freeipmi-ipmidetectd off
+   if [ -x %{_initrddir}/ipmidetectd ]; then
+      /sbin/chkconfig --add ipmidetectd
+      /sbin/chkconfig ipmidetectd off
    fi
 fi
 if [ $1 -ge 1 ]; then
-   if [ -x %{_initrddir}/freeipmi-ipmidetectd ]; then
-      if %{_initrddir}/freeipmi-ipmidetectd status | grep -q running; then
-         %{_initrddir}/freeipmi-ipmidetectd restart
+   if [ -x %{_initrddir}/ipmidetectd ]; then
+      if %{_initrddir}/ipmidetectd status | grep -q running; then
+         %{_initrddir}/ipmidetectd restart
       else
-         %{_initrddir}/freeipmi-ipmidetectd condrestart
+         %{_initrddir}/ipmidetectd condrestart
       fi
    fi
 fi
@@ -159,11 +159,11 @@ fi
 # Stop ipmidetectd if it is running
 #
 if [ "$1" = 0 ]; then
-    if [ -x %{_initrddir}/freeipmi-ipmidetectd ]; then
-       if %{_initrddir}/freeipmi-ipmidetectd status | grep -q running; then
-          %{_initrddir}/freeipmi-ipmidetectd stop
+    if [ -x %{_initrddir}/ipmidetectd ]; then
+       if %{_initrddir}/ipmidetectd status | grep -q running; then
+          %{_initrddir}/ipmidetectd stop
        fi
-       /sbin/chkconfig --del freeipmi-ipmidetectd
+       /sbin/chkconfig --del ipmidetectd
     fi
 fi
 
@@ -327,16 +327,17 @@ fi
 %doc %{_datadir}/doc/%{name}/COPYING.bmc-watchdog
 %doc %{_datadir}/doc/%{name}/DISCLAIMER.bmc-watchdog
 %doc %{_datadir}/doc/%{name}/DISCLAIMER.bmc-watchdog.UC
-%config(noreplace) %{_initrddir}/freeipmi-bmc-watchdog
-%config(noreplace) %{_sysconfdir}/sysconfig/freeipmi-bmc-watchdog
-%config(noreplace) %{_sysconfdir}/logrotate.d/freeipmi-bmc-watchdog
+%config(noreplace) %{_initrddir}/bmc-watchdog
+%config(noreplace) %{_sysconfdir}/sysconfig/bmc-watchdog
+%config(noreplace) %{_sysconfdir}/logrotate.d/bmc-watchdog
 %{_sbindir}/bmc-watchdog
 %{_mandir}/man8/bmc-watchdog.8*
 %dir %{_localstatedir}/log/freeipmi
 
 %files ipmidetectd
 %defattr(-,root,root)
-%config(noreplace) %{_initrddir}/freeipmi-ipmidetectd
+%config(noreplace) %{_initrddir}/ipmidetectd
+%config(noreplace) %{_sysconfdir}//ipmidetectd.conf
 %{_sbindir}/ipmidetectd
 %{_mandir}/man5/ipmidetectd.conf.5*
 %{_mandir}/man8/ipmidetectd.8*
diff --git a/ipmidetect/Makefile.am b/ipmidetect/Makefile.am
index b265564..f2bd8b3 100644
--- a/ipmidetect/Makefile.am
+++ b/ipmidetect/Makefile.am
@@ -16,16 +16,16 @@ CLEANFILES = $(MANS_CPP) *~
 
 DISTCLEANFILES = $(MANS_CPP) $(MANS_CPP:%=%.pre) .deps/*.P
 
-EXTRA_DIST = freeipmi-ipmidetectd.init ipmidetectd.conf
+EXTRA_DIST = ipmidetectd.init ipmidetectd.conf
 
 install-data-local: $(INSTALL_INIT_SCRIPTS)
  $(INSTALL) -m 644 $(srcdir)/ipmidetectd.conf $(DESTDIR)$(sysconfdir)/ipmidetectd.conf
 
 install-init-scripts:
  $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/init.d
- $(INSTALL) -m 755 $(srcdir)/freeipmi-ipmidetectd.init $(DESTDIR)$(sysconfdir)/init.d/freeipmi-ipmidetectd
+ $(INSTALL) -m 755 $(srcdir)/ipmidetectd.init $(DESTDIR)$(sysconfdir)/init.d/ipmidetectd
 
 uninstall-local:
- $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/freeipmi-ipmidetectd
+ $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/ipmidetectd
  $(RM) -f $(DESTDIR)$(sysconfdir)/ipmidetectd.conf
 
diff --git a/ipmidetect/freeipmi-ipmidetectd.init b/ipmidetect/freeipmi-ipmidetectd.init
deleted file mode 100644
index e5521b4..0000000
--- a/ipmidetect/freeipmi-ipmidetectd.init
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/sh
-# $Id: freeipmi-ipmidetectd.init,v 1.3 2007/12/14 19:16:25 chu11 Exp $
-#
-# chkconfig: - 70 40
-# description: ipmidetectd startup script
-#
-### BEGIN INIT INFO
-# Provides: ipmidetectd
-# Required-Start: $network $remote_fs $syslog
-# Required-Stop:  $network $remote_fs $syslog
-# Default-Stop:   0 1 2 6
-# Short-Description: Start and stop ipmidetectd
-# Description: IPMI node detection monitoring daemon
-### END INIT INFO
-
-IPMIDETECTD=/usr/sbin/ipmidetectd
-IPMIDETECTD_CONF=/etc/ipmidetectd.conf
-LOCKFILE=//var/lock/subsys/ipmidetectd
-
-[ -f $IPMIDETECTD ] || exit 5
-[ -f $IPMIDETECTD_CONF ] || exit 6
-
-# Load Redhat or Suse appropriate libs
-if [ -f /etc/rc.d/init.d/functions ] ; then
-    . /etc/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 /etc/rc.status ] ; then
-    . /etc/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
-
-RETVAL=0
-
-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
-esac
-exit $RETVAL
diff --git a/ipmidetect/ipmidetectd.init b/ipmidetect/ipmidetectd.init
new file mode 100644
index 0000000..e5521b4
--- /dev/null
+++ b/ipmidetect/ipmidetectd.init
@@ -0,0 +1,112 @@
+#!/bin/sh
+# $Id: freeipmi-ipmidetectd.init,v 1.3 2007/12/14 19:16:25 chu11 Exp $
+#
+# chkconfig: - 70 40
+# description: ipmidetectd startup script
+#
+### BEGIN INIT INFO
+# Provides: ipmidetectd
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop:  $network $remote_fs $syslog
+# Default-Stop:   0 1 2 6
+# Short-Description: Start and stop ipmidetectd
+# Description: IPMI node detection monitoring daemon
+### END INIT INFO
+
+IPMIDETECTD=/usr/sbin/ipmidetectd
+IPMIDETECTD_CONF=/etc/ipmidetectd.conf
+LOCKFILE=//var/lock/subsys/ipmidetectd
+
+[ -f $IPMIDETECTD ] || exit 5
+[ -f $IPMIDETECTD_CONF ] || exit 6
+
+# Load Redhat or Suse appropriate libs
+if [ -f /etc/rc.d/init.d/functions ] ; then
+    . /etc/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 /etc/rc.status ] ; then
+    . /etc/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
+
+RETVAL=0
+
+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
+esac
+exit $RETVAL



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Re: [PATCH 0/9] Unsorted init script tuning

by Al Chu11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Jan,

Thanks for the patches.  Because this is a pretty big change (will be
bigger if I use patch 9/9), I'll only apply to the head branch.  I hope
to release 0.8.1 beta in the not to distant future.

As a whole, I think all the patches are fine.  I actually don't have an
issue for patch 9/9.  However, it conflicts with a previous Redhat
patch :-)  I had the naming scheme you propose in the patch (not having
freeipmi prefixed in front of init scripts and such).  However, Ben
Woodard @ Redhat said I had to put the prefix in front to pass rpmlint
which requires the prefix for naming daemons and init scripts.

I've CCed Ben.  Perhaps you guys can debate what takes priority.  I'm
fine with either one.  But since two Redhat requests are conflicting,
I'm not sure which distro rule wins out :-)

Al

On Wed, 2009-09-23 at 12:45 +0200, Jan Safranek wrote:

> Hi,
>
> here comes short sequence of various small and stupid fixes in bmc-watchdog and
> ipmidetectd initscripts. The goal is to make them LSB-compliant, with proper
> exit codes and actions, which is required by Fedora guidelines.
>
> I am maintainer of Fedora packages and I can have these changes there as Fedora
> patches, but you might find some of them interesting. I intentionally made the
> patches as small as possible, so you can pick only some of them.
>
> Feel free to comment any of the patches, I expect you won't like all of them
> (especially the last one :).
>
> Jan
>
>
> _______________________________________________
> Freeipmi-devel mailing list
> Freeipmi-devel@...
> http://*lists.gnu.org/mailman/listinfo/freeipmi-devel
>
--
Albert Chu
chu11@...
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Re: [PATCH 0/9] Unsorted init script tuning

by Al Chu11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Jan,

A thought just came up in regards to your 9/9 patch.

If we were to consistently prefix "freeipmi-" in front of everything,
would that also make us LSB compliant?  And perhaps make all parties
happy?

Al

On Wed, 2009-09-23 at 10:01 -0700, Al Chu wrote:

> Hey Jan,
>
> Thanks for the patches.  Because this is a pretty big change (will be
> bigger if I use patch 9/9), I'll only apply to the head branch.  I hope
> to release 0.8.1 beta in the not to distant future.
>
> As a whole, I think all the patches are fine.  I actually don't have an
> issue for patch 9/9.  However, it conflicts with a previous Redhat
> patch :-)  I had the naming scheme you propose in the patch (not having
> freeipmi prefixed in front of init scripts and such).  However, Ben
> Woodard @ Redhat said I had to put the prefix in front to pass rpmlint
> which requires the prefix for naming daemons and init scripts.
>
> I've CCed Ben.  Perhaps you guys can debate what takes priority.  I'm
> fine with either one.  But since two Redhat requests are conflicting,
> I'm not sure which distro rule wins out :-)
>
> Al
>
> On Wed, 2009-09-23 at 12:45 +0200, Jan Safranek wrote:
> > Hi,
> >
> > here comes short sequence of various small and stupid fixes in bmc-watchdog and
> > ipmidetectd initscripts. The goal is to make them LSB-compliant, with proper
> > exit codes and actions, which is required by Fedora guidelines.
> >
> > I am maintainer of Fedora packages and I can have these changes there as Fedora
> > patches, but you might find some of them interesting. I intentionally made the
> > patches as small as possible, so you can pick only some of them.
> >
> > Feel free to comment any of the patches, I expect you won't like all of them
> > (especially the last one :).
> >
> > Jan
> >
> >
> > _______________________________________________
> > Freeipmi-devel mailing list
> > Freeipmi-devel@...
> > http://**lists.gnu.org/mailman/listinfo/freeipmi-devel
> >
--
Albert Chu
chu11@...
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Re: [PATCH 0/9] Unsorted init script tuning

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 09/23/2009 07:23 PM, Al Chu wrote:
> Hey Jan,
>
> A thought just came up in regards to your 9/9 patch.
>
> If we were to consistently prefix "freeipmi-" in front of everything,
> would that also make us LSB compliant?  And perhaps make all parties
> happy?

Yes, everything will be fine if there is /usr/bin/freeipmi-ipmidetectd
and /usr/bin/freeipmi-bmc_watchdog. No (or little) changes are needed then.


Jan


_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Re: [PATCH 0/9] Unsorted init script tuning

by Al Chu11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-09-24 at 08:25 +0200, Jan Safranek wrote:

> On 09/23/2009 07:23 PM, Al Chu wrote:
> > Hey Jan,
> >
> > A thought just came up in regards to your 9/9 patch.
> >
> > If we were to consistently prefix "freeipmi-" in front of everything,
> > would that also make us LSB compliant?  And perhaps make all parties
> > happy?
>
> Yes, everything will be fine if there is /usr/bin/freeipmi-ipmidetectd
> and /usr/bin/freeipmi-bmc_watchdog. No (or little) changes are needed then.

Thinking about it for 10 more seconds, I suppose that's something I
really don't want to do.

Ben, any comments?

Al

>
> Jan



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Re: [PATCH 0/9] Unsorted init script tuning

by Al Chu11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jan,

I noticed this in your 9/9 patch for the freeipmi.spec file:

 %build
 %configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \
-           %{?_enable_debug} --disable-static
-CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags}
+           %{?_enable_debug} --disable-static CFLAGS="$RPM_OPT_FLAGS -DINT_MAX=65536"
+make %{?_smp_mflags}

I'm a little lost on the need to define INT_MAX to 65536.  Some wierd
corner case I'm not familiar with?

Al

On Wed, 2009-09-23 at 10:23 -0700, Al Chu wrote:

> Hey Jan,
>
> A thought just came up in regards to your 9/9 patch.
>
> If we were to consistently prefix "freeipmi-" in front of everything,
> would that also make us LSB compliant?  And perhaps make all parties
> happy?
>
> Al
>
> On Wed, 2009-09-23 at 10:01 -0700, Al Chu wrote:
> > Hey Jan,
> >
> > Thanks for the patches.  Because this is a pretty big change (will be
> > bigger if I use patch 9/9), I'll only apply to the head branch.  I hope
> > to release 0.8.1 beta in the not to distant future.
> >
> > As a whole, I think all the patches are fine.  I actually don't have an
> > issue for patch 9/9.  However, it conflicts with a previous Redhat
> > patch :-)  I had the naming scheme you propose in the patch (not having
> > freeipmi prefixed in front of init scripts and such).  However, Ben
> > Woodard @ Redhat said I had to put the prefix in front to pass rpmlint
> > which requires the prefix for naming daemons and init scripts.
> >
> > I've CCed Ben.  Perhaps you guys can debate what takes priority.  I'm
> > fine with either one.  But since two Redhat requests are conflicting,
> > I'm not sure which distro rule wins out :-)
> >
> > Al
> >
> > On Wed, 2009-09-23 at 12:45 +0200, Jan Safranek wrote:
> > > Hi,
> > >
> > > here comes short sequence of various small and stupid fixes in bmc-watchdog and
> > > ipmidetectd initscripts. The goal is to make them LSB-compliant, with proper
> > > exit codes and actions, which is required by Fedora guidelines.
> > >
> > > I am maintainer of Fedora packages and I can have these changes there as Fedora
> > > patches, but you might find some of them interesting. I intentionally made the
> > > patches as small as possible, so you can pick only some of them.
> > >
> > > Feel free to comment any of the patches, I expect you won't like all of them
> > > (especially the last one :).
> > >
> > > Jan
> > >
> > >
> > > _______________________________________________
> > > Freeipmi-devel mailing list
> > > Freeipmi-devel@...
> > > http://**lists.gnu.org/mailman/listinfo/freeipmi-devel
> > >
--
Albert Chu
chu11@...
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Re: [PATCH 0/9] Unsorted init script tuning

by Jan Safranek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10/01/2009 12:11 AM, Al Chu wrote:

> Hi Jan,
>
> I noticed this in your 9/9 patch for the freeipmi.spec file:
>
>   %build
>   %configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \
> -           %{?_enable_debug} --disable-static
> -CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags}
> +           %{?_enable_debug} --disable-static CFLAGS="$RPM_OPT_FLAGS -DINT_MAX=65536"
> +make %{?_smp_mflags}
>
> I'm a little lost on the need to define INT_MAX to 65536.  Some wierd
> corner case I'm not familiar with?

Ooops, this is indeed nonsense, I needed -DINT_MAX=65536 for some tests
and the I forgot to remove it.

Sorry for confusion

Jan


_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Re: [PATCH 0/9] Unsorted init script tuning

by Al Chu11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Jan,

Got an e-mail from Ben.  I'm going to accept the 9/9 patch.  B/c of
other patches that came along, I'm going to have to hand-massage it in a
bit.  When the beta of FreeIPMI 0.8.1 comes out, you might want to take
a quick look and make sure I didn't mess up somewhere along the way.

Thanks,
Al

On Thu, 2009-09-24 at 08:25 +0200, Jan Safranek wrote:

> On 09/23/2009 07:23 PM, Al Chu wrote:
> > Hey Jan,
> >
> > A thought just came up in regards to your 9/9 patch.
> >
> > If we were to consistently prefix "freeipmi-" in front of everything,
> > would that also make us LSB compliant?  And perhaps make all parties
> > happy?
>
> Yes, everything will be fine if there is /usr/bin/freeipmi-ipmidetectd
> and /usr/bin/freeipmi-bmc_watchdog. No (or little) changes are needed then.
>
>
> Jan
--
Albert Chu
chu11@...
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@...
http://lists.gnu.org/mailman/listinfo/freeipmi-devel