--- /dev/null
+
+ This patch fixes the autoselect option that is broken for a while...
+
+ Apply it to version 2.2.8 or higher with:
+
+ cd <bacula-source>
+ patch -p0 <autoselect.patch
+ ./configure <your options>
+ make
+ ...
+ make install
+
+
+Index: src/stored/reserve.c
+===================================================================
+--- src/stored/reserve.c (revision 7051)
++++ src/stored/reserve.c (working copy)
+@@ -1093,6 +1093,11 @@
+ /* Try each device in this AutoChanger */
+ foreach_alist(rctx.device, changer->device) {
+ Dmsg1(dbglvl, "Try changer device %s\n", rctx.device->hdr.name);
++ if (!rctx.device->autoselect) {
++ Dmsg1(100, "Device %s not autoselect skipped.\n",
++ rctx.device->hdr.name);
++ continue; /* device is not available */
++ }
+ stat = reserve_device(rctx);
+ if (stat != 1) { /* try another device */
+ continue;