X-Git-Url: http://git.pjr.cc/?p=php-bacula-disk-changer.git;a=blobdiff_plain;f=bin%2Fpbdc.php;fp=bin%2Fpbdc.php;h=abc23ea0856526a693c5188595423a2b1303a5dc;hp=0ea159ae7d1e08ed3f96447d7b336f0dcfc072ce;hb=2787b840ab778e8c638a3d671a9f3995de6ecf3a;hpb=ea59819adbba9ec633cbb39f8c2388b5e392be6a diff --git a/bin/pbdc.php b/bin/pbdc.php index 0ea159a..abc23ea 100644 --- a/bin/pbdc.php +++ b/bin/pbdc.php @@ -157,7 +157,7 @@ function pbdc_status() foreach($res2 as $row2) $slot = $row2["slot_no"]; } else $slot = "none"; - echo "Tape: $file (slot $sln)\n"; + echo "Tape: $file (slot $slot)\n"; } else { //echo "didnt match: $file\n"; } @@ -206,7 +206,7 @@ function init() global $BASE_DATA, $BASE_LIB, $BACULA_USER, $argv; // check if we are the bacula user - $user = posix_getlogin(); + //$user = posix_getlogin(); $user = $_SERVER["USER"]; if($user != $BACULA_USER) { echo "This command must be run as the bacula user ($BACULA_USER not $user)\n"; @@ -247,7 +247,7 @@ function init() conf_setVal($changer_name, "drivelocation", "$rd"); // check if they were set - echo "got: ".conf_getVal($changer_name, "automountdir").", and ".conf_getVal($changer_name, "tapesize").", and ".conf_getVal($changer_name, "ndrives")."\n"; + // echo "got: ".conf_getVal($changer_name, "automountdir").", and ".conf_getVal($changer_name, "tapesize").", and ".conf_getVal($changer_name, "ndrives")."\n"; } function check_init_and_fail($changer) @@ -290,7 +290,7 @@ function disk_get_size($file, $realname="") $pl = popen($cmd, "r"); if($pl) { $f = fread($pl, 1024); - echo "cmd: $cmd\nf: $f\n"; + //echo "cmd: $cmd\nf: $f\n"; $ts = (int)($f); if($ts > 1) $parsed = true; pclose($pl);