Imported Upstream version 2.5.2p1
[debian/amanda] / changer-src / chg-mtx.sh.in
index ba9f724b5fb1d478b65bd1a56ea70ed30e077742..3c8086d41b1ff69465f1dd43aab4452535be667d 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh 
+#!@SHELL@ 
 #
 # Exit Status:
 # 0 Alles Ok
@@ -31,9 +31,19 @@ fi
 myname=$0
 
 tape=`amgetconf$SUF tapedev`
+if [ -z "$tape" ]; then
+  echo "<none> tapedev not specified in amanda.conf";
+  exit 2;
+fi
+
 TAPE=`amgetconf$SUF changerdev`; export TAPE # for mtx command
+if [ -z "$TAPE" ]; then
+  echo "<none> changerdev not specified in amanda.conf";
+  exit 2;
+fi
+
 if [ "$tape" = "/dev/null" -o "$TAPE" = "/dev/null" ]; then
-  echo "Both tapedev and changerdev must be specified in config file";
+  echo "<none> Both tapedev and changerdev must be specified in config file";
   exit 2;
 fi