rcS.sh (7c478bd95313f5f23a4c958a745db2134aa03244) | rcS.sh (6927f468b0af7710df000f6b16f6ee413e1e3007) |
---|---|
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. 17# If applicable, add the following below this CDDL HEADER, with the 18# fields enclosed by brackets "[]" replaced with your own identifying 19# information: Portions Copyright [yyyy] [name of copyright owner] 20# 21# CDDL HEADER END 22# 23# | 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. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# |
24# Copyright 2004 Sun Microsystems, Inc. All rights reserved. | 23# Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
25# Use is subject to license terms. 26# 27# ident "%Z%%M% %I% %E% SMI" 28# 29# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T. 30# All rights reserved. 31# 32# --- 64 unchanged lines hidden (view full) --- 97_INIT_UTS_MACHINE="$3" # Machine class (uname -m) 98_INIT_UTS_ISA="$4" # Instruction set architecture (uname -p) 99_INIT_UTS_PLATFORM="$5" # Platform string (uname -i) 100 101export _INIT_RUN_LEVEL _INIT_RUN_NPREV _INIT_PREV_LEVEL \ 102 _INIT_UTS_SYSNAME _INIT_UTS_NODENAME _INIT_UTS_RELEASE _INIT_UTS_VERSION \ 103 _INIT_UTS_MACHINE _INIT_UTS_ISA _INIT_UTS_PLATFORM 104 | 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T. 29# All rights reserved. 30# 31# --- 64 unchanged lines hidden (view full) --- 96_INIT_UTS_MACHINE="$3" # Machine class (uname -m) 97_INIT_UTS_ISA="$4" # Instruction set architecture (uname -p) 98_INIT_UTS_PLATFORM="$5" # Platform string (uname -i) 99 100export _INIT_RUN_LEVEL _INIT_RUN_NPREV _INIT_PREV_LEVEL \ 101 _INIT_UTS_SYSNAME _INIT_UTS_NODENAME _INIT_UTS_RELEASE _INIT_UTS_VERSION \ 102 _INIT_UTS_MACHINE _INIT_UTS_ISA _INIT_UTS_PLATFORM 103 |
105_INIT_ZONENAME=`/sbin/zonename` 106 107export _INIT_ZONENAME 108 109if [ "$_INIT_ZONENAME" = "global" ]; then 110 # Export net boot configuration strategy. _INIT_NET_IF is set to the 111 # interface name of the netbooted interface if this is a net boot. 112 # _INIT_NET_STRATEGY is set to the network configuration strategy. 113 set -- `/sbin/netstrategy` 114 if [ $? -eq 0 ]; then 115 if [ "$1" = "nfs" -o "$1" = "cachefs" ]; then 116 _INIT_NET_IF="$2" 117 export _INIT_NET_IF 118 fi 119 _INIT_NET_STRATEGY="$3" 120 fi 121else 122 # Special case for zones since netstrategy needs /dev/ip which does 123 # not exist in a non-global zone. Also, the _IF variable is only 124 # consumed in the global zone. 125 _INIT_NET_STRATEGY="none" 126fi 127export _INIT_NET_STRATEGY 128 | |
129# | 104# |
130# Useful shell functions: | 105# Set _INIT_NET_STRATEGY and _INIT_NET_IF variables from /sbin/netstrategy |
131# | 106# |
107smf_netstrategy |
|
132 | 108 |
133# 134# shcat file 135# 136# Simulates cat in sh so it doesn't need to be on the root filesystem. 137# 138shcat() { 139 while [ $# -ge 1 ]; do 140 while read i; do 141 echo "$i" 142 done < $1 143 shift 144 done 145} 146 | |
147. /lib/svc/share/fs_include.sh 148 149# 150# Make the old, deprecated environment variable (_DVFS_RECONFIG) and the new 151# supported environment variable (_INIT_RECONFIG) to be synonyms. Set both 152# if the svc.startd reconfigure property is set. Note that for complete 153# backwards compatibility the value "YES" is significant with _DVFS_RECONFIG. 154# The # value associated with _INIT_RECONFIG is insignificant. What is --- 70 unchanged lines hidden --- | 109. /lib/svc/share/fs_include.sh 110 111# 112# Make the old, deprecated environment variable (_DVFS_RECONFIG) and the new 113# supported environment variable (_INIT_RECONFIG) to be synonyms. Set both 114# if the svc.startd reconfigure property is set. Note that for complete 115# backwards compatibility the value "YES" is significant with _DVFS_RECONFIG. 116# The # value associated with _INIT_RECONFIG is insignificant. What is --- 70 unchanged lines hidden --- |