#!/bin/sh

# $Id$

set -u  # force better programming and ability to use check for not set
if [ "${1:-}" = "-x" ] ; then set -xv; shift; fi

if [ "${1:-}" = "-V" ] ; then verbose="-V"; shift; else verbose=""; fi

if [ "${1:-}" = "-F" ] ; then force_try="-F"; shift; else force_try=""; fi

COUNT=${1:-1}
# valid values are "onlylast" or "alsolast" or "onlyfirst" or "alsofirst" 
#  or "onlyfirstlast" or "alsofirstlast" or "onlyran"
WHICH_FILE=${2:-"onlyran"}

$ENSTORE_DIR/sbin/choose_ran_file $verbose -C $force_try $COUNT $WHICH_FILE
