From ec925a934fdba63dcbcccfb914fb89849261443d Mon Sep 17 00:00:00 2001 From: paulr Date: Mon, 12 Jul 2010 10:42:45 +1000 Subject: [PATCH] not entirely sure... --- bin/pbdc | 4 +++- bin/pbdc-bacula | 4 +++- bin/pbdc.php | 31 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/bin/pbdc b/bin/pbdc index 95ca1af..8724026 100644 --- a/bin/pbdc +++ b/bin/pbdc @@ -1,3 +1,5 @@ #!/bin/sh -php pbdc.php $* \ No newline at end of file +BASE_DIR="/home/paulr/src/eclipse-workspace/php-bacula-disk-changer/bin/" + +php $BASE_DIR/pbdc.php $* \ No newline at end of file diff --git a/bin/pbdc-bacula b/bin/pbdc-bacula index b3e6c20..51a14b4 100644 --- a/bin/pbdc-bacula +++ b/bin/pbdc-bacula @@ -1,3 +1,5 @@ #!/bin/sh -php pbdc-bacula.php $* \ No newline at end of file +BASE_DIR="/home/paulr/src/eclipse-workspace/php-bacula-disk-changer/bin/" + +php $BASE_DIR/pbdc-bacula.php $* \ No newline at end of file diff --git a/bin/pbdc.php b/bin/pbdc.php index 0e66657..4aad1e0 100644 --- a/bin/pbdc.php +++ b/bin/pbdc.php @@ -49,7 +49,38 @@ function bacula_config() $db = db_getDB($argv[1]); + $ntapes = conf_getVal($changer, "ndrives"); + $tapeloc = conf_getVal($changer, "drivelocation"); + // TODO: do this bit + // bacula-sd.conf + ?> +Autochanger { + Name = + + Changer Command = "/usr/local/bin/vchanger %c %o %S %a %d" + Changer Device = "" +} + + +Device { + Name = + DriveIndex = + Autochanger = yes; + DeviceType = File + MediaType = File + ArchiveDevice = + RemovableMedia = no; + RandomAccess = yes; +} +