Use full path to bconsole more
authorPaul Wise <pabs@debian.org>
Thu, 20 Jul 2017 00:07:47 +0000 (10:07 +1000)
committerPaul Wise <pabs@debian.org>
Thu, 20 Jul 2017 00:07:47 +0000 (10:07 +1000)
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 <module>
    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'

Fixes: commit 1abd64e991921cfbc61cf769141e519510d1b671

modules/bacula/files/volumes-delete-old

index 84a7d75..e533e71 100755 (executable)
@@ -115,7 +115,7 @@ if args.verbose:
     for c in cmd:
       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("\n".join(cmd).encode())
 if p.returncode != 0:
     raise Exception("bconsole failed.  stdout:\n%s\nstderr:%s\n"%(out, err))