smf_include.sh (45916cd2) smf_include.sh (f4b3ec61)
1#!/bin/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 (the "License").
7# You may not use this file except in compliance with the License.
8#

--- 6 unchanged lines hidden (view full) ---

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#
1#!/bin/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 (the "License").
7# You may not use this file except in compliance with the License.
8#

--- 6 unchanged lines hidden (view full) ---

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#
23# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24# Use is subject to license terms.
25#
26#ident "%Z%%M% %I% %E% SMI"
27
28smf_present () {
29 [ -r /etc/svc/volatile/repository_door ] && \
30 [ ! -f /etc/svc/volatile/repository_door ]
31}

--- 37 unchanged lines hidden (view full) ---

69#
70# Returns zero (success) if this is not the global zone. 1 otherwise.
71#
72smf_is_nonglobalzone() {
73 [ "${SMF_ZONENAME:=`/sbin/zonename`}" != "global" ] && return 0
74 return 1
75}
76
24# Use is subject to license terms.
25#
26#ident "%Z%%M% %I% %E% SMI"
27
28smf_present () {
29 [ -r /etc/svc/volatile/repository_door ] && \
30 [ ! -f /etc/svc/volatile/repository_door ]
31}

--- 37 unchanged lines hidden (view full) ---

69#
70# Returns zero (success) if this is not the global zone. 1 otherwise.
71#
72smf_is_nonglobalzone() {
73 [ "${SMF_ZONENAME:=`/sbin/zonename`}" != "global" ] && return 0
74 return 1
75}
76
77# smf_configure_ip
78#
79# Returns zero (success) if this zone needs IP to be configured i.e.
80# the global zone or has an exclusive stack. 1 otherwise.
81#
82smf_configure_ip() {
83 [ "${SMF_ZONENAME:=`/sbin/zonename`}" = "global" -o \
84 `/sbin/zonename -t` = exclusive ] && return 0
85 return 1
86}
87
88# smf_dont_configure_ip
89#
90# Inverse of smf_configure_ip
91#
92smf_dont_configure_ip() {
93 [ "${SMF_ZONENAME:=`/sbin/zonename`}" != "global" -a \
94 `/sbin/zonename -t` = shared ] && return 0
95 return 1
96}
97
77# smf_is_system_labeled
78#
79# Returns zero (success) if system is labeled (aka Trusted Extensions).
80# 1 otherwise.
81#
82smf_is_system_labeled() {
83 [ ! -x /bin/plabel ] && return 1
84 /bin/plabel > /dev/null 2>&1

--- 111 unchanged lines hidden ---
98# smf_is_system_labeled
99#
100# Returns zero (success) if system is labeled (aka Trusted Extensions).
101# 1 otherwise.
102#
103smf_is_system_labeled() {
104 [ ! -x /bin/plabel ] && return 1
105 /bin/plabel > /dev/null 2>&1

--- 111 unchanged lines hidden ---