The BACULA-FD file is
linked to missing export KERNEL32.DLL:GetFileAttributesExA.
+Documentation from Christopher Hull on new client job requests:
+===
+The command can be anything that cmd.exe or command.com will recognize
+as a executable file. Specifiying the executable's extention is
+optional, unless there is an ambiguity. (i.e. ls.bat, ls.exe)
+
+The System %Path% will be searched for the command. (under the
+envrionment variable dialog you have have both System Environment and
+User Environment, we believe that only the System environment will be
+available to bacual-fd, if it is running as a service.)
+
+System environment varaible can be called out using the %var% syntax and
+used as either part of the command name or arguments.
+
+When specifiying a full path to an executable if the path or executable
+name contains whitespace or special characters they will need to be
+quoted. Arguments containing whitespace or special characters will also
+have to be quoted.
+
+ ClientRunBeforeJob = "\"C:/Program Files/Software
+Vendor/Executable\" /arg1 /arg2 \"foo bar\""
+
+The special characters &()[]{}^=;!'+,`~ will need to be quoted if part
+of a filename or argument.
+
+If someone is logged in a blank "command" window running the commands
+will be present during the execution of the command.
+===
Documentation to do: (any release a little bit at a time)
- Document query file format.
<file-name>
...
- Add regression of btape "fill"
-
/* Walk through the list updating the media records */
for (vl=vol_list; vl; vl=vl->next) {
+ if (vl->Slot >= max_slots) {
+ bsendmsg(ua, _("Slot %d larger than max %d ignored.\n"));
+ continue;
+ }
/* Check if user wants us to look at this slot */
if (!slot_list[vl->Slot]) {
Dmsg1(100, "Skipping slot=%d\n", vl->Slot);
vl->VolName = get_volume_name_from_SD(ua, vl->Slot);
Dmsg2(100, "Got Vol=%s from SD for Slot=%d\n", vl->VolName, vl->Slot);
}
+ slot_list[vl->Slot] = 0; /* clear Slot */
if (!vl->VolName) {
- Dmsg1(100, "No VolName for Slot=%d skipping.\n", vl->Slot);
+ Dmsg1(100, "No VolName for Slot=%d setting InChanger to zero.\n", vl->Slot);
+ memset(&mr, 0, sizeof(mr));
+ mr.Slot = vl->Slot;
+ mr.InChanger = 1;
+ /* Set InChanger to zero for this Slot */
+ db_lock(ua->db);
+ db_make_inchanger_unique(ua->jcr, ua->db, &mr);
+ db_unlock(ua->db);
+ bsendmsg(ua, _("No VolName for Slot=%d set InChanger to zero.\n"), vl->Slot);
continue;
}
memset(&mr, 0, sizeof(mr));
}
db_unlock(ua->db);
}
-
-
+ memset(&mr, 0, sizeof(mr));
+ mr.InChanger = 1;
+ for (int i=1; i<max_slots; i++) {
+ if (slot_list[i]) {
+ mr.Slot = i;
+ /* Set InChanger to zero for this Slot */
+ db_lock(ua->db);
+ db_make_inchanger_unique(ua->jcr, ua->db, &mr);
+ db_unlock(ua->db);
+ bsendmsg(ua, _("No VolName for Slot=%d set InChanger to zero.\n"), i);
+ }
+ }
+
bail_out:
free_vol_list(vol_list);
slot_list = (char *)malloc(max_slots);
if (!get_user_slot_list(ua, slot_list, max_slots)) {
- free(slot_list);
- return;
+ goto bail_out;
}
vol_list = get_vol_list_from_SD(ua, false /*no scan*/);
bstrncpy(mr.MediaType, store->media_type, sizeof(mr.MediaType));
mr.Slot = vl->Slot;
- if (!send_label_request(ua, &mr, &omr, &pr, 0, media_record_exists)) {
- goto bail_out;
- }
+ send_label_request(ua, &mr, &omr, &pr, 0, media_record_exists);
}
bail_out:
+ free(slot_list);
free_vol_list(vol_list);
close_sd_bsock(ua);
}
}
} else {
- bsendmsg(ua, _("Label command failed.\n"));
+ bsendmsg(ua, _("Label command failed for Volume %s.\n"), mr->VolumeName);
}
return ok;
}
static void free_vol_list(vol_list_t *vol_list)
{
vol_list_t *vl;
+
/* Free list */
for (vl=vol_list; vl; ) {
vol_list_t *ovl;