Skip to content

Commit

Permalink
OS-2828: vmadm routes should live in their own file
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Gulewich committed Mar 18, 2014
1 parent e839128 commit 4a250e1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions usr/src/cmd/svc/milestone/net-routing-setup
Expand Up @@ -160,8 +160,8 @@ fi
# however, as persistent daemon state is now controlled by SMF.
#
ipv4_routing_set=`/usr/bin/svcprop -p routeadm/ipv4-routing-set $SMF_FMRI`
if [ -z "$defrouters" ] && \
[ `/usr/bin/bootparams | grep "^smartos"` != "" ]; then
smartos_param=`/usr/bin/bootparams | grep "^smartos"`
if [ -z "$defrouters" ] && [ "$smartos_param" != "" ]; then
#
# Set default value for ipv4-routing to enabled. If routeadm -e/-d
# has not yet been run by the administrator, we apply this default.
Expand Down Expand Up @@ -215,6 +215,16 @@ if [ -f /etc/inet/static_routes ]; then
done
fi

#
# Read /etc/inet/static_routes.vmadm and add each route.
#
if [ -f /etc/inet/static_routes.vmadm ]; then
echo "Adding vmadm persistent routes:"
/usr/bin/egrep -v "^(#|$)" /etc/inet/static_routes.vmadm | while read line; do
/usr/sbin/route add $line
done
fi

#
# Log the result
#
Expand Down

0 comments on commit 4a250e1

Please sign in to comment.