c34b84
diff -up openslp-2.0.0/etc/slpd.all_init.orig openslp-2.0.0/etc/slpd.all_init
c34b84
--- openslp-2.0.0/etc/slpd.all_init.orig	2012-11-28 18:07:04.000000000 +0100
c34b84
+++ openslp-2.0.0/etc/slpd.all_init	2013-06-24 13:27:34.375575496 +0200
c34b84
@@ -1,28 +1,5 @@
c34b84
 #!/bin/bash
c34b84
-#
c34b84
-#	/etc/rc.d/init.d/slpd
c34b84
-#
c34b84
-# slpd    Start/Stop the OpenSLP SA daemon (slpd).
c34b84
-#
c34b84
-# chkconfig: 345 13 87
c34b84
-# description: OpenSLP daemon for the Service Location Protocol
c34b84
-# processname: slpd
c34b84
-
c34b84
-# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
c34b84
-#     Modified for RHS Linux by Damien Neil
c34b84
-#     Modified for COL by Raymund Will, <ray@lst.de>
c34b84
-#     Modified for OpenSLP by Matt Peterson <mpeterson@calderasystems.com>
c34b84
-#     Modified to be distribution agnostic by Bart Whiteley <bart@caldera.com>
c34b84
-
c34b84
-#//////////////////////////////////////////////////#
c34b84
-# Does nothing if a route exists that supports     # 
c34b84
-# multicast traffic. If no routes supporting       #
c34b84
-# multicast traffic exists, the function tries to  #
c34b84
-# add one.  A 0 is returned on success and a 1     #
c34b84
-# on failure. One parameter must be passed in.     #
c34b84
-# This variable determins verbosity. If parameter  #
c34b84
-# is non-zero debugging will appear                #
c34b84
-#//////////////////////////////////////////////////#
c34b84
+
c34b84
 multicast_route_set() 
c34b84
 {
c34b84
     PING_OPTIONS_1='-c1 -w1'
c34b84
@@ -91,94 +68,11 @@ multicast_route_set()
c34b84
     return $retval
c34b84
 }
c34b84
 
c34b84
-NAME=slpd
c34b84
-DAEMON=/usr/sbin/$NAME  
c34b84
-SUSE=0
c34b84
-
c34b84
-# Change to root
c34b84
-OLDDIR=`pwd`
c34b84
-cd /
c34b84
-
c34b84
-# Source function library.
c34b84
-if [ -f /etc/rc.d/init.d/functions ]; then
c34b84
-  . /etc/rc.d/init.d/functions
c34b84
-else
c34b84
-  SUSE=1
c34b84
-fi
c34b84
-  
c34b84
-test -x $DAEMON || exit 0
c34b84
-
c34b84
-if [ ! "$SVIlock" = "" ]; then
c34b84
-  unset LOCK
c34b84
-else
c34b84
-  LOCK=/var/lock/subsys/slpd
c34b84
+multicast_route_set 1
c34b84
+multicast_enabled=$?
c34b84
+if [ "$multicast_enabled" != "0" ] ; then
c34b84
+  echo "Failure: No Route Available for Multicast Traffic"
c34b84
+  exit 1
c34b84
 fi
c34b84
 
c34b84
-RETVAL=0
c34b84
-
c34b84
-#
c34b84
-#	See how we were called.
c34b84
-#
c34b84
-case "$1" in
c34b84
-  start)
c34b84
-    # Check if atd is already running
c34b84
-    # RH style
c34b84
-    if [ $SUSE -eq 0 ] && [ ! "$LOCK" = "" ] && [ -f $LOCK ]; then
c34b84
-      exit 0
c34b84
-    fi
c34b84
-    # Caldera Style
c34b84
-    if [ ! "$SVIlock" = "" ] && [ -f $SVIlock ]; then
c34b84
-      exit 0
c34b84
-    fi
c34b84
-    echo -n 'Starting slpd: '
c34b84
-
c34b84
-    multicast_route_set 1
c34b84
-    multicast_enabled=$?
c34b84
-    if [ "$multicast_enabled" != "0" ] ; then
c34b84
-      echo "Failure: No Route Available for Multicast Traffic"
c34b84
-      exit 1
c34b84
-    fi
c34b84
-    if [ $SUSE -eq 0 ]; then
c34b84
-      if [ -x /sbin/ssd ]; then
c34b84
-        ssd -S -n $NAME -x $DAEMON -- $OPTIONS
c34b84
-        [ ! "$SVIlock" = "" ] && touch $SVIlock
c34b84
-      else
c34b84
-        daemon $DAEMON
c34b84
-        RETVAL=$?
c34b84
-      fi
c34b84
-    else
c34b84
-      startproc $DAEMON $OPTIONS
c34b84
-    fi
c34b84
-    [ $SUSE -eq 0 ] && [ ! "$LOCK" = "" ] && [ $RETVAL -eq 0 ] && touch $LOCK
c34b84
-    echo
c34b84
-    ;;
c34b84
-  stop)
c34b84
-    echo -n 'Stopping slpd: '
c34b84
-    
c34b84
-    if [ -x /sbin/ssd ]; then
c34b84
-      ssd -K -p /var/run/$NAME.pid -n $NAME
c34b84
-      [ ! "$SVIlock" = "" ] && rm -f $SVIlock
c34b84
-    else
c34b84
-      killproc $DAEMON
c34b84
-      RETVAL=$?
c34b84
-    fi
c34b84
-    [ ! "$LOCK" = "" ] && [ $RETVAL -eq 0 ] && rm -f $LOCK
c34b84
-    echo
c34b84
-    ;;
c34b84
-  reload|restart)
c34b84
-    cd $OLDDIR
c34b84
-    $0 stop
c34b84
-    $0 start
c34b84
-	 cd /
c34b84
-    RETVAL=$?
c34b84
-    ;;
c34b84
-  status)
c34b84
-    status /usr/sbin/slpd
c34b84
-    RETVAL=$?
c34b84
-    ;;
c34b84
-  *)
c34b84
-    echo "Usage: /etc/rc.d/init.d/slpd {start|stop|restart|reload|status}"
c34b84
-    exit 1
c34b84
-esac
c34b84
-
c34b84
-exit $RETVAL
c34b84
+exit 0