First version of this module, which allows Bacula to be configured and both backups and restores to be executed.
---- Changes since 1.360 ----
Removed the requirement for the /etc/bacula/bacula command to be installed, if /etc/init.d/bacula-* scripts exist.
+Added a field to the mount/un-mount page for entering an auto-loader slot number.
mount_title=Mount or Unmount
mount_header=Storage mount or un-mount options
mount_storage=Storge device
+mount_slot=Auto-loader slot
+mount_noslot=None
+mount_slotno=Slot number
mount_mount=Mount Storage
mount_unmount=Un-Mount Storage
mount_run=Mounting volume on storage device $1 ..
mount_failed=.. mount failed! See the error message above for the reason why.
unmount_failed=.. un-mount failed! See the error message above for the reason why.
mount_return=mount form
+mount_err=Failed to mount storage device
+mount_eslot=Missing or invalid slot number
cancel_err=Failed to cancel jobs
cancel_enone=None selected
# Actually execute a backup
require './bacula-backup-lib.pl';
-&ui_print_unbuffered_header(undef, $text{'mount_title'}, "");
&ReadParse();
+&error_setup($text{'mount_err'});
+
+# Validate inputs
+$in{'slot_def'} || $in{'slot'} =~ /^[1-9][0-9]*$/ ||
+ &error($text{'mount_eslot'});
+
+&ui_print_unbuffered_header(undef, $text{'mount_title'}, "");
$mode = $in{'mount'} ? "mount" : "unmount";
print "<b>",&text($mode.'_run', "<tt>$in{'storage'}</tt>"),"</b>\n";
&console_cmd($h, "messages");
# Run the command
-$out = &console_cmd($h, "$mode storage=$in{'storage'}");
+$out = &console_cmd($h, "$mode storage=$in{'storage'}".
+ ($in{'slot_def'} ? "" : " slot=$in{'slot'}"));
print $out;
print "</pre>";
&text('clientstatus_on', $_->{'name'}, $_->{'address'}) ] }
@storages ]));
+# Autoloader slot
+print &ui_table_row($text{'mount_slot'},
+ &ui_opt_textbox("slot", undef, 5, $text{'mount_noslot'},
+ $text{'mount_slotno'}));
+
print &ui_table_end();
print &ui_form_end([ [ 'mount', $text{'mount_mount'} ],
[ 'unmount', $text{'mount_unmount'} ] ]);