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";
}
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";
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)
$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);