]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/scripts/disk-changer.in
Fix ActionOnPurge with a relabel command
[bacula/bacula] / bacula / scripts / disk-changer.in
index 3eab743a3ee2e24e53b9d4a873d982927d7d871f..ccb958ba06dd58aea4585088ba7858a0edc301ed 100644 (file)
@@ -285,7 +285,7 @@ case $cmd in
         if [ -f $dir/loaded${i} ]; then
              ld=`cat $dir/loaded${i}`
              v=`awk -F: "/^$ld:/"' { print $2 }' $dir/barcodes`
-             echo "D:$i:F:$ld:$$v"
+             echo "D:$i:F:$ld:$v"
              echo "^$ld:" >> $TMPFILE
         fi
         i=`expr $i + 1`
@@ -294,7 +294,7 @@ case $cmd in
       # Empty slots are not in barcodes file
       # When we detect a gap, we print missing rows as empty
       # At the end, we fill the gap between the last entry and maxslot
-      grep -v -f $TMPFILE $dir/barcodes | \
+      grep -v -f $TMPFILE $dir/barcodes | sort -n | \
       perl -ne 'BEGIN { $cur=1 } 
        if (/(\d+):(.+)?/) {
          if ($cur == $1) {