1e71ca95cSGerald Jelinek#!/bin/ksh -p 2e71ca95cSGerald Jelinek# 3e71ca95cSGerald Jelinek# CDDL HEADER START 4e71ca95cSGerald Jelinek# 5e71ca95cSGerald Jelinek# The contents of this file are subject to the terms of the 6e71ca95cSGerald Jelinek# Common Development and Distribution License (the "License"). 7e71ca95cSGerald Jelinek# You may not use this file except in compliance with the License. 8e71ca95cSGerald Jelinek# 9e71ca95cSGerald Jelinek# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10e71ca95cSGerald Jelinek# or http://www.opensolaris.org/os/licensing. 11e71ca95cSGerald Jelinek# See the License for the specific language governing permissions 12e71ca95cSGerald Jelinek# and limitations under the License. 13e71ca95cSGerald Jelinek# 14e71ca95cSGerald Jelinek# When distributing Covered Code, include this CDDL HEADER in each 15e71ca95cSGerald Jelinek# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16e71ca95cSGerald Jelinek# If applicable, add the following below this CDDL HEADER, with the 17e71ca95cSGerald Jelinek# fields enclosed by brackets "[]" replaced with your own identifying 18e71ca95cSGerald Jelinek# information: Portions Copyright [yyyy] [name of copyright owner] 19e71ca95cSGerald Jelinek# 20e71ca95cSGerald Jelinek# CDDL HEADER END 21e71ca95cSGerald Jelinek# 22e71ca95cSGerald Jelinek# 23*80e2ca85S# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 24e71ca95cSGerald Jelinek# 25e71ca95cSGerald Jelinek 26e71ca95cSGerald JelinekPATH=/usr/bin:/usr/sbin 27e71ca95cSGerald Jelinekexport PATH 28e71ca95cSGerald Jelinek 29e71ca95cSGerald Jelinek. /usr/lib/brand/shared/common.ksh 30e71ca95cSGerald Jelinek 31e71ca95cSGerald Jelinekzonename=$1 32e71ca95cSGerald Jelinekzonepath=$2 33e71ca95cSGerald Jelinekcmd=$3 34e71ca95cSGerald Jelinek 35e71ca95cSGerald Jelinekif [ $3 == "datasets" ]; then 36e71ca95cSGerald Jelinek get_zonepath_ds $zonepath 37e71ca95cSGerald Jelinek 38e71ca95cSGerald Jelinek DS=`/usr/sbin/zfs list -H -t filesystem -o name $ZONEPATH_DS/ROOT` 39e71ca95cSGerald Jelinek if [ ! -z "$DS" ]; then 40e71ca95cSGerald Jelinek echo "$DS\c" 41e71ca95cSGerald Jelinek else 42e71ca95cSGerald Jelinek fail_fatal "$f_no_ds" 43e71ca95cSGerald Jelinek fi 44e71ca95cSGerald Jelinekfi 45e71ca95cSGerald Jelinek 46e71ca95cSGerald Jelinekexit $ZONE_SUBPROC_OK 47