1 #! /usr/bin/ksh -p
   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 #
   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 
  23 #
  24 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  25 # Use is subject to license terms.
  26 #
  27 # ident "@(#)tc_sharectl.ksh    1.5     09/08/01 SMI"
  28 #
  29 
  30 #
  31 # Sharectl test case
  32 #
  33 
  34 tet_startup="startup"
  35 tet_cleanup="cleanup"
  36 
  37 iclist="ic1 ic2 ic3 ic4 ic5 ic6 ic7 ic8 ic9 ic10 ic11 ic12 ic13 ic14"
  38 iclist="$iclist ic15 ic16 ic17 ic18 ic19 ic20 ic21 ic22 ic23 ic24 ic25"
  39 iclist="$iclist ic26 ic27 ic28 ic29 ic30 ic31 ic32 ic33 ic34 ic35 ic36"
  40 iclist="$iclist ic37 ic38"
  41 ic1="sharectl001"
  42 ic2="sharectl002"
  43 ic3="sharectl003"
  44 ic4="sharectl004"
  45 ic5="sharectl005"
  46 ic6="sharectl006"
  47 ic7="sharectl006"
  48 ic8="sharectl008"
  49 ic9="sharectl009"
  50 ic10="sharectl010"
  51 ic11="sharectl011"
  52 ic12="sharectl012"
  53 ic13="sharectl013"
  54 ic14="sharectl014"
  55 ic15="sharectl015"
  56 ic16="sharectl016"
  57 ic17="sharectl017"
  58 ic18="sharectl018"
  59 ic19="sharectl019"
  60 ic20="sharectl020"
  61 ic21="sharectl021"
  62 ic22="sharectl022"
  63 ic23="sharectl023"
  64 ic24="sharectl024"
  65 ic25="sharectl025"
  66 ic26="sharectl026"
  67 ic27="sharectl027"
  68 ic28="sharectl028"
  69 ic29="sharectl029"
  70 ic30="sharectl030"
  71 ic31="sharectl031"
  72 ic32="sharectl032"
  73 ic33="sharectl033"
  74 ic34="sharectl034"
  75 ic35="sharectl035"
  76 ic36="sharectl036"
  77 ic37="sharectl037"
  78 ic38="sharectl038"
  79 
  80 #
  81 # Here we need to source the configure file and do the initial
  82 # setup for the tests.
  83 #       Initial Setup steps :
  84 #               - check environment to see if we even need to run (checkenv)
  85 #               - check for legacy share commands and setup
  86 #               - Create file system 
  87 #               
  88 function startup {
  89         tet_infoline "Checking environment and runability"
  90         share_startup
  91         $CP /etc/default/nfs /etc/default/nfs.sharectl_test.orig
  92         $SHARECTL get nfs > $sharectl_orig
  93 }
  94 
  95 function cleanup {
  96         share_cleanup
  97         mv /etc/default/nfs.sharectl_test.orig /etc/default/nfs
  98         svcadm disable svc:/network/nfs/server
  99         svcadm enable svc:/network/nfs/server
 100 
 101         #
 102         # Need to potentially clear the maintenance mode for the
 103         # nfs/nlockmgr service due to issues with restarting
 104         # the services too quickly.
 105         #
 106         svcs nfs/nlockmgr | grep maintenance > /dev/null 2>&1
 107         if [ $? -eq 0 ]
 108         then
 109                 svcadm clear svc:/network/nfs/nlockmgr > /dev/null 2>&1
 110                 tet_infoline "WARNING!: the nfs/nlockmgr was in " \
 111                         "maintenance mode."
 112         fi
 113 }
 114 
 115 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_001
 116 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_002
 117 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_003
 118 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_004
 119 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_005
 120 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_006
 121 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_007
 122 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_008
 123 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_009
 124 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_010
 125 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_011
 126 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_012
 127 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_013
 128 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_014
 129 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_015
 130 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_016
 131 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_017
 132 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_018
 133 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_019
 134 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_020
 135 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_021
 136 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_022
 137 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_023
 138 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_024
 139 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_025
 140 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_026
 141 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_027
 142 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_028
 143 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_029
 144 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_030
 145 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_031
 146 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_032
 147 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_033
 148 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_034
 149 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_035
 150 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_036
 151 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_037
 152 . ${TET_SUITE_ROOT}/sharefs-tests/tests/sharectl/tp_sharectl_038
 153 
 154 . ${TET_SUITE_ROOT}/sharefs-tests/lib/share_common
 155 
 156 . ${TET_ROOT}/lib/ksh/tetapi.ksh
 157 . ${TET_ROOT}/lib/ksh/tcm.ksh