diff options
| author | Rob Gulewich <robert.gulewich@joyent.com> | 2014-03-17 23:31:32 -0700 |
|---|---|---|
| committer | Rob Gulewich <robert.gulewich@joyent.com> | 2014-03-17 23:31:52 -0700 |
| commit | 4a250e1ede0fc5db734f2785a1cb4c4b4c4fedbb (patch) | |
| tree | acf34e736e77ac0b38f2067c4b4bdca684b58b81 /usr/src/cmd/svc | |
| parent | e8391284f56782afb6cfa693ffd5462951fdf786 (diff) | |
| download | illumos-joyent-4a250e1ede0fc5db734f2785a1cb4c4b4c4fedbb.tar.gz | |
OS-2828: vmadm routes should live in their own file
Diffstat (limited to 'usr/src/cmd/svc')
| -rw-r--r-- | usr/src/cmd/svc/milestone/net-routing-setup | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr/src/cmd/svc/milestone/net-routing-setup b/usr/src/cmd/svc/milestone/net-routing-setup index 545004b147..b4ee7d39ac 100644 --- a/usr/src/cmd/svc/milestone/net-routing-setup +++ b/usr/src/cmd/svc/milestone/net-routing-setup @@ -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. @@ -216,6 +216,16 @@ if [ -f /etc/inet/static_routes ]; then 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 # echo "Routing setup complete:" |
