Last active
February 7, 2016 16:58
Revisions
-
dlangille revised this gist
Feb 7, 2016 . 1 changed file with 3 additions and 34 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,6 @@ --- /usr/local/share/bacula/mtx-changer 2016-02-07 16:56:07.144277762 +0000 +++ /usr/local/sbin/mtx-changer 2016-02-07 16:57:42.601276013 +0000 @@ -65,23 +65,25 @@ # myversion must be the same as version in mtx-changer.conf myversion=2 @@ -41,24 +31,3 @@ if test ${debug_log} -ne 0 ; then touch /var/db/bacula/mtx.log -
dlangille created this gist
Feb 7, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,64 @@ --- /usr/local/share/bacula/mtx-changer 2016-01-29 05:10:55.000000000 +0000 +++ /usr/local/sbin/mtx-changer 2016-02-06 22:13:13.808924943 +0000 @@ -2,7 +2,8 @@ # # Bacula(R) - The Network Backup Solution # -# Copyright (C) 2000-2016 Kern Sibbald +# Copyright (C) 2000-2015 Kern Sibbald +# Copyright (C) 2000-2014 Free Software Foundation Europe e.V. # # The original author of Bacula is Kern Sibbald, with contributions # from many others, a complete list can be found in the file AUTHORS. @@ -64,23 +65,25 @@ # myversion must be the same as version in mtx-changer.conf myversion=2 +CONFIG=/usr/local/etc/bacula/mtx-changer.conf + # source our conf file -if test ! -f /usr/local/share/bacula/mtx-changer.conf ; then +if test ! -f ${CONFIG}; then echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - echo "ERROR: /usr/local/share/bacula/mtx-changer.conf file not found!!!!" + echo "ERROR: ${CONFIG} file not found!!!!" echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" exit 1 fi -. /usr/local/share/bacula/mtx-changer.conf +. ${CONFIG} if test "${version}" != "${myversion}" ; then echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - echo "ERROR: /usr/local/share/bacula/mtx-changer.conf has wrong version. Wanted ${myversion}, got ${version} !!!" + echo "ERROR: ${CONFIG} has wrong version. Wanted ${myversion}, got ${version} !!!" echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" exit 1 fi -MTX=mtx +MTX=/usr/local/sbin/mtx if test ${debug_log} -ne 0 ; then touch /var/db/bacula/mtx.log @@ -215,10 +218,12 @@ if test $rtn -eq 0 ; then break fi + cat ${ERRFILE} grep "Error Code=" ${ERRFILE} 2>/dev/null 1>/dev/null if test $? -ne 0 ; then break fi + logger mtx-changer sleeps for $i seconds sleep $i done cat ${ERRFILE} @@ -238,6 +243,7 @@ if test $rtn -eq 0 ; then break fi + cat ${ERRFILE} grep "Error Code=" ${ERRFILE} 2>/dev/null 1>/dev/null if test $? -ne 0 ; then break