Blame SOURCES/openslp-2.0.0-multicast-set.patch

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