Commit d28d8354 authored by Mike Hibler's avatar Mike Hibler

Make subboss config a little more flexible.

parent d63b1d71
...@@ -13,6 +13,24 @@ ...@@ -13,6 +13,24 @@
#MCBASEADDR="" #MCBASEADDR=""
MCBASEADDR="239.192.1" MCBASEADDR="239.192.1"
#
# Set to use unicast when downloading from boss
#
UNICAST=
#UNICAST=yes
#
# Set to the max bandwidth any instance of frisbeed should use (Mb/sec)
#
BANDWIDTH=
#BANDWIDTH=100000000
#
# Run as an IGMPv2 querier. You should only have one of these per VLAN.
#
MCQUERIER=
#MCQUERIER=yes
# #
# Set to run with debugging enabled. # Set to run with debugging enabled.
# #
...@@ -73,18 +91,37 @@ echo -n " mfrisbeed" ...@@ -73,18 +91,37 @@ echo -n " mfrisbeed"
rm -f /var/run/frisbeed-*.pid rm -f /var/run/frisbeed-*.pid
args="-C null -S @BOSSNODE_IP@ -I /z/image_cache -A -M -R" args="-C null -S @BOSSNODE_IP@ -I /z/image_cache -A -M -R"
if [ -n "$MCBASEADDR" ]; then if [ -n "$UNICAST" ]; then
args="$args -O mcaddr=$MCBASEADDR" args="$args -X ucast"
fi
if [ -n "$MCQUERIER" ]; then
args="$args -Q 30"
# XXX it is a v2 querier
sysctl net.inet.igmp.default_version=2
sysctl net.inet.igmp.legacysupp=1
sysctl net.inet.igmp.v2enable=1
fi fi
if [ -n "$DEBUG" ]; then if [ -n "$DEBUG" ]; then
args="-ddD $args" args="-ddD $args"
fi fi
opts=""
if [ -n "$MCBASEADDR" ]; then
opts="-O mcaddr=$MCBASEADDR"
fi
if [ -n "$BANDWIDTH" ]; then
if [ -z "$opts" ]; then
opts="-O bandwidth=$BANDWIDTH"
else
opts="$opts,bandwidth=$BANDWIDTH"
fi
fi
if [ -z "$DEBUG" -a -x @prefix@/sbin/daemon_wrapper ]; then if [ -z "$DEBUG" -a -x @prefix@/sbin/daemon_wrapper ]; then
@prefix@/sbin/daemon_wrapper -i 30 -l @prefix@/log/mfrisbeed_wrapper.log \ @prefix@/sbin/daemon_wrapper -i 30 -l @prefix@/log/mfrisbeed_wrapper.log \
@prefix@/sbin/mfrisbeed -d $args @prefix@/sbin/mfrisbeed -d $args $opts
else else
@prefix@/sbin/mfrisbeed $args @prefix@/sbin/mfrisbeed $args $opts
fi fi
exit $? exit $?
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment