1 #
   2 # CDDL HEADER START
   3 #
   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #
  26 
  27 #
  28 # Common variables for all setup
  29 #
  30 
  31 # Test client hostname
  32 export CLIENT=${CLIENT:-$(hostname)}
  33 
  34 # TX labled zone path
  35 export ZONE_PATH=${ZONE_PATH%%/}
  36 
  37 # Shared directory on server
  38 SHRDIR=${SHRDIR:-"/nfsgen_share"}
  39 export SHRDIR=${ZONE_PATH}${SHRDIR}
  40 
  41 # Mount point on client
  42 MNTDIR=${MNTDIR:-"/nfsgen_mount"}
  43 export MNTDIR=${ZONE_PATH}${MNTDIR}
  44 
  45 # Share group
  46 export SHRGRP=${SHRGRP:-"nfsgen_shgrp"}
  47 
  48 # Mount options
  49 export MNTOPT=${MNTOPT:-"rw"}
  50 
  51 # NFSv4 mapid domain
  52 export NFSMAPID_DOMAIN=${NFSMAPID_DOMAIN:-"sun.com"}
  53 
  54 # DEBUG variable for the suite
  55 export NFSGEN_DEBUG=\$NFSGEN_DEBUG
  56 
  57 # Temp directory
  58 SRV_TMPDIR=${STF_TMPDIR:-"/var/tmp"}
  59 STF_TMPDIR=${STF_TMPDIR:-$STF_CONFIG}
  60 DATETAG=$(date +"%y-%m-%d-%H-%M-%S" | sed 's/-//'g)
  61 STF_TMPDIR=$STF_TMPDIR/TMPDIR-nfsgen-$DATETAG
  62 SRV_TMPDIR=$SRV_TMPDIR/TMPDIR-nfsgen-$DATETAG
  63 export STF_TMPDIR
  64 
  65 # Test group
  66 export TGROUP=${TGROUP:-"nfsgengrp"}
  67 # Test user
  68 export TUSER01=${TUSER01:-"nfsgen01"}
  69 export TUSER02=${TUSER02:-"nfsgen02"}
  70 
  71 SETUP=${SETUP:-nfsv4}
  72 KRB5TOOLS_HOME=${KRB5TOOLS_HOME:-/opt/SUNWstc-krb5tools}
  73 
  74 # If the flag file is created, we don't need to cleanup krb5.
  75 KRB5_NO_CLEANUP_FILE=$STF_TMPDIR/nfsgen.krb5.no_cleanup
  76 
  77 # use the same password for all principals
  78 KPASSWORD=nfsgen
  79 
  80 STF_VARIABLES=" SERVER CLIENT ZONE_PATH SETUP SHRDIR SHRGRP SHROPT MNTDIR \
  81                 MNTOPT NFSMAPID_DOMAIN STF_TMPDIR TUSER01 TUSER02 TGROUP \
  82                 _NFS_STF_DEBUG NFSGEN_DEBUG CLIENT2 TestZFS SRV_TMPDIR \
  83                 KRB5TOOLS_HOME KRB5_NO_CLEANUP_FILE DNS_SERVER KPASSWORD \
  84                 DNS_DOMAIN SRV_DNS_DOMAIN CLT2_DNS_DOMAIN"
  85 
  86 STF_NOT_SAFE="  SERVER CLIENT ZONE_PATH SETUP SHRDIR SHRGRP SHROPT MNTDIR \
  87                 MNTOPT NFSMAPID_DOMAIN STF_TMPDIR TUSER01 TUSER02 TGROUP \
  88                 KRB5_NO_CLEANUP_FILE DNS_SERVER KPASSWORD DNS_DOMAIN \
  89                 SRV_DNS_DOMAIN CLT2_DNS_DOMAIN SRV_TMPDIR"