]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/prepare-fake-autochanger.in
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / scripts / prepare-fake-autochanger.in
index 9bf81443baf56516991765d4728b2db57f497124..75e18095ee64fd26f0ff64923abdd338a68040c9 100644 (file)
@@ -1,9 +1,7 @@
 #!/bin/sh
 #
-# Copyright (C) 2000-2015 Kern Sibbald
+# Copyright (C) 2000-2017 Kern Sibbald
 # License: BSD 2-Clause; see file LICENSE-FOSS
-#
-
 #
 # This script will prepare a big dummy autochanger 
 #
@@ -37,6 +35,15 @@ EOF
 # turn on ach debug
 touch $adir/log
 
+# the standard script is looking for a real sg device
+sed -i 's/test -c /test -f/g' $bin/storage-ctl 2> /dev/null
+sed -i 's/test -c /test -f/g' $bin/storage2-ctl 2> /dev/null
+
+# create generic device for bsg_persist
+for i in `seq 0 8`; do
+    touch $adir/sg$i c
+done
+
 nb_vol=`expr $nb_slot - 5`
 # create $nb_vol volumes
 for i in `seq 1 $nb_vol`; do