From: Paul Wise Date: Wed, 19 Jul 2017 02:11:34 +0000 (+1000) Subject: Use full path to bconsole X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=1abd64e991921cfbc61cf769141e519510d1b671;p=mirror%2Fdsa-puppet.git Use full path to bconsole The upgrade to stretch removed a compat symlink leading to tracebacks: Traceback (most recent call last): File "/etc/bacula/scripts/volumes-delete-old", line 118, in p = subprocess.Popen(['bconsole'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/usr/lib/python3.5/subprocess.py", line 676, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'bconsole' --- diff --git a/modules/bacula/files/volume-purge-action b/modules/bacula/files/volume-purge-action index 938d75c74..53888293b 100755 --- a/modules/bacula/files/volume-purge-action +++ b/modules/bacula/files/volume-purge-action @@ -70,7 +70,7 @@ for c in cmd: if args.verbose: print("Will run: %s"%(c,)) - p = subprocess.Popen(['bconsole'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen(['/usr/sbin/bconsole'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (out, err) = p.communicate(c.encode()) if p.returncode != 0: raise Exception("bconsole failed. stdout:\n%s\nstderr:%s\n"%(out, err))