pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/bacula update bacula to 9.6.7nb5:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8d00920822b0
branches:  trunk
changeset: 459495:8d00920822b0
user:      jnemeth <jnemeth%pkgsrc.org@localhost>
date:      Fri Oct 08 07:28:36 2021 +0000

description:
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:

 sysutils/bacula/Makefile           |  4 ++--
 sysutils/bacula/files/chio-changer |  8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r 8595c94aba70 -r 8d00920822b0 sysutils/bacula/Makefile
--- a/sysutils/bacula/Makefile  Fri Oct 08 06:52:02 2021 +0000
+++ b/sysutils/bacula/Makefile  Fri Oct 08 07:28:36 2021 +0000
@@ -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 -r 8595c94aba70 -r 8d00920822b0 sysutils/bacula/files/chio-changer
--- a/sysutils/bacula/files/chio-changer        Fri Oct 08 06:52:02 2021 +0000
+++ b/sysutils/bacula/files/chio-changer        Fri Oct 08 07:28:36 2021 +0000
@@ -60,6 +60,8 @@
 device=$4
 drive=$5
 
+slot=$((${slot} - 1))
+
 case $cmd in 
    unload)
       ${CHIO} -f $ctl move drive $drive slot $slot
@@ -70,9 +72,9 @@
       ;;
 
    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)



Home | Main Index | Thread Index | Old Index