+isinteger() {
+ # should be exactly one arg
+ [ $# = 1 ] || return 1
+ # if arg is null, no expr needed
+ [ "${1}" = '' ] && return 1
+ # expr will return 0 on match
+ expr "$1" : '[0-9][0-9]*$' > /dev/null 2>&1
+}
+
+# Need rwx access to the virtual tape itself.
+if ! test -d $SLOTDIR; then
+ echo "Virtual-tape directory $SLOTDIR does not exist." 1>&2
+ exit 2
+fi
+if ! test -w $SLOTDIR; then
+ echo "Virtual-tape directory $SLOTDIR is not writable." 1>&2
+ exit 2
+fi
+
+
+# need rwx access to directory of changer file