#!/bin/sh -f
#
# Copyright 2000 Sun Microsystems, Inc. All Rights Reserved
#
# @(#)ss_fix_multicast.sh	3.2 00/03/07 Sun Microsystems
#
# This is a hack to work around multicast address disappearing on plumb/unplumb
# in certain versions of Solaris.  It's not clear if it's really needed any
# more.
#

/sbin/ifconfig -a inet | {		# Try to find a numeric IPv4 address,
    localaddr=`/usr/bin/uname -n`	# otherwise just use the nodename.
    while read af addr rest
    do if [ "$af" = "inet" -a "$addr" != "127.0.0.1" ]
       then localaddr=$addr
	    break
       fi
    done

    exec /usr/sbin/route add "224.0.0.0" "$localaddr" 0
}
