#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
#
#
# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2016 Nexenta Systems, Inc.
#
export NOINUSE_CHECK=1
export STF_TOOLS="/opt/test-runner/stf"
export PATHDIR=""
runner="/opt/test-runner/bin/run"
auto_detect=false
if [[ -z "$TESTFAIL_CALLBACKS" ]] ; then
fi
function fail
{
echo $1
exit ${2:-1}
}
function find_disks
{
'/c[0-9]/ {print $2}')
typeset used_disks=$(zpool status | awk \
typeset disk used avail_disks
for disk in $all_disks; do
for used in $used_disks; do
done
[[ -n $avail_disks ]] && avail_disks="$avail_disks $disk"
[[ -z $avail_disks ]] && avail_disks="$disk"
done
echo $avail_disks
}
function find_rpool
{
echo ${ds%%/*}
}
function find_runfile
{
typeset distro=
fi
[[ -n $distro ]] && echo $STF_SUITE/runfiles/$distro.run
}
function verify_id
{
}
function verify_disks
{
typeset disk
[[ $? -eq 0 ]] || return 1
done
return 0
}
function create_links
{
typeset dir=$1
typeset file_list=$2
for i in $file_list; do
done
}
function constrain_path
{
create_links "/usr/bin" "$USR_BIN_FILES"
create_links "/sbin" "$SBIN_FILES"
# Special case links
}
while getopts ac:q c; do
case $c in
'a')
auto_detect=true
;;
'c')
;;
'q')
quiet='-q'
;;
esac
done
# If the user specified -a, then use free disks, otherwise use those in $DISKS.
if $auto_detect; then
export DISKS=$(find_disks)
elif [[ -z $DISKS ]]; then
fail "\$DISKS not set in env, and -a not specified."
else
fi
# Add the root pool to $KEEP according to its contents.
# It's ok to list it twice.
if [[ -z $KEEP ]]; then
else
fi
export __ZFS_POOL_EXCLUDE="$KEEP"
# Ensure user has only basic privileges.
ret=$?
exit $ret