net-init (1291:eb60dec49783) | net-init (1573:7338e65f2666) |
---|---|
1#!/sbin/sh 2# 3# CDDL HEADER START 4# 5# The contents of this file are subject to the terms of the | 1#!/sbin/sh 2# 3# CDDL HEADER START 4# 5# The contents of this file are subject to the terms of the |
6# Common Development and Distribution License, Version 1.0 only 7# (the "License"). You may not use this file except in compliance 8# with the License. | 6# Common Development and Distribution License (the "License"). 7# You may not use this file except in compliance with the License. |
9# 10# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11# or http://www.opensolaris.org/os/licensing. 12# See the License for the specific language governing permissions 13# and limitations under the License. 14# 15# When distributing Covered Code, include this CDDL HEADER in each 16# file and include the License file at usr/src/OPENSOLARIS.LICENSE. --- 24 unchanged lines hidden (view full) --- 41 42case "$1" in 43'start') 44 # 45 # In a zone we need this service to be up, but all of the work 46 # it tries to do is irrelevant (and will actually lead to the service 47 # failing if we try to do it), so just bail out. 48 # | 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. --- 24 unchanged lines hidden (view full) --- 40 41case "$1" in 42'start') 43 # 44 # In a zone we need this service to be up, but all of the work 45 # it tries to do is irrelevant (and will actually lead to the service 46 # failing if we try to do it), so just bail out. 47 # |
49 if [ `/sbin/zonename` != "global" ]; then 50 exit 0 51 fi | 48 smf_is_globalzone || exit $SMF_EXIT_OK 49 |
52 ;; # Fall through -- rest of script is the initialization code 53 54'stop') | 50 ;; # Fall through -- rest of script is the initialization code 51 52'stop') |
55 if [ `/sbin/zonename` != "global" ]; then 56 exit 0 57 fi | 53 smf_is_globalzone || exit $SMF_EXIT_OK 54 |
58 # 59 # If we were routing dynamically, we will note this with 60 # the .dynamic_routing file, so that we can leave the routes 61 # in place without thinking they're static route entries 62 # when we come back into states 2 or 3. 63 # 64 if /usr/bin/pgrep -x -u 0 'in.routed|in.rdisc' >/dev/null 2>&1; then | 55 # 56 # If we were routing dynamically, we will note this with 57 # the .dynamic_routing file, so that we can leave the routes 58 # in place without thinking they're static route entries 59 # when we come back into states 2 or 3. 60 # 61 if /usr/bin/pgrep -x -u 0 'in.routed|in.rdisc' >/dev/null 2>&1; then |
65 /usr/bin/pkill -z `/sbin/zonename` -x -u 0 'in.routed|in.rdisc' | 62 /usr/bin/pkill -z global -x -u 0 'in.routed|in.rdisc' |
66 > /etc/.dynamic_routing 67 fi | 63 > /etc/.dynamic_routing 64 fi |
68 /usr/bin/pkill -z `/sbin/zonename` -x -u 0 'in.ndpd|in.ripngd' 69 exit 0 | 65 /usr/bin/pkill -z global -x -u 0 'in.ndpd|in.ripngd' 66 exit $SMF_EXIT_OK |
70 ;; 71 72*) 73 echo "Usage: $0 { start | stop }" 74 exit 1 75 ;; 76esac 77 --- 285 unchanged lines hidden (view full) --- 363if [ -f /etc/inet/static_routes ]; then 364 echo "Adding persistent routes:" 365 /usr/bin/egrep -v "^(#|$)" /etc/inet/static_routes | while read line; do 366 /usr/sbin/route add $line 367 done 368fi 369 370# Clear exit status. | 67 ;; 68 69*) 70 echo "Usage: $0 { start | stop }" 71 exit 1 72 ;; 73esac 74 --- 285 unchanged lines hidden (view full) --- 360if [ -f /etc/inet/static_routes ]; then 361 echo "Adding persistent routes:" 362 /usr/bin/egrep -v "^(#|$)" /etc/inet/static_routes | while read line; do 363 /usr/sbin/route add $line 364 done 365fi 366 367# Clear exit status. |
371exit 0 | 368exit $SMF_EXIT_OK |