Use full path to bconsole
authorPaul Wise <pabs@debian.org>
Wed, 19 Jul 2017 02:11:34 +0000 (12:11 +1000)
committerPaul Wise <pabs@debian.org>
Wed, 19 Jul 2017 02:13:03 +0000 (12:13 +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'

modules/bacula/files/volume-purge-action

index 938d75c..5388829 100755 (executable)
@@ -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))