summaryrefslogtreecommitdiff
path: root/sysutils/bacula
diff options
context:
space:
mode:
authorjnemeth <jnemeth@pkgsrc.org>2021-10-08 07:28:36 +0000
committerjnemeth <jnemeth@pkgsrc.org>2021-10-08 07:28:36 +0000
commit4c8debb021b549ba513f0d7dfe2a6fc2cdae0c18 (patch)
tree53670423f38fa57137cd16b32970744e4db6e8e7 /sysutils/bacula
parent4221dd5101d23e9d6425bbcffcc400eab64a61a5 (diff)
downloadpkgsrc-4c8debb021b549ba513f0d7dfe2a6fc2cdae0c18.tar.gz
update bacula to 9.6.7nb5:
adjust chio-changer script: - subtract 1 from slot provided by bacula as bacula starts counting from 1 and chio(4) starts counting from 0 - adjust list output to what bacula expects when barcodes aren't present
Diffstat (limited to 'sysutils/bacula')
-rw-r--r--sysutils/bacula/Makefile4
-rwxr-xr-xsysutils/bacula/files/chio-changer8
2 files changed, 7 insertions, 5 deletions
diff --git a/sysutils/bacula/Makefile b/sysutils/bacula/Makefile
index 93c86a61bb3..9fc1497d8aa 100644
--- a/sysutils/bacula/Makefile
+++ b/sysutils/bacula/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.92 2021/06/23 20:33:16 nia Exp $
+# $NetBSD: Makefile,v 1.93 2021/10/08 07:28:36 jnemeth Exp $
CONFLICTS+= bacula-client-[0-9]* bacula-clientonly-[0-9]* bareos-[0-9]* bareos-clientonly-[0-9]*
-PKGREVISION= 4
+PKGREVISION= 5
.include "options.mk"
diff --git a/sysutils/bacula/files/chio-changer b/sysutils/bacula/files/chio-changer
index be4b75097b3..2461c679a73 100755
--- a/sysutils/bacula/files/chio-changer
+++ b/sysutils/bacula/files/chio-changer
@@ -60,6 +60,8 @@ slot=$3
device=$4
drive=$5
+slot=$((${slot} - 1))
+
case $cmd in
unload)
${CHIO} -f $ctl move drive $drive slot $slot
@@ -70,9 +72,9 @@ case $cmd in
;;
list)
- ${CHIO} -f $ctl status slot voltags | /usr/bin/awk "/</ { slot=\$2 }\
- /Primary volume tag:/ { tag=\$4 }\
- /From:/ { print slot tag }"
+ ${CHIO} -f $ctl status slot voltags | /usr/bin/awk "/</ { slot=\$2; gsub(\":$\", \"\", slot); slot++ }\
+ /Primary volume tag: [^ ] / { tag=\$4 }\
+ /From:/ { printf \"%s:%s\n\", slot, tag }"
;;
listall)