+2010-12-14 Jean-Louis Martineau <martineau@zmanda.com>
+ * VERSION: 3.2.1
+
+2010-12-14 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/ssh-security.c: Use client_port.
+
+2010-12-14 Daniel Néri <dne@mayonnaise.net>
+ * application-src/ampgsql.pl: Don't assume that gtar is configured to
+ use stdin/stdout as default archive.
+
+2010-12-14 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amidxtaped.pl: Don't crash if same-host doesn't match.
+
+2010-12-12 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Changer/disk.pm: inventory must return the same as
+ read_label.
+ * server-src/amtape.pl: Fix for new inventory.
+ * installcheck/Amanda_Changer_disk.pl: Fix for new inventory.
+ * installcheck/Amanda_Changer_rait.pl: Fix for new inventory.
+
+2010-12-11 Daniel Néri <dne@mayonnaise.net>
+ * application-src/ampgsql.pl: Don't assume that gtar is configured to
+ use stdin/stdout as default archive.
+
+2010-12-12 Daniel Néri <dne@mayonnaise.net>
+ * application-src/ampgsql.pl: Use diskname, not devicename, as prefix
+ when checking for properties. Now works as documented in the ampgsql
+ man page.
+
+2010-12-10 David Bogen <bogen@wisc.edu>
+ * server-src/amoverview.pl: fix amoverview's argument parsing
+
+2010-12-10 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amcheck-device.pl: Fix possible hang if
+ Amanda::MainLoop::quit is called before Amanda::MainLoop::run.
+ * perl/Amanda/Changer.pm: Return the error.
+
+2010-12-09 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/driver.c: Check if taper is flushing something before
+ moving a dle to directq.
+
+2010-12-09 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/xfer-dest-taper-cacher.c: Print why the malloc failed.
+
+2010-12-08 Dustin J. Mitchell <dustin@zmanda.com>
+ * common-src/glib-util.c common-src/glib-util.h: do not define
+ symbol g_slist_free_full, as it exists in glib-2.27 and higher;
+ use slist_free_full, and alias that to g_slist_free_full when
+ building against glib-2.28 or higher.
+ * client-src/client_util.c: make g_slist_free_full_gpointer into
+ a local, static function
+ * common-src/amxml.c common-src/conffile.c recover-src/extract_list.c
+ server-src/amadmin.c server-src/amflush.c server-src/cmdline.c
+ server-src/cmdline.h server-src/find.c server-src/holding.c
+ server-src/planner.c: rename function
+
+2010-12-08 Jean-Louis Martineau <martineau@zmanda.com>
+ * ReleaseNotes, NEWS: Add changes for 3.2.1
+
+2010-12-07 Dan Locks <dwlocks@zmanda.com>
+ * packaging/rpm/amanda.spec.src: remove manual library requires and
+ set curl vs libcurl based on distro.
+
+2010-12-07 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/util.c: s/HAVE_READLINE/HAVE_LIBREADLINE/
+ * config/amanda/readline.m4: s/HAVE_READLINE/HAVE_LIBREADLINE/
+
+2010-12-07 Jean-Louis Martineau <martineau@zmanda.com>
+ * config/amanda/readline.m4: Merge with latest AX_LIB_READLINE.
+ * common-src/util.h: Fix for latest AX_LIB_READLINE.
+
+2010-12-06 Dan Locks <dwlocks@zmanda.com>
+ * packaging/rpm/amanda.spec.src: remove libtermcap.so.2 requirement
+ for newer distros.
+
+2010-12-06 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/server_util.c (internal_server_estimate): Do not use
+ level 0 estimate if is not available.
+
+2010-12-04 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/dumper.c: Put them in AMANDA_DBGDIR/log.error
+
+2010-12-03 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/dumper.c: Put error message in separate files to
+ reduce the size of the log file.
+
+2010-11-29 Jean-Louis Martineau <martineau@zmanda.com>
+ * man/xml-source/amlabel.8.xml: Typo.
+
+2010-11-26 Jean-Louis Martineau <martineau@zmanda.com>
+ * installcheck/amreport.pl: Fix for previous patch.
+
+2010-11-26 Jean-Louis Martineau <martineau@zmanda.com>
+ * man/xml-source/amadmin.8.xml, man/xml-source/amcheck.8.xml,
+ man/xml-source/amcheckdump.8.xml, man/xml-source/amdevcheck.8.xml,
+ man/xml-source/amdump.8.xml, man/xml-source/amfetchdump.8.xml,
+ man/xml-source/amflush.8.xml, man/xml-source/amgetconf.8.xml,
+ man/xml-source/amlabel.8.xml, man/xml-source/amoverview.8.xml,
+ man/xml-source/amrecover.8.xml, man/xml-source/amreport.8.xml,
+ man/xml-source/amservice.8.xml, man/xml-source/amstatus.8.xml,
+ man/xml-source/amtape.8.xml: Fix synopsis.
+ * device-src/amdevcheck.pl, server-src/amadmin.c,
+ server-src/amcheckdump.pl, server-src/amlabel.pl,
+ server-src/amoverview.pl, server-src/amreport.pl,
+ server-src/amstatus.pl, server-src/amtape.pl: Fix usage.
+
+2010-11-26 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/conffile.c: Print configuration option with '-'.
+ * installcheck/Amanda_Config.pl: Fix for '-'.
+
+2010-11-25 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/make_html.pl: make relative url in index.html.
+
+2010-11-25 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/make_html.pl: Add amanda version in html headers and footers.
+
+2010-11-25 Jean-Louis Martineau <martineau@zmanda.com>
+ * man/xslt/html.xsl.in: Include Amanda version in HTML headers.
+
+2010-11-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/Makefile.am: activate-devpay needs gnulib.
+
+2010-11-17 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/driver.c: Correctly handle INPUT-ERROR and TAPE-ERROR.
+
+2010-11-17 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/xfer-dest-taper-cacher.c,
+ device-src/xfer-dest-taper-splitter.c: Cancel in correct order.
+ Other thread own self->state_mutex while it wait for self->ring* or
+ self->slab*
+
+2010-11-17 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/xfer-dest-taper-cacher.c,
+ device-src/xfer-dest-taper-splitter.c: Always call device_finish_file
+ if device_start_file succeed.
+
+2010-11-16 Dan Locks <dwlocks@zmanda.com>
+ * packaging/rpm/amanda.spec.src: add rhel6 stanza to distro detection
+
+2010-11-16 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/find.c: Keep the complete error message.
+
+2010-11-12 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/driverio.c: Don't update last_level/consecutive_runs if
+ the dump failed.
+
+2010-11-10 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/tape-device.c: Accept LEOM property.
+
+2010-11-10 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Changer/robot.pm: Fix use of Amanda::Changer->make_error
+
+2010-11-08 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/driver.c: Better handling of dump to tape.
+ Set force_flush to 0 as soon as the runq is empty.
+ * server-src/dumper.c: Improving debugging.
+
+2010-11-08 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Report.pm: Report driver FAIL as FAILED (not missing).
+ * perl/Amanda/Report/human.pm: Do not report driver error if there
+ is a try.
+
+2010-11-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * man/xml-source/tapelist.5.xml: Document BARCODE.
+
+2010-11-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amdump.pl: Execute subprocess with the config overwrite.
+ * server-src/amvault.pl: Execute subprocess with the config overwrite.
+
+2010-11-04 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amreport.pl: Set date correctly for amvault run.
+ * perl/Amanda/Report/human.pm: Fix warning.
+
+2010-11-04 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/tapefile.c: Add barcode in tapelist.
+ * server-src/tapefile.h: Add barcode in tapelist.
+ * perl/Amanda/Tapelist.swg: Add barcode in tapelist.
+ * perl/Amanda/Taper/Scribe.pm: Set the barcode.
+ * server-src/amlabel.pl: Set the barcode.
+ * installcheck/Amanda_Tapelist.pl: Test it.
+ * installcheck/amlabel.pl: Test it.
+
+2010-11-02 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/util.c (quote_string_maybe): Don't use match.
+ * common-src/util.c (len_quote_string_maybe): New function.
+ * common-src/util.h (len_quote_string): Define.
+ * server-src/amadmin.c: Don't call find_dump twice.
+ * server-src/find.c (search_logfile): Don't use regex.
+ * server-src/find.c (print_find_result): Use len_quote_string.
+
+2010-11-02 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/conffile.c: debug-recovery default to 1.
+ * man/xml-source/amanda.conf.5.xml: Document it.
+
+2010-10-29 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/chunker.c: Close listening socket are accepted socket.
+ * xfer-src/element-glue.c: Close listening socket are accepted socket.
+
+2010-10-29 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amflush.c: Open 'amflush' log file in append mode.
+
+2010-10-29 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amdump.pl: Open 'amdump' log file in append mode.
+
+2010-10-28 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/conffile.c: Fix quoting in recovery-limit output.
+ * server-src/amadmin.c (disklist_one): Print recovery-limit.
+
+2010-10-28 Jean-Louis Martineau <martineau@zmanda.com>
+ * client-src/client_util.c: Don't free script->result.
+
+2010-10-27 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/dumper.c: Typo.
+
+2010-10-26 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/fileheader.c (parse_file_header): Print buf.
+ * patching file recover-src/extract_list.c: Read header in multiple
+ block.
+
+2010-10-26 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Report/human.pm: Use chunker size to find big estimate.
+ * installcheck/catalogs/bigestimate.cat: Fix.
+
+2010-10-25 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Worker.pm: Use 4*block_size for
+ device_output_buffer_size if it is not set by the user.
+ * server-src/amcheck-device.pl: Check device_output_buffer_size is at
+ least 2*block_size.
+
+2010-10-25 Dan Locks <dwlocks@zmanda.com>
+ * config/amanda/libs.m4: update AMANDA_CHECK_CURL to add runtime link
+ flags for all solaris platforms, remove our AC_PATH_PROG for curl-config,
+ and trust LIBCURL_CHECK_CONFIG (which is now fixed)
+
+2010-10-25 Dan Locks <dwlocks@zmanda.com>
+ * packaging/rpm/amanda.spec.src: exclude sles9 from
+ LDFLAGS=-Wl,--as-needed
+
+2010-10-21 Dan Locks <dwlocks@zmanda.com>
+
+2010-10-20 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amtape.pl: Typo.
+
+2010-10-19 Dan Locks <dwlocks@zmanda.com>
+ * packaging/deb/rules, packaging/rpm/amanda.spec.src: add
+ -Wl,--as-needed to ./configure invocation in packages
+
+2010-10-19 Jean-Louis Martineau <martineau@zmanda.com>
+ * ReleaseNotes NEWS: amdump --no-taper option.
+
2010-10-18 Jean-Louis Martineau <martineau@zmanda.com>
* VERSION: 3.2.0
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
-Changes in release 3.2.0alpha
+Changes in release 3.2.1
+
+ * barcode are added to the tapelist file.
+ * Faster 'amadmin find', improve speed on many programs.
+ * device-output-buffer-size default to a minimum of 4*block_size.
+ * ssh auth use the client-port
+ * Bug fixed:
+ o "Can't opendata output stream: Connection refused".
+ o Better handling of dump to tape.
+ o Corrupted 'amdump' log file, amstatus not showing correct state.
+ o Execute subprocess with the config overwrite.
+ o tape-device allow to set LEOM.
+ o Crash in robot changer.
+ o Script output property are not sent to application.
+
+Changes in release 3.2.0
* Support for multiple simultaneous writes to storage devices
o Can write to all available drives in parallel.
o chg-rth
o chg-scsi-chio
o chg-scsi
+ * Amdump change:
+ o new '--no-taper' option to start the run in degraded mode
* Amvault is much improved, but still experimental:
o supports assembling split parts on the source volume and re-splitting
them on the destination
+ Release Notes for amanda-3.2.1
+
+* barcode are added to the tapelist file.
+* Faster 'amadmin find', improve speed on many programs.
+* device-output-buffer-size default to a minimum of 4*block_size.
+* ssh auth use the client-port
+* Bug fixed
+ o "Can't opendata output stream: Connection refused" bug.
+ o Better handling of dump to tape.
+ o Corrupted 'amdump' log file, amstatus not showing correct state.
+ o Execute subprocess with the config overwrite.
+ o tape-device allow to set LEOM.
+ o Crash in robot changer.
+ o Script output property are not sent to application.
+
+
Release Notes for amanda-3.2.0
* Support for multiple simultaneous writes to storage devices
o chg-rth
o chg-scsi-chio
o chg-scsi
+* Amdump change:
+ o new '--no-taper' option to start the run in degraded mode
* Amvault is much improved, but still experimental:
o supports assembling split parts on the source volume and re-splitting
them on the destination
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
$self->{'props'}->{$pname} = $conf_props->{$pname}->{'values'}->[0];
}
}
- # check for properties like 'foo-pg-host' where the device is 'foo'
- if ($self->{'args'}->{'device'}) {
+ # check for properties like 'foo-pg-host' where the diskname is 'foo'
+ if ($self->{'args'}->{'disk'}) {
foreach my $pname (@PROP_NAMES) {
- my $tmp = "$self->{'args'}->{'device'}-$pname";
+ my $tmp = "$self->{'args'}->{'disk'}-$pname";
if ($conf_props->{$tmp}) {
debug("More than one value for $tmp. Using the first.")
if scalar(@{$conf_props->{$tmp}->{'values'}}) > 1;
# this works!)
local *TAROUT;
my $conf = $self->{'args'}->{'config'} || 'NOCONFIG';
- my $cmd = "$self->{'runtar'} $conf $Amanda::Constants::GNUTAR --create --directory $self->{'props'}->{'pg-archivedir'} $fname | $Amanda::Constants::GNUTAR --extract --to-stdout";
+ my $cmd = "$self->{'runtar'} $conf $Amanda::Constants::GNUTAR --create --file - --directory $self->{'props'}->{'pg-archivedir'} $fname | $Amanda::Constants::GNUTAR --file - --extract --to-stdout";
debug("running: $cmd");
open(TAROUT, "$cmd |");
my ($start, $end, $lab);
'--directory', $self->{'props'}->{'pg-archivedir'}, @wal_files);
} else {
my $dummydir = $self->_make_dummy_dir();
- $self->{'done_cb'}->(_run_tar_totals($self,
+ $self->{'done_cb'}->(_run_tar_totals($self, '--file', '-',
'--directory', $dummydir, "empty-incremental"));
rmtree($dummydir);
}
# create the final tar file
- my $size = _run_tar_totals($self, '--directory', $tmp,
+ my $size = _run_tar_totals($self, '--directory', $tmp, '--file', '-',
$_ARCHIVE_DIR_TAR, $_DATA_DIR_TAR);
$self->{'state_cb'}->($self, $end_wal);
$self->{'state_cb'}->($self, $max_wal ? $max_wal : $end_wal);
if (@wal_files) {
- $self->{'done_cb'}->(_run_tar_totals($self,
+ $self->{'done_cb'}->(_run_tar_totals($self, '--file', '-',
'--directory', $self->{'props'}->{'pg-archivedir'}, @wal_files));
} else {
my $dummydir = $self->_make_dummy_dir();
- $self->{'done_cb'}->(_run_tar_totals($self,
+ $self->{'done_cb'}->(_run_tar_totals($self, '--file', '-',
'--directory', $dummydir, "empty-incremental"));
rmtree($dummydir);
}
if ($self->{'args'}->{'level'} > 0) {
debug("extracting incremental backup to $cur_dir/$_ARCHIVE_DIR_RESTORE");
$status = system($self->{'args'}->{'gnutar-path'}, '--extract',
+ '--file', '-',
'--ignore-zeros',
'--exclude', 'empty-incremental',
'--directory', $_ARCHIVE_DIR_RESTORE) >> 8;
if (!-d $_DATA_DIR_RESTORE) {
mkdir($_DATA_DIR_RESTORE) or die("could not create archive WAL directory: $!");
}
- $status = system($self->{'args'}->{'gnutar-path'}, '--extract') >> 8;
+ $status = system($self->{'args'}->{'gnutar-path'}, '--extract', '--file', '-',) >> 8;
(0 == $status) or die("Failed to extract base backup (exit status: $status)");
debug("extracting archive dir to $cur_dir/$_ARCHIVE_DIR_RESTORE");
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
return newname;
}
+/* GDestroyFunc for a hash table whose values are GSLists contianing malloc'd
+ * strings */
+static void
+destroy_slist_free_full(gpointer list) {
+ slist_free_full((GSList *)list, g_free);
+}
+
static char *
get_name(
script->result = g_new0(client_script_result_t, 1);
script->result->proplist =
g_hash_table_new_full(g_str_hash, g_str_equal,
- &g_free, &g_slist_free_full_gpointer);
+ &g_free, &destroy_slist_free_full);
script->result->output = g_ptr_array_new();
script->result->err = g_ptr_array_new();
g_ptr_array_free(script->result->err, TRUE);
script->result->err = NULL;
}
- amfree(script->result);
}
}
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
amfree(dle->device);
amfree(dle->program);
g_slist_free(dle->estimatelist);
- g_slist_free_full(dle->levellist);
+ slist_free_full(dle->levellist, g_free);
amfree(dle->dumpdate);
amfree(dle->compprog);
amfree(dle->srv_encrypt);
scriptlist = scriptlist->next) {
free_script_data((script_t *)scriptlist->data);
}
- g_slist_free_full(dle->scriptlist);
- g_slist_free_full(dle->directtcp_list);
+ slist_free_full(dle->scriptlist, g_free);
+ slist_free_full(dle->directtcp_list, g_free);
amfree(dle);
}
/* A static buffer for storing tokens while they are being scanned. */
static char tkbuf[4096];
+/* Return a token formated for output */
+static char *str_keyword(keytab_t *kt);
+
+static char *str_keyword(keytab_t *kt);
/* Look up the name of the given token in the current keytable */
static char *get_token_name(tok_t);
if (kwp->keyword == NULL)
str = _("token not");
else
- str = kwp->keyword;
+ str = str_keyword(kwp);
break;
}
conf_parserror(_("%s is expected"), str);
case CONF_POST_LEVEL_RECOVER: val->v.i |= EXECUTE_ON_POST_LEVEL_RECOVER; break;
case CONF_INTER_LEVEL_RECOVER: val->v.i |= EXECUTE_ON_INTER_LEVEL_RECOVER; break;
default:
- conf_parserror(_("Execute_on expected"));
+ conf_parserror(_("Execute-on expected"));
}
get_conftoken(CONF_ANY);
if (tok != CONF_COMMA) {
free_val_t(&hd->value[i]);
}
}
- g_slist_free_full(holdinglist);
+ slist_free_full(holdinglist, g_free);
holdinglist = NULL;
for(dp=dumplist; dp != NULL; dp = dpnext) {
amfree(config_dir);
amfree(config_filename);
- g_slist_free_full(seen_filenames);
+ slist_free_full(seen_filenames, g_free);
seen_filenames = NULL;
config_client = FALSE;
conf_init_int (&conf_data[CNF_REQ_TRIES] , 3);
conf_init_int (&conf_data[CNF_DEBUG_DAYS] , AMANDA_DEBUG_DAYS);
conf_init_int (&conf_data[CNF_DEBUG_AMANDAD] , 0);
- conf_init_int (&conf_data[CNF_DEBUG_RECOVERY] , 0);
+ conf_init_int (&conf_data[CNF_DEBUG_RECOVERY] , 1);
conf_init_int (&conf_data[CNF_DEBUG_AMIDXTAPED] , 0);
conf_init_int (&conf_data[CNF_DEBUG_AMINDEXD] , 0);
conf_init_int (&conf_data[CNF_DEBUG_AMRECOVER] , 0);
gpointer p)
{
property_t *propery = (property_t *)p;
- g_slist_free_full(propery->values);
+ slist_free_full(propery->values, g_free);
amfree(propery);
}
break;
case CONFTYPE_IDENTLIST:
- g_slist_free_full(val->v.identlist);
+ slist_free_full(val->v.identlist, g_free);
break;
case CONFTYPE_RECOVERY_LIMIT:
- g_slist_free_full(val->v.recovery_limit.match_pats);
+ slist_free_full(val->v.recovery_limit.match_pats, g_free);
break;
case CONFTYPE_TIME:
for(dispstr=dispstrs; *dispstr!=NULL; dispstr++) {
if (prefix)
g_fprintf(output, "%s", prefix);
- g_fprintf(output, format, kt->keyword);
+ g_fprintf(output, format, str_keyword(kt));
g_fprintf(output, "%s\n", *dispstr);
}
} else {
buf[0] = stralloc("");
while (iter) {
- strappend(buf[0], (char *)iter->data);
+ strappend(buf[0], quote_string_always((char *)iter->data));
strappend(buf[0], " ");
iter = iter->next;
}
void
config_clear_errors(void)
{
- g_slist_free_full(cfgerr_errors);
+ slist_free_full(cfgerr_errors, g_free);
cfgerr_errors = NULL;
cfgerr_level = CFGERR_OK;
return ret;
}
+static char keyword_str[1024];
+
+static char *
+str_keyword(
+ keytab_t *kt)
+{
+ char *p = kt->keyword;
+ char *s = keyword_str;
+
+ while(*p != '\0') {
+ if (*p == '_') {
+ *s = '-';
+ } else {
+ *s = *p;
+ }
+ p++;
+ s++;
+ }
+ *s = '\0';
+
+ return keyword_str;
+}
tok = strtok_r(line1, " ", &saveptr);
if (tok == NULL) {
- g_debug("Empty amanda header: buflen=%zu lsize=%zu", buflen, lsize);
+ g_debug("Empty amanda header: buflen=%zu lsize=%zu buf='%s'", buflen, lsize, buf);
strange_header(file, buffer, buflen, _("<Non-empty line>"), tok);
goto out;
}
return to;
}
-void g_list_free_full(GList * list) {
- GList * cur = list;
-
- while (cur != NULL) {
- gpointer data = cur->data;
- amfree(data);
- cur = g_list_next(cur);
- }
-
- g_list_free(list);
-}
-
-void g_slist_free_full(GSList * list) {
+#if (GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 28))
+void slist_free_full(GSList * list, GDestroyNotify free_fn) {
GSList * cur = list;
while (cur != NULL) {
gpointer data = cur->data;
- amfree(data);
+ free_fn(data);
cur = g_slist_next(cur);
}
g_slist_free(list);
}
-
-void g_slist_free_full_gpointer(gpointer list) {
- g_slist_free_full((GSList *)list);
-}
+#endif
void g_queue_free_full(GQueue * queue) {
while (!g_queue_is_empty(queue)) {
/*
- * Copyright (c) 2007,2008,2009 Zmanda, Inc. All Rights Reserved.
+ * Copyright (c) 2007, 2008, 2009, 2010 Zmanda, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* Returns its second (reset) argument.*/
GValue* g_value_unset_copy(const GValue* from, GValue * to);
+/* This function is available in glib-2.28.0 and higher; for lower versions
+ * we build our own version with a different name */
+#if (GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 28))
+void slist_free_full(GSList * list, GDestroyNotify free_fn);
+#else
+#define slist_free_full(list, free_fn) g_slist_free_full((list), (free_fn))
+#endif
+
/* These functions all take a GLib container, and call free() on all the
* pointers in the container before free()ing the container itself. */
-void g_list_free_full(GList * list);
-void g_slist_free_full(GSList * list);
-void g_slist_free_full_gpointer(gpointer list);
void g_queue_free_full(GQueue * queue);
void g_ptr_array_free_full(GPtrArray * array);
-#define BUILT_REV "3545"
+#define BUILT_REV "3720"
#define BUILT_BRANCH "3_2"
if ((str == NULL) || (*str == '\0')) {
ret = stralloc("\"\"");
- } else if (!always && (match("[:\'\\\"[:space:][:cntrl:]]", str)) == 0) {
- /*
- * String does not need to be quoted since it contains
- * neither whitespace, control or quote characters.
- */
- ret = stralloc(str);
} else {
- /*
- * Allocate maximum possible string length.
- * (a string of all quotes plus room for leading ", trailing " and NULL)
- */
- ret = s = alloc((strlen(str) * 2) + 2 + 1);
- *(s++) = '"';
- while (*str != '\0') {
- if (*str == '\t') {
- *(s++) = '\\';
- *(s++) = 't';
- str++;
- continue;
- } else if (*str == '\n') {
- *(s++) = '\\';
- *(s++) = 'n';
- str++;
- continue;
- } else if (*str == '\r') {
- *(s++) = '\\';
- *(s++) = 'r';
- str++;
- continue;
- } else if (*str == '\f') {
- *(s++) = '\\';
- *(s++) = 'f';
- str++;
- continue;
- } else if (*str == '\\') {
- *(s++) = '\\';
- *(s++) = '\\';
- str++;
- continue;
- }
- if (*str == '"')
- *(s++) = '\\';
- *(s++) = *(str++);
+ const char *r;
+ for (r = str; *r; r++) {
+ if (*r == ':' || *r == '\'' || *r == '\\' || *r == '\"' ||
+ *r <= ' ' || *r == 0x7F )
+ always = 1;
+ }
+ if (!always) {
+ /*
+ * String does not need to be quoted since it contains
+ * neither whitespace, control or quote characters.
+ */
+ ret = stralloc(str);
+ } else {
+ /*
+ * Allocate maximum possible string length.
+ * (a string of all quotes plus room for leading ", trailing " and
+ * NULL)
+ */
+ ret = s = alloc((strlen(str) * 2) + 2 + 1);
+ *(s++) = '"';
+ while (*str != '\0') {
+ if (*str == '\t') {
+ *(s++) = '\\';
+ *(s++) = 't';
+ str++;
+ continue;
+ } else if (*str == '\n') {
+ *(s++) = '\\';
+ *(s++) = 'n';
+ str++;
+ continue;
+ } else if (*str == '\r') {
+ *(s++) = '\\';
+ *(s++) = 'r';
+ str++;
+ continue;
+ } else if (*str == '\f') {
+ *(s++) = '\\';
+ *(s++) = 'f';
+ str++;
+ continue;
+ } else if (*str == '\\') {
+ *(s++) = '\\';
+ *(s++) = '\\';
+ str++;
+ continue;
+ }
+ if (*str == '"')
+ *(s++) = '\\';
+ *(s++) = *(str++);
+ }
+ *(s++) = '"';
+ *s = '\0';
}
- *(s++) = '"';
- *s = '\0';
+ }
+ return (ret);
+}
+
+
+int
+len_quote_string_maybe(
+ const char *str,
+ gboolean always)
+{
+ int ret;
+
+ if ((str == NULL) || (*str == '\0')) {
+ ret = 0;
+ } else {
+ const char *r;
+ for (r = str; *r; r++) {
+ if (*r == ':' || *r == '\'' || *r == '\\' || *r == '\"' ||
+ *r <= ' ' || *r == 0x7F )
+ always = 1;
+ }
+ if (!always) {
+ /*
+ * String does not need to be quoted since it contains
+ * neither whitespace, control or quote characters.
+ */
+ ret = strlen(str);
+ } else {
+ /*
+ * Allocate maximum possible string length.
+ * (a string of all quotes plus room for leading ", trailing " and
+ * NULL)
+ */
+ ret = 1;
+ while (*str != '\0') {
+ if (*str == '\t') {
+ ret++;
+ ret++;
+ str++;
+ continue;
+ } else if (*str == '\n') {
+ ret++;
+ ret++;
+ str++;
+ continue;
+ } else if (*str == '\r') {
+ ret++;
+ ret++;
+ str++;
+ continue;
+ } else if (*str == '\f') {
+ ret++;
+ ret++;
+ str++;
+ continue;
+ } else if (*str == '\\') {
+ ret++;
+ ret++;
+ str++;
+ continue;
+ }
+ if (*str == '"')
+ ret++;
+ ret++;
+ str++;
+ }
+ ret++;
+ }
}
return (ret);
}
return 0;
}
-#ifndef HAVE_READLINE
+#ifndef HAVE_LIBREADLINE
/*
* simple readline() replacements, used when we don't have readline
* support from the system.
* always adds "" around the string */
#define quote_string(str) quote_string_maybe((str), 0)
#define quote_string_always(str) quote_string_maybe((str), 1)
+#define len_quote_string(str) len_quote_string_maybe((str), 0);
/*@only@*//*@null@*/char *quote_string_maybe(const char *str, gboolean always);
/*@only@*//*@null@*/char *unquote_string(const char *str);
+/*@only@*//*@null@*/int len_quote_string_maybe(const char *str, gboolean always);
/* Split a string into space-delimited words, obeying quoting as created by
* quote_string. To keep compatibility with the old split(), this has the
* or prototypes some simple stub functions that are used instead.
*/
-#ifdef HAVE_READLINE
-# ifdef HAVE_READLINE_READLINE_H
+#ifdef HAVE_LIBREADLINE
+# if defined(HAVE_READLINE_READLINE_H)
# include <readline/readline.h>
-# ifdef HAVE_READLINE_HISTORY_H
-# include <readline/history.h>
-# endif
-# else
-# ifdef HAVE_READLINE_H
-# include <readline.h>
-# ifdef HAVE_HISTORY_H
-# include <history.h>
-# endif
-# endif
-# endif
-#else
-
-char * readline(const char *prompt);
-void add_history(const char *line);
-
-#endif
+# elif defined(HAVE_READLINE_H)
+# include <readline.h>
+# else /* !defined(HAVE_READLINE_H) */
+extern char *readline ();
+# endif /* !defined(HAVE_READLINE_H) */
+ /* char *cmdline = NULL; */
+#else /* !defined(HAVE_LIBREADLINE) */
+ /* use our own readline */
+char * readline(const char *prompt);
+#endif /* HAVE_LIBREADLINE */
+
+#ifdef HAVE_READLINE_HISTORY
+# if defined(HAVE_READLINE_HISTORY_H)
+# include <readline/history.h>
+# elif defined(HAVE_HISTORY_H)
+# include <history.h>
+# else /* !defined(HAVE_HISTORY_H) */
+extern void add_history ();
+extern int write_history ();
+extern int read_history ();
+# endif /* defined(HAVE_READLINE_HISTORY_H) */
+#else /* !defined(HAVE_READLINE_HISTORY) */
+ /* use our own add_history */
+void add_history(const char *line);
+#endif /* HAVE_READLINE_HISTORY */
char *base64_decode_alloc_string(char *);
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
# the libcurl distribution for details.
#
AC_DEFUN([AMANDA_CHECK_LIBCURL], [
- case "$host" in
- sparc-sun-solaris2.10) # Solaris 10
- # curl is not in the LD_LIBRARY_PATH on Solaris 10, so we search
- # for it in a few common paths; we then extract the -L flags and
- # translate them to -R flags, as required by the runtime linker.
- AC_PATH_PROG(CURL_CONFIG, curl-config, [], $LOCSYSPATH:/opt/csw/bin:/usr/local/bin:/opt/local/bin)
- if test -n "$CURL_CONFIG"; then
- curlflags=`$CURL_CONFIG --libs 2>/dev/null`
- for flag in curlflags; do
- case $flag in
- -L*) LDFLAGS="$LDFLAGS "`echo "x$flag" | sed -e 's/^x-L/-R/'`;;
- esac
- done
- fi
- ;;
- esac
-
LIBCURL_CHECK_CONFIG(yes, 7.10.0, HAVE_CURL=yes, HAVE_CURL=no)
if test x"$HAVE_CURL" = x"yes"; then
AMANDA_ADD_LIBS($LIBCURL)
AMANDA_ADD_CPPFLAGS($LIBCURL_CPPFLAGS)
AMANDA_CHECK_TYPE([curl_off_t], [off_t], [curl/curl.h])
+ case "$host" in
+ *sun-solaris2*) # Solaris, all versions.
+ # we extract the -L flags and translate them to -R flags, as required
+ # by the runtime linker.
+ if test -n "$_libcurl_config"; then
+ curlflags=`$_libcurl_config --libs 2>/dev/null`
+ for flag in curlflags; do
+ case $flag in
+ -L*) LDFLAGS="$LDFLAGS "`echo "x$flag" | sed -e 's/^x-L/-R/'`;;
+ esac
+ done
+ fi
+ ;;
+ esac
fi
+
])
# SYNOPSIS
#
# OVERVIEW
#
-# Check for readline support. Defines HAVE_READLINE if readline
+# Check for readline support. Defines HAVE_LIBREADLINE if readline
# is available, and also checks for a number of readline headers and
# adds readline libraries to READLINE_LIBS.
#
# See common-src/util.{c,h}.
#
+#
+# Some idea taken from AX_LIB_READLINE:
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_lib_readline.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_LIB_READLINE
+#
+# DESCRIPTION
+#
+# Searches for a readline compatible library. If found, defines
+# `HAVE_LIBREADLINE'. If the found library has the `add_history' function,
+# sets also `HAVE_READLINE_HISTORY'. Also checks for the locations of the
+# necessary include files and sets `HAVE_READLINE_H' or
+# `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
+# 'HAVE_HISTORY_H' if the corresponding include files exists.
+#
+# The libraries that may be readline compatible are `libedit',
+# `libeditline' and `libreadline'. Sometimes we need to link a termcap
+# library for readline to work, this macro tests these cases too by trying
+# to link with `libtermcap', `libcurses' or `libncurses' before giving up.
+#
+# Here is an example of how to use the information provided by this macro
+# to perform the necessary includes or declarations in a C file:
+#
+# #ifdef HAVE_LIBREADLINE
+# # if defined(HAVE_READLINE_READLINE_H)
+# # include <readline/readline.h>
+# # elif defined(HAVE_READLINE_H)
+# # include <readline.h>
+# # else /* !defined(HAVE_READLINE_H) */
+# extern char *readline ();
+# # endif /* !defined(HAVE_READLINE_H) */
+# char *cmdline = NULL;
+# #else /* !defined(HAVE_READLINE_READLINE_H) */
+# /* no readline */
+# #endif /* HAVE_LIBREADLINE */
+#
+# #ifdef HAVE_READLINE_HISTORY
+# # if defined(HAVE_READLINE_HISTORY_H)
+# # include <readline/history.h>
+# # elif defined(HAVE_HISTORY_H)
+# # include <history.h>
+# # else /* !defined(HAVE_HISTORY_H) */
+# extern void add_history ();
+# extern int write_history ();
+# extern int read_history ();
+# # endif /* defined(HAVE_READLINE_HISTORY_H) */
+# /* no history */
+# #endif /* HAVE_READLINE_HISTORY */
+#
+# LICENSE
+#
+# Copyright (c) 2008 Ville Laurikari <vl@iki.fi>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 6
+
AC_DEFUN([AMANDA_CHECK_READLINE], [
- AC_ARG_WITH(readline,
- dnl no initial space here, so the results line up properly
+ AC_ARG_WITH(readline,
+ dnl no initial space here, so the results line up properly
AS_HELP_STRING([--with-readline], [require readline support (for amrecover)])
AS_HELP_STRING([--without-readline], [don't search for readline]),
- [
- case "$withval" in
- y | ye | yes | n | no) : ;;
- *) AC_MSG_ERROR([*** --with-readline does not take a value])
- esac
- want_readline="$withval"
- ], [
- want_readline="maybe" # meaning "only if we can find it"
- ])
+ [
+ case "$withval" in
+ y | ye | yes | n | no) : ;;
+ *) AC_MSG_ERROR([*** --with-readline does not take a value])
+ esac
+ want_readline="$withval"
+ ], [
+ want_readline="maybe" # meaning "only if we can find it"
+] )
- # unless the user said "no", look for readline.
- if test x"$want_readline" != x"no"; then
- # we need a tgetent() somewhere..
- proceed="false"
- AC_CHECK_LIB(termcap, tgetent, [
- READLINE_LIBS="-ltermcap"
- proceed="true"
- ], [
- AC_CHECK_LIB(curses, tgetent, [
- READLINE_LIBS="-lcurses"
- proceed="true"
- ], [
- AC_CHECK_LIB(ncurses, tgetent, [
- READLINE_LIBS="-lncurses"
- proceed="true"
- ])
- ])
- ])
- if $proceed; then
- proceed="false"
- AC_CHECK_HEADERS( history.h readline.h readline/history.h readline/readline.h, [
- # found at least one of the headers, so we can proceed.
- proceed="true"
- ])
+ # unless the user said "no", look for readline.
+ if test x"$want_readline" != x"no"; then
+ AC_CACHE_CHECK([for a readline compatible library],
+ ax_cv_lib_readline, [
+ ORIG_LIBS="$LIBS"
+ for readline_lib in readline edit editline; do
+ for termcap_lib in "" termcap curses ncurses; do
+ if test -z "$termcap_lib"; then
+ TRY_LIB="-l$readline_lib"
+ else
+ TRY_LIB="-l$readline_lib -l$termcap_lib"
+ fi
+ LIBS="$ORIG_LIBS $TRY_LIB"
+ AC_TRY_LINK_FUNC(readline, ax_cv_lib_readline="$TRY_LIB")
+ if test -n "$ax_cv_lib_readline"; then
+ break
+ fi
+ done
+ if test -n "$ax_cv_lib_readline"; then
+ break
fi
+ done
+ if test -z "$ax_cv_lib_readline"; then
+ ax_cv_lib_readline="no"
+ fi
+ LIBS="$ORIG_LIBS"
+ ])
- if $proceed; then
- proceed="false"
- AC_CHECK_LIB(readline,readline, [
- READLINE_LIBS="-lreadline $READLINE_LIBS"
- proceed="true"
- ],,$READLINE_LIBS)
- fi
+ if test "$ax_cv_lib_readline" != "no"; then
+ ORIG_LIBS="$LIBS"
+ LIBS="$LIBS $ax_cv_lib_readline"
+ READLINE_LIBS="$ax_cv_lib_readline"
+ AC_DEFINE(HAVE_LIBREADLINE, 1,
+ [Define if you have a readline compatible library])
+ AC_CHECK_HEADERS(readline.h readline/readline.h)
+ AC_CACHE_CHECK([whether readline supports history],
+ ax_cv_lib_readline_history, [
+ ax_cv_lib_readline_history="no"
+ AC_TRY_LINK_FUNC(add_history, ax_cv_lib_readline_history="yes")
+ ])
+ if test "$ax_cv_lib_readline_history" = "yes"; then
+ AC_DEFINE(HAVE_READLINE_HISTORY, 1,
+ [Define if your readline library has \`add_history'])
+ AC_CHECK_HEADERS(history.h readline/history.h)
+ fi
+ LIBS="$ORIG_LIBS"
- if $proceed; then
- # we have readline!
- AC_DEFINE(HAVE_READLINE, 1, [System has readline support (headers and libraries)])
- else
- # no readline. if the user *really* wanted it, bail out.
- if test x"$want_readline" = x"yes"; then
- AC_MSG_ERROR([*** No readline implementation found. Try using --with-libraries and --with-includes])
- fi
- READLINE_LIBS=""
- fi
+ else
+ # no readline. if the user *really* wanted it, bail out.
+ if test x"$want_readline" = x"yes"; then
+ AC_MSG_ERROR([*** No readline implementation found. Try using --with-libraries and --with-includes])
+ fi
+ READLINE_LIBS=""
fi
- AC_SUBST(READLINE_LIBS)
-])
+ fi
+ AC_SUBST(READLINE_LIBS)
+])dnl
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
+/* Define if you have a readline compatible library */
+#undef HAVE_LIBREADLINE
+
/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV
/* Define to 1 if _Exit is declared even after undefining macros. */
#undef HAVE_RAW_DECL__EXIT
-/* System has readline support (headers and libraries) */
-#undef HAVE_READLINE
-
/* Define to 1 if you have the <readline.h> header file. */
#undef HAVE_READLINE_H
+/* Define if your readline library has \`add_history' */
+#undef HAVE_READLINE_HISTORY
+
/* Define to 1 if you have the <readline/history.h> header file. */
#undef HAVE_READLINE_HISTORY_H
LIBCURL
LIBCURL_CPPFLAGS
_libcurl_config
-CURL_CONFIG
POSUB
INTLLIBS
LTLIBICONV
# Devices
#
- case "$host" in
- sparc-sun-solaris2.10) # Solaris 10
- # curl is not in the LD_LIBRARY_PATH on Solaris 10, so we search
- # for it in a few common paths; we then extract the -L flags and
- # translate them to -R flags, as required by the runtime linker.
- # Extract the first word of "curl-config", so it can be a program name with args.
-set dummy curl-config; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CURL_CONFIG+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- case $CURL_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$LOCSYSPATH:/opt/csw/bin:/usr/local/bin:/opt/local/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CURL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-CURL_CONFIG=$ac_cv_path_CURL_CONFIG
-if test -n "$CURL_CONFIG"; then
- { $as_echo "$as_me:$LINENO: result: $CURL_CONFIG" >&5
-$as_echo "$CURL_CONFIG" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test -n "$CURL_CONFIG"; then
- curlflags=`$CURL_CONFIG --libs 2>/dev/null`
- for flag in curlflags; do
- case $flag in
- -L*) LDFLAGS="$LDFLAGS "`echo "x$flag" | sed -e 's/^x-L/-R/'`;;
- esac
- done
- fi
- ;;
- esac
-
fi
+ case "$host" in
+ *sun-solaris2*) # Solaris, all versions.
+ # we extract the -L flags and translate them to -R flags, as required
+ # by the runtime linker.
+ if test -n "$_libcurl_config"; then
+ curlflags=`$_libcurl_config --libs 2>/dev/null`
+ for flag in curlflags; do
+ case $flag in
+ -L*) LDFLAGS="$LDFLAGS "`echo "x$flag" | sed -e 's/^x-L/-R/'`;;
+ esac
+ done
+ fi
+ ;;
+ esac
fi
+
HAVE_HMAC=yes
{ $as_echo "$as_me:$LINENO: checking for HMAC_CTX_init in -lcrypto" >&5
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:46651: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:46608: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:46654: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:46611: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:46657: output\"" >&5)
+ (eval echo "\"\$as_me:46614: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 47755 "configure"' > conftest.$ac_ext
+ echo '#line 47712 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:49124: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:49081: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:49128: \$? = $ac_status" >&5
+ echo "$as_me:49085: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:49448: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:49405: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:49452: \$? = $ac_status" >&5
+ echo "$as_me:49409: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:49553: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:49510: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:49557: \$? = $ac_status" >&5
+ echo "$as_me:49514: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:49608: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:49565: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:49612: \$? = $ac_status" >&5
+ echo "$as_me:49569: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 52413 "configure"
+#line 52370 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 52513 "configure"
+#line 52470 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
# Check whether --with-readline was given.
if test "${with_readline+set}" = set; then
withval=$with_readline;
- case "$withval" in
- y | ye | yes | n | no) : ;;
- *) { { $as_echo "$as_me:$LINENO: error: *** --with-readline does not take a value" >&5
+ case "$withval" in
+ y | ye | yes | n | no) : ;;
+ *) { { $as_echo "$as_me:$LINENO: error: *** --with-readline does not take a value" >&5
$as_echo "$as_me: error: *** --with-readline does not take a value" >&2;}
{ (exit 1); exit 1; }; }
- esac
- want_readline="$withval"
+ esac
+ want_readline="$withval"
else
- want_readline="maybe" # meaning "only if we can find it"
+ want_readline="maybe" # meaning "only if we can find it"
fi
- # unless the user said "no", look for readline.
- if test x"$want_readline" != x"no"; then
- # we need a tgetent() somewhere..
- proceed="false"
- { $as_echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
-$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
-if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
+
+ # unless the user said "no", look for readline.
+ if test x"$want_readline" != x"no"; then
+ { $as_echo "$as_me:$LINENO: checking for a readline compatible library" >&5
+$as_echo_n "checking for a readline compatible library... " >&6; }
+if test "${ax_cv_lib_readline+set}" = set; then
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltermcap $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+ ORIG_LIBS="$LIBS"
+ for readline_lib in readline edit editline; do
+ for termcap_lib in "" termcap curses ncurses; do
+ if test -z "$termcap_lib"; then
+ TRY_LIB="-l$readline_lib"
+ else
+ TRY_LIB="-l$readline_lib -l$termcap_lib"
+ fi
+ LIBS="$ORIG_LIBS $TRY_LIB"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char tgetent ();
+char readline ();
int
main ()
{
-return tgetent ();
+return readline ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_lib_termcap_tgetent=yes
+ ax_cv_lib_readline="$TRY_LIB"
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_termcap_tgetent=no
+
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ if test -n "$ax_cv_lib_readline"; then
+ break
+ fi
+ done
+ if test -n "$ax_cv_lib_readline"; then
+ break
+ fi
+ done
+ if test -z "$ax_cv_lib_readline"; then
+ ax_cv_lib_readline="no"
+ fi
+ LIBS="$ORIG_LIBS"
+
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5
-$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
-if test "x$ac_cv_lib_termcap_tgetent" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ax_cv_lib_readline" >&5
+$as_echo "$ax_cv_lib_readline" >&6; }
- READLINE_LIBS="-ltermcap"
- proceed="true"
+ if test "$ax_cv_lib_readline" != "no"; then
+ ORIG_LIBS="$LIBS"
+ LIBS="$LIBS $ax_cv_lib_readline"
+ READLINE_LIBS="$ax_cv_lib_readline"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBREADLINE 1
+_ACEOF
-else
- { $as_echo "$as_me:$LINENO: checking for tgetent in -lcurses" >&5
-$as_echo_n "checking for tgetent in -lcurses... " >&6; }
-if test "${ac_cv_lib_curses_tgetent+set}" = set; then
+
+for ac_header in readline.h readline/readline.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcurses $LIBS"
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char tgetent ();
-int
-main ()
-{
-return tgetent ();
- ;
- return 0;
-}
+$ac_includes_default
+#include <$ac_header>
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- ac_cv_lib_curses_tgetent=yes
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_curses_tgetent=no
+ ac_header_compiler=no
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5
-$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
-if test "x$ac_cv_lib_curses_tgetent" = x""yes; then
- READLINE_LIBS="-lcurses"
- proceed="true"
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
- { $as_echo "$as_me:$LINENO: checking for tgetent in -lncurses" >&5
-$as_echo_n "checking for tgetent in -lncurses... " >&6; }
-if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking whether readline supports history" >&5
+$as_echo_n "checking whether readline supports history... " >&6; }
+if test "${ax_cv_lib_readline_history+set}" = set; then
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lncurses $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+ ax_cv_lib_readline_history="no"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char tgetent ();
+char add_history ();
int
main ()
{
-return tgetent ();
+return add_history ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_lib_ncurses_tgetent=yes
+ ax_cv_lib_readline_history="yes"
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_ncurses_tgetent=no
+
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5
-$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
-if test "x$ac_cv_lib_ncurses_tgetent" = x""yes; then
-
- READLINE_LIBS="-lncurses"
- proceed="true"
fi
+{ $as_echo "$as_me:$LINENO: result: $ax_cv_lib_readline_history" >&5
+$as_echo "$ax_cv_lib_readline_history" >&6; }
+ if test "$ax_cv_lib_readline_history" = "yes"; then
-
-fi
-
-
-fi
-
-
- if $proceed; then
- proceed="false"
-
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_READLINE_HISTORY 1
+_ACEOF
-for ac_header in history.h readline.h readline/history.h readline/readline.h
+for ac_header in history.h readline/history.h
do
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- # found at least one of the headers, so we can proceed.
- proceed="true"
-
fi
done
- fi
-
- if $proceed; then
- proceed="false"
- { $as_echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
-$as_echo_n "checking for readline in -lreadline... " >&6; }
-if test "${ac_cv_lib_readline_readline+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char readline ();
-int
-main ()
-{
-return readline ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- ac_cv_lib_readline_readline=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_readline_readline=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
-$as_echo "$ac_cv_lib_readline_readline" >&6; }
-if test "x$ac_cv_lib_readline_readline" = x""yes; then
-
- READLINE_LIBS="-lreadline $READLINE_LIBS"
- proceed="true"
-
-fi
-
- fi
-
- if $proceed; then
- # we have readline!
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_READLINE 1
-_ACEOF
+ fi
+ LIBS="$ORIG_LIBS"
- else
- # no readline. if the user *really* wanted it, bail out.
- if test x"$want_readline" = x"yes"; then
- { { $as_echo "$as_me:$LINENO: error: *** No readline implementation found. Try using --with-libraries and --with-includes" >&5
+ else
+ # no readline. if the user *really* wanted it, bail out.
+ if test x"$want_readline" = x"yes"; then
+ { { $as_echo "$as_me:$LINENO: error: *** No readline implementation found. Try using --with-libraries and --with-includes" >&5
$as_echo "$as_me: error: *** No readline implementation found. Try using --with-libraries and --with-includes" >&2;}
{ (exit 1); exit 1; }; }
- fi
- READLINE_LIBS=""
- fi
+ fi
+ READLINE_LIBS=""
fi
+ fi
if WANT_S3_DEVICE
sbin_PROGRAMS += activate-devpay
+activate_devpay_LDADD = \
+ ../gnulib/libgnu.la
activate_devpay_SOURCES = activate-devpay.c
endif
@WANT_S3_DEVICE_TRUE@am_activate_devpay_OBJECTS = \
@WANT_S3_DEVICE_TRUE@ activate-devpay.$(OBJEXT)
activate_devpay_OBJECTS = $(am_activate_devpay_OBJECTS)
-activate_devpay_LDADD = $(LDADD)
+@WANT_S3_DEVICE_TRUE@activate_devpay_DEPENDENCIES = \
+@WANT_S3_DEVICE_TRUE@ ../gnulib/libgnu.la
SCRIPTS = $(sbin_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
$(am__append_4) $(am__append_5)
libamdevice_la_LIBADD = ../common-src/libamanda.la \
../xfer-src/libamxfer.la $(am__append_6)
+@WANT_S3_DEVICE_TRUE@activate_devpay_LDADD = \
+@WANT_S3_DEVICE_TRUE@ ../gnulib/libgnu.la
+
@WANT_S3_DEVICE_TRUE@activate_devpay_SOURCES = activate-devpay.c
noinst_HEADERS = \
device.h \
sub usage {
print <<EOF;
-Usage: amdevcheck <config> [ <device name> ] [ --properties {prop1,prop2,prop3} ]
+Usage: amdevcheck [--label] [--properties {prop1,prop2,prop3}] [-o configoption]* <config> [<device name>]
EOF
exit(1);
}
PROPERTY_ACCESS_GET_MASK | PROPERTY_ACCESS_SET_BEFORE_START,
tape_device_get_read_block_size_fn,
tape_device_set_read_block_size_fn);
+
+ /* add the ability to set LEOM to FALSE, for testing purposes */
+ device_class_register_property(device_class, PROPERTY_LEOM,
+ PROPERTY_ACCESS_GET_MASK | PROPERTY_ACCESS_SET_BEFORE_START,
+ device_simple_property_get_fn,
+ tape_device_set_feature_property_fn);
}
static gboolean
self->bsf_after_eom = new_bool;
else if (base->ID == PROPERTY_NONBLOCKING_OPEN)
self->nonblocking_open = new_bool;
+ else if (base->ID == PROPERTY_LEOM)
+ self->leom = new_bool;
else
return FALSE; /* shouldn't happen */
rv->refcount = 1;
rv->base = g_try_malloc(self->slab_size);
if (!rv->base) {
- g_free(rv);
xfer_cancel_with_error(XFER_ELEMENT(self),
- _("Could not allocate %zu bytes of memory"), self->slab_size);
+ _("Could not allocate %zu bytes of memory: %s"), self->slab_size, strerror(errno));
+ g_free(rv);
return NULL;
}
}
{
GTimer *timer = g_timer_new();
XMsg *msg;
- slab_source_state src_state;
+ slab_source_state src_state = {0, 0};
guint64 serial, stop_serial;
gboolean eof = FALSE;
int fileno = 0;
+ int failed = 0;
+ int slab_source_set = 0;
self->last_part_successful = FALSE;
self->bytes_written = 0;
- if (!device_start_file(self->device, self->part_header))
+ if (!device_start_file(self->device, self->part_header)) {
+ failed = 1;
goto part_done;
+ }
dumpfile_free(self->part_header);
self->part_header = NULL;
if (!slab_source_setup(self, &src_state))
goto part_done;
+ slab_source_set = 1;
g_timer_start(timer);
Slab *slab = slab_source_get(self, &src_state, serial);
DBG(8, "writing slab %p (serial %ju) to device", slab, serial);
g_mutex_unlock(self->slab_mutex);
- if (!slab)
+ if (!slab) {
+ failed = 1;
goto part_done;
+ }
eof = slab->size < self->slab_size;
- if (!write_slab_to_device(self, slab))
+ if (!write_slab_to_device(self, slab)) {
+ failed = 1;
goto part_done;
+ }
g_mutex_lock(self->slab_mutex);
DBG(8, "wrote slab %p to device", slab);
}
g_mutex_unlock(self->slab_mutex);
+part_done:
/* if we write all of the blocks, but the finish_file fails, then likely
* there was some buffering going on in the device driver, and the blocks
* did not all make it to permanent storage -- so it's a failed part. */
- if (!device_finish_file(self->device))
- goto part_done;
+ if (self->device->in_file && !device_finish_file(self->device))
+ failed = 1;
- slab_source_free(self, &src_state);
+ if (slab_source_set) {
+ slab_source_free(self, &src_state);
+ }
- self->last_part_successful = TRUE;
- self->no_more_parts = eof;
+ if (!failed) {
+ self->last_part_successful = TRUE;
+ self->no_more_parts = eof;
+ }
-part_done:
g_timer_stop(timer);
msg = xmsg_new(XFER_ELEMENT(self), XMSG_PART_DONE, 0);
/* then signal all of our condition variables, so that threads waiting on them
* wake up and see elt->cancelled. */
- g_mutex_lock(self->state_mutex);
- g_cond_broadcast(self->state_cond);
- g_mutex_unlock(self->state_mutex);
-
g_mutex_lock(self->slab_mutex);
g_cond_broadcast(self->slab_cond);
g_cond_broadcast(self->slab_free_cond);
g_mutex_unlock(self->slab_mutex);
+ g_mutex_lock(self->state_mutex);
+ g_cond_broadcast(self->state_cond);
+ g_mutex_unlock(self->state_mutex);
+
return rv;
}
g_mutex_unlock(self->ring_mutex);
part_done:
- if (elt->cancelled) {
- g_timer_destroy(timer);
- return NULL;
- }
-
/* if we write all of the blocks, but the finish_file fails, then likely
* there was some buffering going on in the device driver, and the blocks
* did not all make it to permanent storage -- so it's a failed part. Note
* that we try to finish_file even if the part failed, just to be thorough. */
if (self->device->in_file) {
if (!device_finish_file(self->device))
- part_status = PART_FAILED;
+ if (!elt->cancelled) {
+ part_status = PART_FAILED;
+ }
+ }
+
+ if (elt->cancelled) {
+ g_timer_destroy(timer);
+ return NULL;
}
g_timer_stop(timer);
/* then signal all of our condition variables, so that threads waiting on them
* wake up and see elt->cancelled. */
- g_mutex_lock(self->state_mutex);
- g_cond_broadcast(self->state_cond);
- g_mutex_unlock(self->state_mutex);
-
g_mutex_lock(self->ring_mutex);
g_cond_broadcast(self->ring_add_cond);
g_cond_broadcast(self->ring_free_cond);
g_mutex_unlock(self->ring_mutex);
+ g_mutex_lock(self->state_mutex);
+ g_cond_broadcast(self->state_cond);
+ g_mutex_unlock(self->state_mutex);
+
return rv;
}
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
is_deeply($inv, [
{ slot => 1, state => Amanda::Changer::SLOT_FULL,
- device_status => $DEVICE_STATUS_SUCCESS,
+ device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
f_type => $Amanda::Header::F_EMPTY, label => undef,
reserved => 0, current => 1},
{ slot => 2, state => Amanda::Changer::SLOT_FULL,
- device_status => $DEVICE_STATUS_SUCCESS,
+ device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
f_type => $Amanda::Header::F_EMPTY, label => undef,
reserved => 0 },
{ slot => 3, state => Amanda::Changer::SLOT_FULL,
- device_status => $DEVICE_STATUS_SUCCESS,
+ device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
f_type => $Amanda::Header::F_EMPTY, label => undef,
reserved => 0 },
{ slot => 4, state => Amanda::Changer::SLOT_FULL,
f_type => $Amanda::Header::F_TAPESTART, label => "FOO?BAR",
reserved => 0 },
{ slot => 5, state => Amanda::Changer::SLOT_FULL,
- device_status => $DEVICE_STATUS_SUCCESS,
+ device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
f_type => $Amanda::Header::F_EMPTY, label => undef,
reserved => 0 },
], "inventory finds the labeled tape");
die $err if $err;
is_deeply($inv, [
- { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_SUCCESS,
+ { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
f_type => $Amanda::Header::F_EMPTY, label => undef, # undef because labels don't match
reserved => 0,
slot => '{1,1,1}', import_export => undef },
- { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_SUCCESS,
+ { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
f_type => $Amanda::Header::F_EMPTY, label => undef, # all blank
reserved => 0,
slot => '{2,2,2}', import_export => undef },
- { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_SUCCESS,
+ { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
f_type => $Amanda::Header::F_EMPTY, label => undef, # mismatched labels
reserved => 0,
slot => '{3,3,3}', import_export => undef },
- { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_SUCCESS,
+ { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
f_type => $Amanda::Header::F_EMPTY, label => undef, # mismatched labels
reserved => 0,
slot => '{4,4,4}', import_export => undef } ,
slot => '{1,1,1}', import_export => undef },
{ state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_SUCCESS, f_type => $Amanda::Header::F_TAPESTART, label => 'mytape-2', reserved => 0,
slot => '{2,2,2}', import_export => undef },
- { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_SUCCESS, f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0,
+ { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_VOLUME_UNLABELED, f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0,
slot => '{3,3,3}', import_export => undef },
- { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_SUCCESS, f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0,
+ { state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_VOLUME_UNLABELED, f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0,
slot => '{4,4,4}', import_export => undef } ,
], "second inventory is correct");
is($dump_filename, $fn,
"config filename is included correctly");
-like($dump, qr/DEVICE_PROPERTY\s+"foo" "bar"\n/i,
- "DEVICE_PROPERTY appears in dump output");
+like($dump, qr/DEVICE-PROPERTY\s+"foo" "bar"\n/i,
+ "DEVICE-PROPERTY appears in dump output");
-like($dump, qr/AMRECOVER_CHECK_LABEL\s+(yes|no)/i,
- "AMRECOVER_CHECK_LABEL has a trailing space");
+like($dump, qr/AMRECOVER-CHECK-LABEL\s+(yes|no)/i,
+ "AMRECOVER-CHECK-LABEL has a trailing space");
-like($dump, qr/AMRECOVER_CHECK_LABEL\s+(yes|no)/i,
- "AMRECOVER_CHECK_LABEL has a trailing space");
+like($dump, qr/AMRECOVER-CHECK-LABEL\s+(yes|no)/i,
+ "AMRECOVER-CHECK-LABEL has a trailing space");
like($dump, qr/EXCLUDE\s+LIST "foo" "bar" "true" "star"/i,
"EXCLUDE LIST is in the dump");
"INCLUDE LIST is in the dump");
like($dump, qr/INCLUDE\s+FILE OPTIONAL "rhyme"/i,
"INCLUDE FILE is in the dump");
-like($dump, qr/RECOVERY_LIMIT.*SAME-HOST/i,
+like($dump, qr/RECOVERY-LIMIT.*SAME-HOST/i,
"RECOVERY-LIST is in the dump");
##
@lines = (
"20071111010002 TESTCONF004 reuse\n",
- "20071110010002 TESTCONF003 reuse\n",
- "20071109010002 TESTCONF002 reuse #comment 2\n",
+ "20071110010002 TESTCONF003 reuse BARCODE:BAR-003\n",
+ "20071109010002 TESTCONF002 reuse BARCODE:BAR-002 #comment 2\n",
"20071108010001 TESTCONF001 no-reuse #comment 1\n",
);
mktapelist($tapelist, @lines);
lockname => $tapelist . ".lock",
tles => [
{ 'datestamp' => '20071111010002', 'label' => 'TESTCONF004',
- 'reuse' => 1, 'position' => 1, 'comment' => undef },
+ 'reuse' => 1, 'position' => 1, 'barcode' => undef, 'comment' => undef },
{ 'datestamp' => '20071110010002', 'label' => 'TESTCONF003',
- 'reuse' => 1, 'position' => 2, 'comment' => undef },
+ 'reuse' => 1, 'position' => 2, 'barcode' => 'BAR-003', 'comment' => undef },
{ 'datestamp' => '20071109010002', 'label' => 'TESTCONF002',
- 'reuse' => 1, 'position' => 3, 'comment' => 'comment 2' },
+ 'reuse' => 1, 'position' => 3, 'barcode' => 'BAR-002', 'comment' => 'comment 2' },
{ 'datestamp' => '20071108010001', 'label' => 'TESTCONF001',
- 'reuse' => '', 'position' => 4, 'comment' => 'comment 1' },
+ 'reuse' => '', 'position' => 4, 'barcode' => undef, 'comment' => 'comment 1' },
] }, "A simple tapelist is parsed correctly");
SKIP: {
is_deeply($tl->lookup_tapelabel('TESTCONF002'),
{ 'datestamp' => '20071109010002', 'label' => 'TESTCONF002',
- 'reuse' => 1, 'position' => 3, 'comment' => 'comment 2' },
+ 'reuse' => 1, 'position' => 3, 'barcode' => 'BAR-002', 'comment' => 'comment 2' },
"lookup_tapelabel works");
is_deeply($tl->lookup_tapelabel('TESTCONF009'), undef,
is_deeply($tl->lookup_tapepos(4),
{ 'datestamp' => '20071108010001', 'label' => 'TESTCONF001',
- 'reuse' => '', 'position' => 4, 'comment' => 'comment 1' },
+ 'reuse' => '', 'position' => 4, 'barcode' => undef, 'comment' => 'comment 1' },
"lookup_tapepos works");
is_deeply($tl->lookup_tapepos(9), undef,
is_deeply($tl->lookup_tapedate('20071110010002'),
{ 'datestamp' => '20071110010002', 'label' => 'TESTCONF003',
- 'reuse' => 1, 'position' => 2, 'comment' => undef },
+ 'reuse' => 1, 'position' => 2, 'barcode' => 'BAR-003', 'comment' => undef },
"lookup_tapedate works");
is_deeply($tl->lookup_tapedate('12345678'), undef,
"lookup_tapedate returns undef on an unknown datestamp");
# try some edits
- $tl->add_tapelabel("20080112010203", "TESTCONF007", "seven", 1);
+ $tl->add_tapelabel("20080112010203", "TESTCONF007", "seven", 1, undef, 'BAR-007');
is(scalar @{$tl->{'tles'}}, 5, "add_tapelabel adds a new element to the tapelist");
is_deeply($tl->lookup_tapepos(1),
{ 'datestamp' => '20080112010203', 'label' => 'TESTCONF007',
- 'reuse' => 1, 'position' => 1, 'comment' => 'seven' },
+ 'reuse' => 1, 'position' => 1, 'barcode' => 'BAR-007', 'comment' => 'seven' },
".. lookup_tapepos finds it at the beginning");
is_deeply($tl->lookup_tapelabel("TESTCONF007"),
{ 'datestamp' => '20080112010203', 'label' => 'TESTCONF007',
- 'reuse' => 1, 'position' => 1, 'comment' => 'seven' },
+ 'reuse' => 1, 'position' => 1, 'barcode' => 'BAR-007', 'comment' => 'seven' },
".. lookup_tapelabel finds it");
is_deeply($tl->lookup_tapedate("20080112010203"),
{ 'datestamp' => '20080112010203', 'label' => 'TESTCONF007',
- 'reuse' => 1, 'position' => 1, 'comment' => 'seven' },
+ 'reuse' => 1, 'position' => 1, 'barcode' => 'BAR-007', 'comment' => 'seven' },
".. lookup_tapedate finds it");
# try some edits
is_deeply($tl->lookup_tapelabel("TESTCONF008"),
{ 'datestamp' => '20080112010204', 'label' => 'TESTCONF008',
- 'reuse' => 0, 'position' => 1, 'comment' => 'eight' },
+ 'reuse' => 0, 'position' => 1, 'barcode' => undef, 'comment' => 'eight' },
".. lookup_tapelabel finds it no-reuse");
$tl->remove_tapelabel("TESTCONF008");
is_deeply($tl->lookup_tapepos(4), # used to be in position 5
{ 'datestamp' => '20071108010001', 'label' => 'TESTCONF001',
- 'reuse' => '', 'position' => 4, 'comment' => 'comment 1' },
+ 'reuse' => '', 'position' => 4, 'barcode' => undef, 'comment' => 'comment 1' },
".. tape positions are adjusted correctly");
is_deeply($tl->lookup_tapelabel("TESTCONF002"), undef,
lockname => $tapelist . ".lock",
tles => [
{ 'datestamp' => '2006123456', 'label' => 'FOO',
- 'reuse' => 1, 'position' => 1, 'comment' => undef },
+ 'reuse' => 1, 'position' => 1, 'barcode' => undef, 'comment' => undef },
] }, "Invalid lines are ignored");
# make sure clear_tapelist is empty
lockname => $tapelist . ".lock",
tles => [
{ 'datestamp' => '2006123456', 'label' => 'FOO',
- 'reuse' => 1, 'position' => 1, 'comment' => undef },
+ 'reuse' => 1, 'position' => 1, 'barcode' => undef, 'comment' => undef },
] }, "reload works");
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
$tl->reload();
is_deeply($tl->{'tles'}->[0], {
'reuse' => 1,
+ 'barcode' => undef,
'comment' => undef,
'position' => 1,
'label' => 'TESTCONF92',
ok(!run($amreport, 'TESTCONF-NOSUCH', '--help'),
"amreport --help exits with status 1");
like($Installcheck::Run::stdout,
- qr/Usage: amreport conf/,
+ qr/Usage: amreport \[--version\]/,
"..and prints usage message");
like(run_get($amreport, 'TESTCONF-NOSUCH', '--version'),
NOTES:
big estimate: home.slikon.local /opt/public 0
- est: 80286112k out 50917369k
+ est: 80286112k out 50917370k
DUMP SUMMARY:
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
.\" Title: amaddclient
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMADDCLIENT" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMADDCLIENT" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amadmin
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMADMIN" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMADMIN" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amadmin \- administrative interface to control Amanda backups
.SH "SYNOPSIS"
.HP \w'\fBamadmin\fR\ 'u
-\fBamadmin\fR \fIconfig\fR \fIcommand\fR [\fIcommand_options\fR...] [\fB\-o\fR\ \fIconfigoption\fR...]
+\fBamadmin\fR [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIcommand\fR [\fIcommand_options\fR...]
.SH "DESCRIPTION"
.PP
\fBAmadmin\fR
.\" Title: amaespipe
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMAESPIPE" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMAESPIPE" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda-applications
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: Miscellanea
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\-APPLICATIONS" "7" "10/18/2010" "Amanda 3\&.2\&.0" "Miscellanea"
+.TH "AMANDA\-APPLICATIONS" "7" "12/14/2010" "Amanda 3\&.2\&.1" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda-archive-format
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: File formats and conventions
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\-ARCHIVE\-FOR" "5" "10/18/2010" "Amanda 3\&.2\&.0" "File formats and conventions"
+.TH "AMANDA\-ARCHIVE\-FOR" "5" "12/14/2010" "Amanda 3\&.2\&.1" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda-auth
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: Miscellanea
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\-AUTH" "7" "10/18/2010" "Amanda 3\&.2\&.0" "Miscellanea"
+.TH "AMANDA\-AUTH" "7" "12/14/2010" "Amanda 3\&.2\&.1" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda-changers
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: Miscellanea
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\-CHANGERS" "7" "10/18/2010" "Amanda 3\&.2\&.0" "Miscellanea"
+.TH "AMANDA\-CHANGERS" "7" "12/14/2010" "Amanda 3\&.2\&.1" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda-client.conf
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: File formats and conventions
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\-CLIENT\&.CON" "5" "10/18/2010" "Amanda 3\&.2\&.0" "File formats and conventions"
+.TH "AMANDA\-CLIENT\&.CON" "5" "12/14/2010" "Amanda 3\&.2\&.1" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda-compatibility
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: Miscellanea
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\-COMPATIBILIT" "7" "10/18/2010" "Amanda 3\&.2\&.0" "Miscellanea"
+.TH "AMANDA\-COMPATIBILIT" "7" "12/14/2010" "Amanda 3\&.2\&.1" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda-devices
.\" Author: Ian Turner <ian@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: Miscellanea
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\-DEVICES" "7" "10/18/2010" "Amanda 3\&.2\&.0" "Miscellanea"
+.TH "AMANDA\-DEVICES" "7" "12/14/2010" "Amanda 3\&.2\&.1" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda-match
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: Miscellanea
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\-MATCH" "7" "10/18/2010" "Amanda 3\&.2\&.0" "Miscellanea"
+.TH "AMANDA\-MATCH" "7" "12/14/2010" "Amanda 3\&.2\&.1" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda-scripts
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: Miscellanea
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\-SCRIPTS" "7" "10/18/2010" "Amanda 3\&.2\&.0" "Miscellanea"
+.TH "AMANDA\-SCRIPTS" "7" "12/14/2010" "Amanda 3\&.2\&.1" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda-taperscan
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: Miscellanea
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\-TAPERSCAN" "7" "10/18/2010" "Amanda 3\&.2\&.0" "Miscellanea"
+.TH "AMANDA\-TAPERSCAN" "7" "12/14/2010" "Amanda 3\&.2\&.1" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMANDA" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amanda.conf
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: File formats and conventions
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMANDA\&.CONF" "5" "10/18/2010" "Amanda 3\&.2\&.0" "File formats and conventions"
+.TH "AMANDA\&.CONF" "5" "12/14/2010" "Amanda 3\&.2\&.1" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
\fI0\fR\&. Debug level of the taper process
.RE
.PP
+\fBdebug\-recovery\fR \fIint\fR
+.RS 4
+Default:
+\fI1\fR\&. Debug level of all recovery process
+.RE
+.PP
\fBflush\-threshold\-dumped\fR \fIint\fR
.RS 4
Default:
.\" Title: amarchiver
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMARCHIVER" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMARCHIVER" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amcheck
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMCHECK" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMCHECK" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amcheck \- run Amanda self\-checks
.SH "SYNOPSIS"
.HP \w'\fBamcheck\fR\ 'u
-\fBamcheck\fR [\-am] [\-w] [\-sclt] [\-M\ \fIaddress\fR] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] [\fB\-o\fR\ \fIconfigoption\fR...]
+\fBamcheck\fR [\-am] [\-w] [\-sclt] [\-M\ \fIaddress\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
.SH "DESCRIPTION"
.PP
\fBAmcheck\fR
.\" Title: amcheckdb
.\" Author: Adrian T. Filipi-Martin <atf3r@cs.virginia.edu>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMCHECKDB" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMCHECKDB" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amcheckdump
.\" Author: Ian Turner <ian@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMCHECKDUMP" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMCHECKDUMP" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amcheckdump \- check the results of an Amanda dump
.SH "SYNOPSIS"
.HP \w'\fBamcheckdump\fR\ 'u
-\fBamcheckdump\fR \fIconfig\fR [\-\-timestamp|\-t\ \fItimestamp\fR] [\-\-verbose] [\fB\-o\fR\ \fIconfigoption\fR...]
+\fBamcheckdump\fR [\-\-timestamp|\-t\ \fItimestamp\fR] [\-\-verbose] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR
.SH "DESCRIPTION"
.PP
\fBAmcheckdump\fR
.\" Title: amcleanup
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMCLEANUP" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMCLEANUP" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amcrypt-ossl-asym
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMCRYPT\-OSSL\-ASYM" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMCRYPT\-OSSL\-ASYM" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amcrypt-ossl
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMCRYPT\-OSSL" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMCRYPT\-OSSL" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amcrypt
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMCRYPT" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMCRYPT" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amcryptsimple
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMCRYPTSIMPLE" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMCRYPTSIMPLE" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amdevcheck
.\" Author: Ian Turner <ian@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMDEVCHECK" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMDEVCHECK" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amdevcheck \- Validate an Amanda device and volume\&.
.SH "SYNOPSIS"
.HP \w'\fBamdevcheck\fR\ 'u
-\fBamdevcheck\fR \fIconfig\fR [\fIdevice\-name\fR] [\-\-label] [\-properties\ \fIlist\fR] [\fB\-o\fR\ \fIconfigoption\fR...]
+\fBamdevcheck\fR [\-\-label] [\-properties\ \fIlist\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIdevice\-name\fR]
.SH "DESCRIPTION"
.PP
.\" Title: amdump
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMDUMP" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMDUMP" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amdump \- back up all disks in an Amanda configuration
.SH "SYNOPSIS"
.HP \w'\fBamdump\fR\ 'u
-\fBamdump\fR \fIconfig\fR [\fB\-\-no\-taper\fR] [\fIhost\fR\ [\fIdisk\fR...]...] [\fB\-o\fR\ \fIconfigoption\fR...]
+\fBamdump\fR [\fB\-\-no\-taper\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
.SH "DESCRIPTION"
.PP
\fBAmdump\fR
.\" Title: amfetchdump
.\" Author: John Stange <building@nap.edu>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMFETCHDUMP" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMFETCHDUMP" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amfetchdump \- extract backup images from multiple Amanda tapes\&.
.SH "SYNOPSIS"
.HP \w'\fBamfetchdump\fR\ 'u
-\fBamfetchdump\fR [\-phcClawns] [\-d\ \fIdevice\fR] [\-O\ \fIdirectory\fR] [\-b\ \fIblocksize\fR] [\-\-header\-fd\ \fIfd\fR] [\-\-header\-file\ \fIfilename\fR] [\-o\ \fIconfigoption\fR]... \fIconfig\fR \fIhostname\fR [\fIdisk\fR\ [\ \fIdate\fR\ [\ \fIlevel\fR\ [\ \fIhostname\fR\ [\&.\&.\&.]\ ]\ ]\ ]]
+\fBamfetchdump\fR [\-phcClawns] [\-d\ \fIdevice\fR] [\-O\ \fIdirectory\fR] [\-b\ \fIblocksize\fR] [\-\-header\-fd\ \fIfd\fR] [\-\-header\-file\ \fIfilename\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIhostname\fR [\fIdisk\fR\ [\ \fIdate\fR\ [\ \fIlevel\fR\ [\ \fIhostname\fR\ [\&.\&.\&.]\ ]\ ]\ ]]
.SH "DESCRIPTION"
.PP
\fBAmfetchdump\fR
.\" Title: amflush
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMFLUSH" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMFLUSH" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amflush \- flush Amanda backup files from holding disk to tape
.SH "SYNOPSIS"
.HP \w'\fBamflush\fR\ 'u
-\fBamflush\fR [\-b] [\-f] [\-s] [\-D\ \fIdatestamp\fR] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] [\fB\-o\fR\ \fIconfigoption\fR...]
+\fBamflush\fR [\-b] [\-f] [\-s] [\-D\ \fIdatestamp\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
.SH "DESCRIPTION"
.PP
\fBAmflush\fR
.\" Title: amgetconf
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMGETCONF" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMGETCONF" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amgetconf \- look up configuration parameters and manipulate debug logs
.SH "SYNOPSIS"
.HP \w'\fBamgetconf\fR\ 'u
-\fBamgetconf\fR [\fI\-l|\-\-list\fR] [\fI\-\-client\fR] [\fI\-\-execute\-where\ client|server\fR] [\fIconfig\fR] \fIparameter\fR [\fB\-o\fR\ \fIconfigoption\fR...]
+\fBamgetconf\fR [\fI\-l|\-\-list\fR] [\fI\-\-client\fR] [\fI\-\-execute\-where\ client|server\fR] [\fB\-o\fR\ \fIconfigoption\fR...] [\fIconfig\fR] \fIparameter\fR
.SH "DESCRIPTION"
.PP
\fBAmgetconf\fR
.\" Title: amgpgcrypt
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMGPGCRYPT" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMGPGCRYPT" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amgtar
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMGTAR" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMGTAR" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amlabel
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMLABEL" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMLABEL" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amlabel \- label an Amanda tape
.SH "SYNOPSIS"
.HP \w'\fBamlabel\fR\ 'u
-\fBamlabel\fR \fIconfig\fR \fIlabel\fR [slot\ \fIslot\fR] [\fB\-f\fR] [\fB\-\-version\fR] [\fB\-o\fR\ \fIconfigoption\fR...]
+\fBamlabel\fR [\fB\-f\fR] [\fB\-\-version\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIlabel\fR [slot\ \fIslot\fR]
.SH "DESCRIPTION"
.PP
This command applies a label to an Amanda volume, erasing the volume in the process\&.
.\" Title: amoverview
.\" Author: Stefan G. Weichinger <sgw@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMOVERVIEW" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMOVERVIEW" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amoverview \- display file systems processed by Amanda over time
.SH "SYNOPSIS"
.HP \w'\fBamoverview\fR\ 'u
-\fBamoverview\fR [[\-\-config\ ]\ \fIconfig\fR] [\-\-hostwidth\ \fIwidth\fR] [\-\-diskwidth\ \fIwidth\fR] [\-\-skipmissed] [\-\-last] [\-\-num0] [\-\-togo0] [\-\-verbose]
+\fBamoverview\fR [\-\-hostwidth\ \fIwidth\fR] [\-\-diskwidth\ \fIwidth\fR] [\-\-skipmissed] [\-\-last] [\-\-num0] [\-\-togo0] [\-\-verbose] [\-\-config\ ]\ \fIconfig\fR
.SH "DESCRIPTION"
.PP
\fBAmoverview\fR
.\" Title: ampgsql
.\" Author: Nikolas Coukouma <atrus@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMPGSQL" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMPGSQL" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amplot
.\" Author: Olafur Gudmundsson <ogud@tis.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMPLOT" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMPLOT" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amraw
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMRAW" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMRAW" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amrecover
.\" Author: Alan M. McIvor <alan@kauri.auck.irl.cri.nz>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMRECOVER" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMRECOVER" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amrecover \- Amanda index database browser
.SH "SYNOPSIS"
.HP \w'\fBamrecover\fR\ 'u
-\fBamrecover\fR [\-C\ \fIconfig\fR] [\-s\ \fIindex\-server\fR] [\-t\ \fItape\-server\fR] [\-d\ \fItape\-device\fR] [\-h\ \fIhostname\fR] [\-o\ \fIconfigoption\fR]...
+\fBamrecover\fR [\-s\ \fIindex\-server\fR] [\-t\ \fItape\-server\fR] [\-d\ \fItape\-device\fR] [\-h\ \fIhostname\fR] [\fB\-o\fR\ \fIconfigoption\fR...] [\-C\ \fIconfig\fR]
.SH "DESCRIPTION"
.PP
\fBAmrecover\fR
.\" Title: amreport
.\" Author: Stefan G. Weichinger <sgw@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMREPORT" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMREPORT" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amreport \- generate a formatted output of statistics for an Amanda run
.SH "SYNOPSIS"
.HP \w'\fBamreport\fR\ 'u
-\fBamreport\fR [\fIconfig\fR] [\fB\-o\fR\ \fIconfigoption\fR...] [(1)\ \fIcommand\-line options\fR | (2)\ \fIscript options\fR]
+\fBamreport\fR [\fB\-o\fR\ \fIconfigoption\fR...] [(1)\ \fIcommand\-line options\fR | (2)\ \fIscript options\fR] [\fIconfig\fR]
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.\" Title: amrestore
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMRESTORE" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMRESTORE" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amrmtape
.\" Author: Adrian T. Filipi-Martin <atf3r@cs.virginia.edu>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMRMTAPE" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMRMTAPE" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amsamba
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMSAMBA" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMSAMBA" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amserverconfig
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMSERVERCONFIG" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMSERVERCONFIG" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amservice
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMSERVICE" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMSERVICE" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amservice \- run an amanda service on a client
.SH "SYNOPSIS"
.HP \w'\fBamservice\fR\ 'u
-\fBamservice\fR \fIhostname\fR \fIauth\fR \fIservice\fR [\-f\ \fIinput_file\fR] [\fB\-o\fR\ \fIconfigoption\fR...]
+\fBamservice\fR [\-f\ \fIinput_file\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIhostname\fR \fIauth\fR \fIservice\fR
.SH "DESCRIPTION"
.PP
\fBAmservice\fR
.\" Title: amstar
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMSTAR" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMSTAR" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amstatus
.\" Author: Stefan G. Weichinger <sgw@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMSTATUS" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMSTATUS" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amstatus \- display the state of an Amanda run
.SH "SYNOPSIS"
.HP \w'\fBamstatus\fR\ 'u
-\fBamstatus\fR [\-\-config] \fIconfig\fR [\-\-file\ \fIamdumpfile\fR] [\-\-summary] [\-\-dumping] [\-\-waitdumping] [\-\-waittaper] [\-\-dumpingtape] [\-\-writingtape] [\-\-finished] [\-\-failed] [\-\-estimate] [\-\-gestimate] [\-\-stats] [\-\-locale\-independent\-date\-format]
+\fBamstatus\fR [\-\-file\ \fIamdumpfile\fR] [\-\-summary] [\-\-dumping] [\-\-waitdumping] [\-\-waittaper] [\-\-dumpingtape] [\-\-writingtape] [\-\-finished] [\-\-failed] [\-\-estimate] [\-\-gestimate] [\-\-stats] [\-\-locale\-independent\-date\-format] [\-\-config] \fIconfig\fR
.SH "DESCRIPTION"
.PP
\fBAmstatus\fR
.\" Title: amsuntar
.\" Author: Satya Ganga <gast@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMSUNTAR" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMSUNTAR" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amtape
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMTAPE" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMTAPE" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
amtape \- Control Amanda changers
.SH "SYNOPSIS"
.HP \w'\fBamtape\fR\ 'u
-\fBamtape\fR \fIconfig\fR \fIsubcommand\fR [\fIsubcommand_options\fR...] [\fB\-o\fR\ \fIconfigoption\fR...]
+\fBamtape\fR [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIsubcommand\fR [\fIsubcommand_options\fR...]
.SH "DESCRIPTION"
.PP
\fBAmtape\fR
.\" Title: amtapetype
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMTAPETYPE" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMTAPETYPE" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amtoc
.\" Author: Nicolas Mayencourt <Nicolas.Mayencourt@cui.unige.ch>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMTOC" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMTOC" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amvault
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMVAULT" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMVAULT" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amzfs-sendrecv
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMZFS\-SENDRECV" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMZFS\-SENDRECV" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: amzfs-snapshot
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "AMZFS\-SNAPSHOT" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "AMZFS\-SNAPSHOT" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: disklist
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: File formats and conventions
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "DISKLIST" "5" "10/18/2010" "Amanda 3\&.2\&.0" "File formats and conventions"
+.TH "DISKLIST" "5" "12/14/2010" "Amanda 3\&.2\&.1" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: script-email
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "SCRIPT\-EMAIL" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
+.TH "SCRIPT\-EMAIL" "8" "12/14/2010" "Amanda 3\&.2\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" Title: tapelist
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
-.\" Date: 10/18/2010
+.\" Date: 12/14/2010
.\" Manual: File formats and conventions
-.\" Source: Amanda 3.2.0
+.\" Source: Amanda 3.2.1
.\" Language: English
.\"
-.TH "TAPELIST" "5" "10/18/2010" "Amanda 3\&.2\&.0" "File formats and conventions"
+.TH "TAPELIST" "5" "12/14/2010" "Amanda 3\&.2\&.1" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
file contains the list of tapes in active use\&. This file is not ordinarily ordinarily edited or examined manually\&. Its format may change, or it may be removed altogether, in future versions of Amanda\&. It contains lines of the form:
.PP
.nf
-YYYYMMDD label flags [#comment]
+YYYYMMDD label flags [BARCODE:barcode] [#comment]
.fi
.PP
Where
dumps\&. See the
\fBreuse\fR
options of
-\fBamadmin\fR(8)\&. The optional comment is prefixed with a \'#\' and continues to the end of the line\&. Amanda will maintain this comment until the tape is overwritten\&. Note that comments are not allowed on blank lines\&.
+\fBamadmin\fR(8)\&. The optional barcode is prefixed with \'BARCODE\' if the volume have a barcode\&. The optional comment is prefixed with a \'#\' and continues to the end of the line\&. Amanda will maintain this comment until the tape is overwritten\&. Note that comments are not allowed on blank lines\&.
.PP
The file is sorted such that the most\-recently used tape appears on the first line, and the oldest tape appears on the last line\&.
.PP
<refsynopsisdiv>
<cmdsynopsis>
<command>amadmin</command>
+ &configoverride.synopsis;
<arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='plain'><replaceable>command</replaceable></arg>
<arg choice='opt' rep='repeat'><replaceable>command_options</replaceable></arg>
- &configoverride.synopsis;
</cmdsynopsis>
</refsynopsisdiv>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><amkeyword>debug-recovery</amkeyword> <amtype>int</amtype></term>
+ <listitem>
+<para>Default:
+<amdefault>1</amdefault>.
+Debug level of all recovery process</para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><amkeyword>flush-threshold-dumped</amkeyword> <amtype>int</amtype></term>
<listitem>
<arg choice='opt'>-w</arg>
<arg choice='opt'>-sclt</arg>
<arg choice='opt'>-M <replaceable>address</replaceable></arg>
+ &configoverride.synopsis;
<arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='opt' rep='repeat'>
<arg choice='plain'><replaceable>host</replaceable></arg>
<arg choice='opt' rep='repeat'><replaceable>disk</replaceable></arg>
</arg>
- &configoverride.synopsis;
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>amcheckdump</command>
- <arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='opt'>--timestamp|-t <replaceable>timestamp</replaceable></arg>
<arg choice='opt'>--verbose</arg>
&configoverride.synopsis;
+ <arg choice='plain'><replaceable>config</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>amdevcheck</command>
- <arg choice='plain'><replaceable>config</replaceable></arg>
- <group choice='opt'>
- <arg choice='plain'><replaceable>device-name</replaceable></arg>
- </group>
<group choice='opt'>
<arg choice='plain'>--label</arg>
</group>
<arg choice='plain'>-properties <replaceable>list</replaceable></arg>
</group>
&configoverride.synopsis;
+ <arg choice='plain'><replaceable>config</replaceable></arg>
+ <group choice='opt'>
+ <arg choice='plain'><replaceable>device-name</replaceable></arg>
+ </group>
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>amdump</command>
- <arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='opt'><option>--no-taper</option></arg>
+ &configoverride.synopsis;
+ <arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='opt' rep='repeat'>
<arg choice='plain'><replaceable>host</replaceable></arg>
<arg choice='opt' rep='repeat'><replaceable>disk</replaceable></arg>
</arg>
- &configoverride.synopsis;
</cmdsynopsis>
</refsynopsisdiv>
<arg choice='opt'>-b <replaceable>blocksize</replaceable></arg>
<arg choice='opt'>--header-fd <replaceable>fd</replaceable></arg>
<arg choice='opt'>--header-file <replaceable>filename</replaceable></arg>
- <arg choice='plain' rep='repeat'><group><arg choice='plain'>-o </arg><replaceable>configoption</replaceable></group></arg>
+ &configoverride.synopsis;
<arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='plain'><replaceable>hostname</replaceable></arg>
<arg choice='opt'>
<arg choice='opt'>-f</arg>
<arg choice='opt'>-s</arg>
<arg choice='opt'>-D <replaceable>datestamp</replaceable></arg>
+ &configoverride.synopsis;
<arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='opt' rep='repeat'>
<arg choice='plain'><replaceable>host</replaceable></arg>
<arg choice='opt' rep='repeat'><replaceable>disk</replaceable></arg>
</arg>
- &configoverride.synopsis;
</cmdsynopsis>
</refsynopsisdiv>
<arg choice='opt'><replaceable>-l|--list</replaceable></arg>
<arg choice='opt'><replaceable>--client</replaceable></arg>
<arg choice='opt'><replaceable>--execute-where client|server</replaceable></arg>
+ &configoverride.synopsis;
<arg choice='opt'><replaceable>config</replaceable></arg>
<arg choice='plain'><replaceable>parameter</replaceable></arg>
- &configoverride.synopsis;
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>amlabel</command>
- <arg choice='plain'><replaceable>config</replaceable></arg>
- <arg choice='plain'><replaceable>label</replaceable></arg>
- <arg choice='opt'>slot <replaceable>slot</replaceable></arg>
<arg><option>-f</option></arg>
&version.synopsis;
&configoverride.synopsis;
+ <arg choice='plain'><replaceable>config</replaceable></arg>
+ <arg choice='plain'><replaceable>label</replaceable></arg>
+ <arg choice='opt'>slot <replaceable>slot</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>amoverview</command>
- <arg choice='opt'><arg choice='opt'>--config </arg><arg choice='plain'><replaceable>config</replaceable></arg></arg>
<arg choice='opt'>--hostwidth <replaceable>width</replaceable></arg>
<arg choice='opt'>--diskwidth <replaceable>width</replaceable></arg>
<arg choice='opt'>--skipmissed</arg>
<arg choice='opt'>--num0</arg>
<arg choice='opt'>--togo0</arg>
<arg choice='opt'>--verbose</arg>
+ <arg choice='plain'><arg choice='opt'>--config </arg> <replaceable>config</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>amrecover</command>
- <arg choice='opt'>-C <replaceable>config</replaceable></arg>
<arg choice='opt'>-s <replaceable>index-server</replaceable></arg>
<arg choice='opt'>-t <replaceable>tape-server</replaceable></arg>
<arg choice='opt'>-d <replaceable>tape-device</replaceable></arg>
<arg choice='opt'>-h <replaceable>hostname</replaceable></arg>
- <arg choice='plain' rep='repeat'><group><arg choice='plain'>-o </arg><replaceable>configoption</replaceable></group></arg>
+ &configoverride.synopsis;
+ <arg choice='opt'>-C <replaceable>config</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>amreport</command>
- <arg choice='opt'><replaceable>config</replaceable></arg>
&configoverride.synopsis;
<group>
<synopfragmentref linkend="cmdline">command-line options</synopfragmentref> | <synopfragmentref linkend="script">script options</synopfragmentref>
</group>
+ <arg choice='opt'><replaceable>config</replaceable></arg>
<synopfragment id="cmdline">
<arg choice='opt'>--log=<replaceable>logfile</replaceable></arg>
<arg choice='opt'>--ps=<replaceable>filename</replaceable></arg>
<refsynopsisdiv>
<cmdsynopsis>
<command>amservice</command>
+ <arg choice='opt'><arg choice='plain'>-f</arg><arg choice='plain'><replaceable>input_file</replaceable></arg></arg>
+ &configoverride.synopsis;
<arg choice='plain'><replaceable>hostname</replaceable></arg>
<arg choice='plain'><replaceable>auth</replaceable></arg>
<arg choice='plain'><replaceable>service</replaceable></arg>
- <arg choice='opt'><arg choice='plain'>-f</arg><arg choice='plain'><replaceable>input_file</replaceable></arg></arg>
- &configoverride.synopsis;
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>amstatus</command>
- <arg choice='opt'>--config </arg>
- <arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='opt'><arg choice='plain'>--file </arg><arg choice='plain'><replaceable>amdumpfile</replaceable></arg></arg>
<arg choice='opt'>--summary </arg>
<arg choice='opt'>--dumping </arg>
<arg choice='opt'>--gestimate </arg>
<arg choice='opt'>--stats </arg>
<arg choice='opt'>--locale-independent-date-format </arg>
+ <arg choice='opt'>--config </arg>
+ <arg choice='plain'><replaceable>config</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>amtape</command>
+ &configoverride.synopsis;
<arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='plain'><replaceable>subcommand</replaceable></arg>
<arg choice='opt' rep='repeat'><replaceable>subcommand_options</replaceable></arg>
- &configoverride.synopsis;
</cmdsynopsis>
</refsynopsisdiv>
manually. Its format may change, or it may be removed altogether, in future
versions of Amanda. It contains lines of the form:</para>
-<para><programlisting>YYYYMMDD label flags [#comment]
+<para><programlisting>YYYYMMDD label flags [BARCODE:barcode] [#comment]
</programlisting></para>
<para>Where
<emphasis remap='B'>reuse</emphasis>
options of
<manref name="amadmin" vol="8"/>.
+The optional barcode is prefixed with 'BARCODE' if the volume have a barcode.
The optional comment is prefixed with a '#' and continues to the end of the line. Amanda
will maintain this comment until the tape is overwritten. Note that comments are not
allowed on blank lines.</para>
</span>
</xsl:template>
+<xsl:template name="user.header.content">
+ <center>Amanda-@VERSION@</center>
+ <hr />
+</xsl:template>
+
<xsl:template name="user.footer.content">
<hr />
<center>Amanda-@VERSION@</center>
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
MAKEFLAGS="-j1 " \
CFLAGS="-pipe " \
MAILER=/usr/bin/mail \
+ LDFLAGS="-Wl,--as-needed" \
--quiet \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
%{?PKG_CONFIG_PATH:%{echo:PKG_CONFIG_PATH = %{PKG_CONFIG_PATH}}}
+# LDFLAGS: newer gnu linkers can use "-Wl,--as-needed", while older ones,
+# like rhel3 and sles9 can't.
+%define LDFLAGS -Wl,--as-needed
+
# Define which Distribution we are building:
# Try to detect the distribution we are building:
%if %{_vendor} == redhat
%define disttag fc
%define distver 3
%define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
%endif
%if %(awk '$1 == "Fedora" && $4 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist fedora
%define disttag fc
%define distver 4
%define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
%endif
%if %(awk '$1 == "Fedora" && $4 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist fedora
%define disttag fc
%define distver 5
%define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
%endif
%if %(awk '$1 == "Fedora" && $4 ~ /6.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist fedora
%define disttag fc
%define distver 6
%define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
%endif
%if %(awk '$1 == "Fedora" && $3 ~ /7.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist fedora
%define disttag fc
%define distver 7
%define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
%endif
# if macro cannot have an empty test and we're just testing the existance
%if %{?fedora:yes}%{!?fedora:no} == yes
%define distver %{fedora}
%if %{distver} <= 8
%define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
+ %endif
+ %if %{distver} >= 9
+ %define curl libcurl
%endif
%if %{_host_cpu} == x86_64 && %{_target_cpu} == i686
# Do nothing if PKG_CONFIG_PATH was set by the user above.
%define distver 3
%define tarver 1.14
%define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
%define without_ipv6 --without-ipv6
+ %undefine LDFLAGS
%endif
%if %(awk '$1 == "Red" && $7 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist redhat
%define distver 4
%define tarver 1.14
%define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
%endif
%if %(awk '$1 == "CentOS" && $3 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist redhat
%define distver 4
%define tarver 1.14
%define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
%endif
%if %(awk '$1 == "Red" && $7 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist redhat
%define disttag rhel
%define distver 5
- %define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
%endif
%if %(awk '$1 == "CentOS" && $3 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist redhat
%define disttag rhel
%define distver 5
- %define requires_libtermcap Requires: libtermcap.so.2
+ %define curl curl
+ %endif
+ %if %(awk '$1 == "Red" && $7 ~ /6.*/ { exit 1; }' /etc/redhat-release; echo $?)
+ %define dist redhat
+ %define disttag rhel
+ %define distver 6
+ %define curl libcurl
%endif
# If dist is undefined, we didn't detect.
%if %(awk '$1 == "SUSE" { exit 1; }' /etc/SuSE-release; echo $?)
%define disttag %(awk '$1=="SUSE" {$3=="Enterprise" ? TAG="sles" : TAG="suse" ; print TAG}' /etc/SuSE-release)
%define distver %(awk '$1=="SUSE" {$3=="Enterprise" ? VER=$5 : VER=$3 ; print VER}' /etc/SuSE-release)
+ # Always use quotes in rpm comparisons if values could be interpreted
+ # as integers.
+ %define curl curl
+ %if "%{distver}" == "9"
+ %undefine LDFLAGS
+ %endif
%endif
%endif
# Note: newer distros have changed most *-devel to lib*-devel, and added a
# provides tag for backwards compat.
BuildRequires: readline-devel
-BuildRequires: curl >= 7.10.0
-BuildRequires: curl-devel >= 7.10.0
+BuildRequires: %{curl} >= 7.10.0
+BuildRequires: %{curl}-devel >= 7.10.0
BuildRequires: openssl
BuildRequires: openssl-devel
BuildRequires: perl(ExtUtils::Embed)
Requires: fileutils
Requires: grep
Requires: gnuplot
-Requires: libc.so.6
-Requires: libm.so.6
-Requires: libnsl.so.1
-Requires: curl >= 7.10.0
+Requires: %{curl} >= 7.10.0
Requires: openssl
Requires: xinetd
Requires: perl >= 5.6.0
%{?requires_libtermcap}
%{?requires_initscripts}
Requires: xinetd
-Requires: libc.so.6
-Requires: libm.so.6
-Requires: libnsl.so.1
Requires: perl >= 5.6.0
Requires: tar >= %{tarver}
Requires: readline
Requires: /bin/awk
Requires: fileutils
Requires: grep
-Requires: libc.so.6
-Requires: libm.so.6
-Requires: libnsl.so.1
%{?requires_libtermcap}
%{?requires_initscripts}
Requires: xinetd
# Set PKG_CONFIG_PATH=some/path if some/path was set on the command line, or by
# the platform detection bits.
# without_ipv6 should only be defined on rhel3.
+# LDFLAGS macro is defined except on rhel3.
./configure \
%{?PKG_CONFIG_PATH: PKG_CONFIG_PATH=%PKG_CONFIG_PATH} \
CFLAGS="%{optflags} -g -pipe" CXXFLAGS="%{optflags}" \
+ %{?LDFLAGS:LDFLAGS="${LDFLAGS} %{?LDFLAGS:%LDFLAGS}"} \
--quiet \
--prefix=%{PREFIX} \
--sysconfdir=%{SYSCONFDIR} \
die "$pkgname->new did not return an Amanda::Changer object or an Amanda::Changer::Error"
unless ($rv->isa("Amanda::Changer") or $rv->isa("Amanda::Changer::Error"));
+ if ($rv->isa("Amanda::Changer::Error")) {
+ return $rv;
+ }
+
if ($rv->isa("Amanda::Changer")) {
# add an instance variable or two
$rv->{'fatal_error'} = undef;
if ($label) {
$s->{'label'} = $self->_get_slot_label($slot);
$s->{'f_type'} = "".$Amanda::Header::F_TAPESTART;
+ $s->{'device_status'} = "".$DEVICE_STATUS_SUCCESS;
} else {
$s->{'label'} = undef;
$s->{'f_type'} = "".$Amanda::Header::F_EMPTY;
+ $s->{'device_status'} = "".$DEVICE_STATUS_VOLUME_UNLABELED;
}
- $s->{'device_status'} = "".$DEVICE_STATUS_SUCCESS;
$s->{'current'} = 1 if $slot eq $current;
push @inventory, $s;
}
my $device = Amanda::Device->new($device_name);
if ($device->status != $DEVICE_STATUS_SUCCESS) {
- return $self->make_error("failed", undef,
+ return Amanda::Changer->make_error("fatal", undef,
reason => "unknown",
message => "opening '$device_name': " . $device->error_or_status());
}
if (my $err = $self->{'config'}->configure_device($device)) {
- return $self->make_error("failed", undef,
+ return Amanda::Changer->make_error("fatal", undef,
reason => "unknown",
message => $err);
}
foreach my $dle_entry (@dles) {
my $alldumps = $self->get_dle_info(@$dle_entry, 'dumps');
+ my $driver = $self->get_dle_info(@$dle_entry, 'driver');
my $planner = $self->get_dle_info(@$dle_entry, 'planner');
if ($planner && $planner->{'status'} eq 'fail') {
$self->{flags}{dump_failed} = 1;
} elsif ($planner && $planner->{'status'} eq 'skipped') {
# We don't want these to be counted as missing below
- } elsif (!defined $alldumps->{$self->{'run_timestamp'}}) {
+ } elsif (!defined $alldumps->{$self->{'run_timestamp'}} and
+ !$driver and
+ !$planner) {
$self->{flags}{results_missing} = 1;
$self->{flags}{exit_status} |= STATUS_MISSING;
} else {
if ($report->get_flag('results_missing') and
!defined($alldumps->{$report->{run_timestamp}}) and
+ !$dle->{driver} and
!$dle->{planner}) {
push @missing_failures, "$hostname $qdisk RESULTS MISSING";
}
# note: copied & modified from calculate_stats.
if (
- exists $try->{dumper}
- && exists $try->{taper}
- && defined $try->{taper}->{kb}
- && ( $try->{taper}{status} eq 'done'
- || $try->{taper}{status} eq 'partial')
- ) {
- $outsize = $try->{taper}->{kb};
- } elsif (
exists $try->{dumper}
&& exists $try->{chunker}
&& defined $try->{chunker}->{kb}
|| $try->{chunker}{status} eq 'partial')
) {
$outsize = $try->{chunker}->{kb};
+ } elsif (
+ exists $try->{dumper}
+ && exists $try->{taper}
+ && defined $try->{taper}->{kb}
+ && ( $try->{taper}{status} eq 'done'
+ || $try->{taper}{status} eq 'partial')
+ ) {
+ $outsize = $try->{taper}->{kb};
}
}
}
push @$notes,
"big estimate: $hostname $qdisk $dle->{estimate}{level}",
sprintf(' est: %.0f%s out %.0f%s',
- $est->{ckb}, $disp_unit, $outsize, $disp_unit)
+ $self->tounits($est->{ckb}), $disp_unit,
+ $self->tounits($outsize), $disp_unit)
if (defined $est->{'ckb'} && ($est->{ckb} * .9 > $outsize)
&& ($est->{ckb} - $outsize > 1.0e5));
}
: $tail_quote_trunc->($disk, $col_spec->[1]->[COLSPEC_WIDTH]);
my $alldumps = $dle_info->{'dumps'};
- if ($dle_info->{'planner'} &&
- $dle_info->{'planner'}->{'status'} eq 'fail') {
- my @rv;
- push @rv, 'nodump-FAILED';
- push @rv, $hostname;
- push @rv, $disk_out;
- push @rv, ("",) x 9;
- push @rvs, [@rv];
+ if (($dle_info->{'planner'} &&
+ $dle_info->{'planner'}->{'status'} eq 'fail') or
+ ($dle_info->{'driver'} &&
+ $dle_info->{'driver'}->{'status'} eq 'fail')) {
+ # Do not report driver error if we have a try
+ if (!exists $alldumps->{$report->{'run_timestamp'}}) {
+ my @rv;
+ push @rv, 'nodump-FAILED';
+ push @rv, $hostname;
+ push @rv, $disk_out;
+ push @rv, ("",) x 9;
+ push @rvs, [@rv];
+ }
} elsif ($dle_info->{'planner'} &&
$dle_info->{'planner'}->{'status'} eq 'skipped') {
my @rv;
# sometimes the driver logs an orig_size of -1, which makes the
# compression percent very large and negative
- $orig_size = 0 if ($orig_size < 0);
+ $orig_size = 0 if (defined $orig_size && $orig_size < 0);
# pre-format the compression column, with '--' replacing 100% (i.e.,
# no compression)
sub add_tapelabel {
my $self = shift;
- my ($datestamp, $label, $comment, $reuse) = @_;
+ my ($datestamp, $label, $comment, $reuse, $meta, $barcode) = @_;
+ # $meta is unused
$reuse = 1 if !defined $reuse;
# prepend this (presumably new) volume to the beginning of the list
'datestamp' => $datestamp,
'label' => $label,
'reuse' => $reuse,
+ 'barcode' => $barcode,
'comment' => $comment,
};
$self->_update_positions();
my $datestamp = $tle->{'datestamp'};
my $label = $tle->{'label'};
my $reuse = $tle->{'reuse'} ? 'reuse' : 'no-reuse';
+ my $barcode = (defined $tle->{'barcode'})? (" BARCODE:" . $tle->{'barcode'}) : '';
my $comment = (defined $tle->{'comment'})? (" #" . $tle->{'comment'}) : '';
- $result &&= print $fhn "$datestamp $label $reuse$comment\n";
+ $result &&= print $fhn "$datestamp $label $reuse$barcode$comment\n";
}
my $result_close = close($fhn);
$result &&= $result_close;
my @tles;
open(my $fh, "<", $self->{'filename'}) or return $self;
while (my $line = <$fh>) {
- my ($datestamp, $label, $reuse, $comment)
- = $line =~ m/^([0-9]*)\s([^\s]*)\s(reuse|no-reuse)\s*(?:\#(.*))?$/mx;
+ my ($datestamp, $label, $reuse, $barcode, $comment)
+ = $line =~ m/^([0-9]*)\s([^\s]*)\s(reuse|no-reuse)\s*(?:BARCODE:([^\s]*))?\s*(?:\#(.*))?$/mx;
next if !defined $datestamp; # silently filter out bogus lines
push @tles, {
'datestamp' => $datestamp,
'label' => $label,
'reuse' => ($reuse eq 'reuse'),
+ 'barcode' => $barcode,
'comment' => $comment,
};
}
sub add_tapelabel {
my $self = shift;
- my ($datestamp, $label, $comment, $reuse) = @_;
+ my ($datestamp, $label, $comment, $reuse, $meta, $barcode) = @_;
+ # $meta is unused
$reuse = 1 if !defined $reuse;
# prepend this (presumably new) volume to the beginning of the list
'datestamp' => $datestamp,
'label' => $label,
'reuse' => $reuse,
+ 'barcode' => $barcode,
'comment' => $comment,
};
$self->_update_positions();
my $datestamp = $tle->{'datestamp'};
my $label = $tle->{'label'};
my $reuse = $tle->{'reuse'} ? 'reuse' : 'no-reuse';
+ my $barcode = (defined $tle->{'barcode'})? (" BARCODE:" . $tle->{'barcode'}) : '';
my $comment = (defined $tle->{'comment'})? (" #" . $tle->{'comment'}) : '';
- $result &&= print $fhn "$datestamp $label $reuse$comment\n";
+ $result &&= print $fhn "$datestamp $label $reuse$barcode$comment\n";
}
my $result_close = close($fhn);
$result &&= $result_close;
my @tles;
open(my $fh, "<", $self->{'filename'}) or return $self;
while (my $line = <$fh>) {
- my ($datestamp, $label, $reuse, $comment)
- = $line =~ m/^([0-9]*)\s([^\s]*)\s(reuse|no-reuse)\s*(?:\#(.*))?$/mx;
+ my ($datestamp, $label, $reuse, $barcode, $comment)
+ = $line =~ m/^([0-9]*)\s([^\s]*)\s(reuse|no-reuse)\s*(?:BARCODE:([^\s]*))?\s*(?:\#(.*))?$/mx;
next if !defined $datestamp; # silently filter out bogus lines
push @tles, {
'datestamp' => $datestamp,
'label' => $label,
'reuse' => ($reuse eq 'reuse'),
+ 'barcode' => $barcode,
'comment' => $comment,
};
}
# inform the xdt about this new device before starting it
$self->{'xdt'}->use_device($device);
- my $result = $self->_device_start($device, $access_mode, $new_label, $is_new);
+ my $result = $self->_device_start($reservation, $access_mode, $new_label, $is_new);
if ($result == 0) {
# try reading the label to see whether we erased the tape
my $erased = 0;
# return a message for others error
sub _device_start {
my $self = shift;
- my ($device, $access_mode, $new_label, $is_new) = @_;
+ my ($reservation, $access_mode, $new_label, $is_new) = @_;
+ my $device = $reservation->{'device'};
my $tl = $self->{'taperscan'}->{'tapelist'};
if (!defined $tl) { # For Mock::Taperscan in installcheck
$tl->unlock();
return $err;
} else {
- $tl->add_tapelabel('0', $new_label, undef, 0);
+ $tl->add_tapelabel('0', $new_label, undef, 0, undef, $reservation->{'barcode'});
$tl->write();
}
$self->dbg("generate new label '$new_label'");
%get_xfer_dest_args = get_splitting_args_from_config(
%splitting_args);
$get_xfer_dest_args{'max_memory'} = getconf($CNF_DEVICE_OUTPUT_BUFFER_SIZE);
+ if (!getconf_seen($CNF_DEVICE_OUTPUT_BUFFER_SIZE)) {
+ my $device = $self->{'scribe'}->get_device();
+ my $block_size4 = $device->block_size * 4;
+ if ($block_size4 > $get_xfer_dest_args{'max_memory'}) {
+ $get_xfer_dest_args{'max_memory'} = $block_size4;
+ }
+ }
$get_xfer_dest_args{'can_cache_inform'} = ($msgtype eq Amanda::Taper::Protocol::FILE_WRITE);
# if we're unable to fulfill the user's splitting needs, we can still give
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
static char *errstr;
static char *amidxtaped_line = NULL;
extern char *localhost;
+static char header_buf[32768];
+static int header_size = 0;
+
/* global pid storage for interrupt handler */
pid_t extract_restore_child_pid = -1;
ctl_data.bsu = NULL;
ctl_data.bytes_read = 0;
+ header_size = 0;
security_stream_read(amidxtaped_streams[DATAFD].fd,
read_amidxtaped_data, &ctl_data);
all_level = g_slist_append(all_level, level);
}
if (dump_dle) {
- g_slist_free_full(dump_dle->levellist);
+ slist_free_full(dump_dle->levellist, g_free);
dump_dle->levellist = all_level;
run_client_scripts(EXECUTE_ON_PRE_RECOVER, &g_options, dump_dle,
stderr);
dump_dle->levellist = g_slist_append(dump_dle->levellist, level);
run_client_scripts(EXECUTE_ON_INTER_LEVEL_RECOVER, &g_options,
dump_dle, stderr);
- g_slist_free_full(dump_dle->levellist);
+ slist_free_full(dump_dle->levellist, g_free);
dump_dle->levellist = NULL;
}
if (dump_dle) {
run_client_scripts(EXECUTE_ON_POST_LEVEL_RECOVER, &g_options,
dump_dle, stderr);
- g_slist_free_full(dump_dle->levellist);
+ slist_free_full(dump_dle->levellist, g_free);
dump_dle->levellist = NULL;
}
}
dump_dle->levellist = all_level;
run_client_scripts(EXECUTE_ON_POST_RECOVER, &g_options, dump_dle,
stderr);
- g_slist_free_full(dump_dle->levellist);
+ slist_free_full(dump_dle->levellist, g_free);
all_level = NULL;
dump_dle->levellist = NULL;
}
GPtrArray *errarray;
g_option_t g_options;
data_path_t data_path_set = DATA_PATH_AMANDA;
+ int to_move;
+
+ to_move = MIN(32768-header_size, size);
+ memcpy(header_buf+header_size, buf, to_move);
+ header_size += to_move;
+ g_debug("read header %zd => %d", size, header_size);
+ if (header_size < 32768) {
+ security_stream_read(amidxtaped_streams[DATAFD].fd,
+ read_amidxtaped_data, cookie);
+ return;
+ } else if (header_size > 32768) {
+ error("header_size is %d\n", header_size);
+ }
+ assert (to_move == size);
/* parse the file header */
fh_init(&ctl_data->file);
- parse_file_header(buf, &ctl_data->file, (size_t)size);
+ parse_file_header(header_buf, &ctl_data->file, (size_t)header_size);
/* call backup_support_option */
g_options.config = get_config_name();
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
{
int i;
- g_fprintf(stderr, _("\nUsage: %s <conf> <command> {<args>} [-o configoption]* ...\n"),
+ g_fprintf(stderr, _("\nUsage: %s [-o configoption]* <conf> <command> {<args>} ...\n"),
get_pname());
g_fprintf(stderr, _(" Valid <command>s are:\n"));
for (i = 0; i < NCMDS; i++)
output_find = find_dump(&diskq); /* Add deleted dump to diskq */
if(argc-(start_argc-1) > 0) {
+ find_result_t *afind = NULL;
+ find_result_t *afind_next = NULL;
+ find_result_t *new_output_find = NULL;
+ disk_t *dp;
+
amfree(errstr);
- free_find_result(&output_find);
errstr = match_disklist(&diskq, argc-(start_argc-1),
argv+(start_argc-1));
if (errstr) {
g_printf("%s", errstr);
amfree(errstr);
}
- output_find = find_dump(NULL);
+ for (afind = output_find; afind; afind = afind_next) {
+ afind_next = afind->next;
+ dp = lookup_disk(afind->hostname, afind->diskname);
+ if (dp->todo) {
+ afind->next = new_output_find;
+ new_output_find = afind;
+ } else {
+ amfree(afind->timestamp);
+ amfree(afind->write_timestamp);
+ amfree(afind->hostname);
+ amfree(afind->diskname);
+ amfree(afind->label);
+ amfree(afind->status);
+ amfree(afind->dump_status);
+ amfree(afind->message);
+ amfree(afind);
+ }
+ }
+ output_find = new_output_find;
} else if (errstr) {
g_printf("%s", errstr);
amfree(errstr);
amfree(dumpstr);
dumpfile_free_data(&file);
}
- g_slist_free_full(file_list);
+ slist_free_full(file_list, g_free);
break;
case HOLDING_DELETE:
error(_("Could not delete '%s'"), (char *)li->data);
}
}
- g_slist_free_full(file_list);
+ slist_free_full(file_list, g_free);
break;
}
}
sle_t *excl;
identlist_t pp_scriptlist;
estimatelist_t estimates;
+ dumptype_t *dtype = lookup_dumptype(dp->dtype_name);
hp = dp->host;
ip = hp->netif;
g_printf(" skip-incr %s\n", (dp->skip_incr? "YES" : "NO"));
g_printf(" skip-full %s\n", (dp->skip_full? "YES" : "NO"));
g_printf(" allow-split %s\n", (dp->allow_split ? "YES" : "NO"));
+ if (dumptype_seen(dtype, DUMPTYPE_RECOVERY_LIMIT)) {
+ char **rl, **r1;
+ rl = val_t_display_strs(dumptype_getconf((dtype),
+ DUMPTYPE_RECOVERY_LIMIT), 1);
+ for(r1 = rl; *r1 != NULL; r1++) {
+ g_printf(" recovery-limit %s\n", *r1);
+ free(*r1);
+ }
+ }
g_printf(" spindle %d\n", dp->spindle);
pp_scriptlist = dp->pp_scriptlist;
while (pp_scriptlist != NULL) {
}
{
- dumptype_t *dtype;
char **prop, **p1;;
- dtype = lookup_dumptype(dp->dtype_name);
prop = val_t_display_strs(dumptype_getconf((dtype), DUMPTYPE_PROPERTY),
0);
for(p1 = prop; *p1 != NULL; p1++) {
use warnings;
use Amanda::Util qw( :constants );
-use Amanda::Config qw( :init );
+use Amanda::Config qw( :init :getconf );
use Amanda::Logfile qw( :logtype_t log_add $amanda_log_trace_log );
use Amanda::Debug;
use Amanda::Device qw( :constants );
print "WARNING: Media access mode is WRITE_ONLY; dumps may not be recoverable\n";
}
+ if (getconf_seen($CNF_DEVICE_OUTPUT_BUFFER_SIZE)) {
+ my $dobs = getconf($CNF_DEVICE_OUTPUT_BUFFER_SIZE);
+ my $block_size = $res->{'device'}->property_get("BLOCK_SIZE");
+ if ($block_size * 2 > $dobs) {
+ print "WARNING: DEVICE-OUTPUT-BUFFER-SIZE is not at least twice the block size of the device, it should be increased for better throughput\n";
+ }
+ }
$steps->{'check_overwrite'}->();
};
$finished_cb->();
};
}
-do_check(\&Amanda::MainLoop::quit);
+
+Amanda::MainLoop::call_later(\&do_check, \&Amanda::MainLoop::quit);
Amanda::MainLoop::run();
Amanda::Util::finish_application();
exit($exit_status);
sub usage {
print <<EOF;
-USAGE: amcheckdump config [ --timestamp|-t timestamp ] [-o configoption]*
+USAGE: amcheckdump [ --timestamp|-t timestamp ] [-o configoption]* <conf>
amcheckdump validates Amanda dump images by reading them from storage
volume(s), and verifying archive integrity if the proper tool is locally
available. amcheckdump does not actually compare the data located in the image
START driver date $timestamp
ERROR amdump $msg
EOF
- run_subprocess("$sbindir/amreport", $config_name, '--from-amdump', '-l', $fakelogfile);
+ run_subprocess("$sbindir/amreport", $config_name, '--from-amdump', '-l', $fakelogfile, @config_overrides_opts);
unlink($fakelogfile);
# and we're done here
# logfiles are still around. First, try an amcleanup -p to see if
# the actual processes are already dead
debug("runing amcleanup -p");
- run_subprocess("$sbindir/amcleanup", '-p', $config_name);
+ run_subprocess("$sbindir/amcleanup", '-p', $config_name, @config_overrides_opts);
# and check again
return unless -f $amdump_log_filename || -f $trace_log_filename;
# undef first.. stupid perl.
debug("beginning amdump log");
$amdump_log = undef;
- open($amdump_log, ">", $amdump_log_filename)
+ # Must be opened in append so that all subprocess can write to it.
+ open($amdump_log, ">>", $amdump_log_filename)
or die("could not open amdump log file '$amdump_log_filename': $!");
}
sub do_amreport {
debug("running amreport");
- run_subprocess("$sbindir/amreport", $config_name, '--from-amdump');
+ run_subprocess("$sbindir/amreport", $config_name, '--from-amdump', @config_overrides_opts);
}
sub roll_trace_logs {
sub trim_trace_logs {
debug("trimming old trace logs");
- run_subprocess("$amlibexecdir/amtrmlog", $config_name);
+ run_subprocess("$amlibexecdir/amtrmlog", $config_name, @config_overrides_opts);
}
sub trim_indexes {
debug("trimming old indexes");
- run_subprocess("$amlibexecdir/amtrmidx", $config_name);
+ run_subprocess("$amlibexecdir/amtrmidx", $config_name, @config_overrides_opts);
}
sub roll_amdump_logs {
stralloc((char *)datestamp->data),
g_compare_strings);
}
- g_slist_free_full(all_datestamps);
+ slist_free_full(all_datestamps, g_free);
}
else {
/* otherwise, in batch mode, use all datestamps */
}
}
- g_slist_free_full(datestamp_list);
+ slist_free_full(datestamp_list, g_free);
datestamp_list = NULL;
- g_slist_free_full(holding_list);
+ slist_free_full(holding_list, g_free);
holding_list = NULL;
if(redirect) { /* rename errfile */
}
chupper = (char)toupper(ch);
if (chupper < 'A' || chupper > max_char) {
- g_slist_free_full(r_datestamp_list);
+ slist_free_full(r_datestamp_list, g_free);
r_datestamp_list = NULL;
break;
}
stralloc(datestamps[chupper - 'A']));
} while ((ch = *a++) != '\0');
if (r_datestamp_list && ch == '\0') {
- g_slist_free_full(datestamp_list);
+ slist_free_full(datestamp_list, g_free);
datestamp_list = r_datestamp_list;
break;
}
fflush(stdout); fflush(stderr);
errfile = vstralloc(conf_logdir, "/amflush", NULL);
- if((fderr = open(errfile, O_WRONLY| O_CREAT | O_TRUNC, 0600)) == -1) {
+ if((fderr = open(errfile, O_WRONLY| O_APPEND | O_CREAT | O_TRUNC, 0600)) == -1) {
error(_("could not open %s: %s"), errfile, strerror(errno));
/*NOTREACHED*/
}
my $peer = $ENV{'AMANDA_AUTHENTICATED_PEER'};
if (defined $recovery_limit) { # undef -> no recovery limit
if (!$peer) {
- warning("a recovery limit is specified for this DLE, but no authenticted ".
+ warning("a recovery limit is specified for this DLE, but no authenticated ".
"peer name is available; rejecting request.");
$self->sendmessage("No matching dumps found");
return $self->quit();
$matched = 1;
last;
}
- }
-
- # otherwise use match_host to allow match expressions
- if (match_host($rl, $peer)) {
- $matched = 1;
- last;
+ } else {
+ # otherwise use match_host to allow match expressions
+ if (match_host($rl, $peer)) {
+ $matched = 1;
+ last;
+ }
}
}
if (!$matched) {
my %subcommands;
sub usage {
- print STDERR "Usage: amlabel <conf> <label> [slot <slot-number>] "
- . "[-f] [-o configoption]*\n";
+ print STDERR "Usage: amlabel [-f] [-o configoption]* <conf> <label> [slot <slot-number>]\n";
exit(1);
}
# update the tapelist
$tl->reload(1);
$tl->remove_tapelabel($opt_label);
- $tl->add_tapelabel("0", $opt_label, undef, 1);
+ $tl->add_tapelabel("0", $opt_label, undef, 1, undef, $res->{'barcode'});
$tl->write();
print "Success!\n";
sub Usage {
print STDERR <<END;
-Usage: $0 [[--config] CONFIG] [--hostwidth width] [--diskwidth width]
- [-skipmissed] [--last] [--num0] [--togo0] [--verbose]
+Usage: $0 [--hostwidth width] [--diskwidth width] [--skipmissed]
+ [--last] [--num0] [--togo0] [--verbose] [[--config] CONFIG]
This script generates to standard output an overview of the filesystems
dumped over time and the type of dump done on a particular day, such as
'verbose' => \$opt_verbose)
or Usage();
-if(@ARGV == 1) {
- $opt_config = $ARGV[0];
-} else {
- Usage();
+unless(defined($opt_config)) {
+ if (@ARGV == 1) {
+ $opt_config = $ARGV[0];
+ } else {
+ Usage();
+ }
}
#Initialize configuration
sub usage
{
print <<EOF;
-Usage: amreport conf [--version] [--help] [-o configoption]
+Usage: amreport [--version] [--help] [-o configoption] <conf>
command-line mode options:
[--log=logfile] [--ps=filename] [--text=filename] [--xml=filename]
[--print=printer] [--mail-text=recipient]
my $datestamp =
$report->get_program_info(
- $report->get_flag("amflush_run") ? "amflush" : "planner", "start" );
+ $report->get_flag("amflush_run") ? "amflush" :
+ $report->get_flag("amvault_run") ? "amvault" : "planner", "start" );
$datestamp /= 1000000 if $datestamp > 99999999;
$datestamp = int($datestamp);
}
sub usage() {
- print "amstatus [--config] config [--file amdump_file]\n";
+ print "amstatus [--file amdump_file]\n";
print " [--summary] [--dumping] [--waitdumping] [--waittaper]\n";
print " [--dumpingtape] [--writingtape] [--finished] [--failed]\n";
- print " [--estimate] [--gestimate] [--stats] [--date] [--locale-independent-date-format]\n";
+ print " [--estimate] [--gestimate] [--stats] [--date]\n";
+ print " [--locale-independent-date-format]\n";
+ print " [--config] <config>\n";
exit 0;
}
$finished_cb = sub { exit(1); } if (!$finished_cb or !(ref($finished_cb) eq "CODE"));
print STDERR <<EOF;
-Usage: amtape <conf> <command> {<args>} [-o configoption]*
+Usage: amtape [-o configoption]* <conf> <command> {<args>}
Valid commands are:
EOF
local $Text::Wrap::columns = 80 - 20;
my $line = "slot $sl->{slot}:";
if (!defined($sl->{device_status}) && !defined($sl->{label})) {
$line .= " unknown state";
- } elsif ($sl->{'status'} == Amanda::Changer::SLOT_EMPTY) {
+ } elsif ($sl->{'state'} == Amanda::Changer::SLOT_EMPTY) {
$line .= " empty";
} else {
if (defined $sl->{label}) {
$line .= " label $sl->{label}";
+ } elsif ($sl->{'device_status'} == $DEVICE_STATUS_VOLUME_UNLABELED) {
+ $line .= " blank";
} elsif ($sl->{'device_status'} != $DEVICE_STATUS_SUCCESS) {
$line .= "device error";
} elsif ($sl->{'f_type'} != $Amanda::Header::F_TAPESTART) {
exporting => 0, # is an export in progress?
call_after_export => undef, # call this when export complete
+ config_overrides_opts => $params{'config_overrides_opts'},
# called when the operation is complete, with the exit
# status
log_add_full($L_FINISH, "driver", "fake driver finish");
log_add($L_INFO, "pid-done $$");
- debug("invoking amreport..");
- system("$sbindir/amreport", $self->{'config_name'}, "--from-amdump");
+ my @amreport_cmd = ("$sbindir/amreport", $self->{'config_name'}, "--from-amdump",
+ @{$self->{'config_overrides_opts'}});
+ debug("invoking amreport (" . join(" ", @amreport_cmd) . ")");
+ system(@amreport_cmd);
debug("rolling logfile..");
log_rename($self->{'dst_write_timestamp'});
Amanda::Util::setup_application("amvault", "server", $CONTEXT_CMDLINE);
my $config_overrides = new_config_overrides($#ARGV+1);
+my @config_overrides_opts;
my $opt_quiet = 0;
my $opt_dry_run = 0;
my $opt_fulls_only = 0;
Getopt::Long::Configure(qw{ bundling });
GetOptions(
- 'o=s' => sub { add_config_override_opt($config_overrides, $_[1]); },
+ 'o=s' => sub {
+ push @config_overrides_opts, "-o" . $_[1];
+ add_config_override_opt($config_overrides, $_[1]);
+ },
'q|quiet' => \$opt_quiet,
'n|dry-run' => \$opt_dry_run,
'fulls-only' => \$opt_fulls_only,
opt_dry_run => $opt_dry_run,
quiet => $opt_quiet,
fulls_only => $opt_fulls_only,
- opt_export => $opt_export);
+ opt_export => $opt_export,
+ config_overrides_opts => \@config_overrides_opts);
Amanda::MainLoop::call_later(sub { $vault->run($exit_cb) });
Amanda::MainLoop::run();
static void databuf_init(struct databuf *, int, char *, off_t, off_t);
static int databuf_flush(struct databuf *);
-static int startup_chunker(char *, off_t, off_t, struct databuf *, int *);
-static int do_chunk(int, struct databuf *, int);
+static int startup_chunker(char *, off_t, off_t, struct databuf *, int *, int *);
+static int do_chunk(int, struct databuf *, int, int);
/* we use a function pointer for full_write, so that we can "shim" in
* full_write_with_fake_enospc for testing */
config_overrides_t *cfg_ovr = NULL;
char *cfg_opt = NULL;
char *m;
+ int header_socket;
int data_socket;
/*
}
if ((header_fd = startup_chunker(filename, use, chunksize, &db,
- &data_socket)) < 0) {
+ &header_socket, &data_socket)) < 0) {
q = quote_string(vstrallocf(_("[chunker startup failed: %s]"), errstr));
putresult(TRYAGAIN, "%s %s\n", handle, q);
error("startup_chunker failed: %s", errstr);
}
command_in_transit = NULL;
- if (header_fd >= 0 && do_chunk(header_fd, &db, data_socket)) {
+ if (header_fd >= 0 && do_chunk(header_fd, &db, header_socket, data_socket)) {
char kb_str[NUM_STR_SIZE];
char kps_str[NUM_STR_SIZE];
double rt;
off_t use,
off_t chunksize,
struct databuf * db,
+ int *headersocket,
int *datasocket)
{
int header_fd, outfd;
aclose(data_socket);
return -1;
}
- aclose(header_socket);
tmp_filename = vstralloc(filename, ".tmp", NULL);
pc = strrchr(tmp_filename, '/');
amfree(tmp_filename);
databuf_init(db, outfd, filename, use, chunksize);
db->filename_seq++;
+ *headersocket = header_socket;
*datasocket = data_socket;
return header_fd;
}
do_chunk(
int header_fd,
struct databuf * db,
+ int header_socket,
int data_socket)
{
size_t nread;
* chunk code will rewrite it.
*/
nread = full_read(header_fd, header_buf, SIZEOF(header_buf));
+ aclose(header_fd);
+ aclose(header_socket);
if (nread != sizeof(header_buf)) {
if(errno != 0) {
errstr = vstrallocf(_("cannot read header: %s"), strerror(errno));
aclose(data_socket);
return 0;
}
- aclose(data_socket);
/*
* We've written the file header. Now, just write data until the
db->datain += nread;
while(db->dataout < db->datain) {
if(!databuf_flush(db)) {
+ aclose(data_fd);
+ aclose(data_socket);
return 0;
}
}
}
while(db->dataout < db->datain) {
if(!databuf_flush(db)) {
+ aclose(data_fd);
+ aclose(data_socket);
return 0;
}
}
dumpsize += (off_t)1; /* count partial final KByte */
filesize += (off_t)1;
}
+ aclose(data_fd);
+ aclose(data_socket);
return 1;
}
dumpfile_free_data(&file);
}
- g_slist_free_full(holding_files);
+ slist_free_full(holding_files, g_free);
return matching_files;
}
* the dumpspec list contains a dumpspec with all blank
* entries, all holding files are returned.
*
- * Free the resulting list with g_slist_free_full()
+ * Free the resulting list with slist_free_full()
*
* @param dumpspec_list: a list of dumpspecs
* @returns: a list of holding disk filenames.
headqueue_disk(&directq, diskp);
}
- /* handle any remaining dumps by dumping directly to tape, if possible */
- while(!empty(directq) && taper_fd > 0) {
- time_t sleep_time = 100000000;
- disk_t *sleep_diskp = NULL;
- time_t now = time(0);
-
- /* Find one we can do immediately or the sonner */
- for (diskp = directq.head; diskp != NULL; diskp = diskp->next) {
- if (diskp->to_holdingdisk == HOLD_REQUIRED ||
- degraded_mode) {
- sleep_time = 0;
- sleep_diskp = diskp;
- } else if (diskp->host->start_t - now < sleep_time &&
- diskp->start_t -now < sleep_time) {
- if (diskp->host->start_t > diskp->start_t)
- sleep_time = diskp->host->start_t - now;
- else
- sleep_time = diskp->start_t - now;
- sleep_diskp = diskp;
- }
- }
- diskp = sleep_diskp;
- if (sleep_time > 0)
- sleep(sleep_time);
- remove_disk(&directq, diskp);
+ /* log error for any remaining dumps */
+ while(!empty(directq)) {
+ diskp = dequeue_disk(&directq);
if (diskp->to_holdingdisk == HOLD_REQUIRED) {
char *qname = quote_string(diskp->name);
log_add(L_FAIL, "%s %s %s %d [%s]",
diskp->host->hostname, qname, sched(diskp)->datestamp,
sched(diskp)->level,
- _("can't dump in degraded mode"));
+ _("can't dump in non degraded mode"));
amfree(qname);
}
else {
}
}
- /* fill up the tape or start new one for taperflush */
- startaflush();
- event_loop(0);
-
short_dump_state(); /* for amstatus */
g_printf(_("driver: QUITTING time %s telling children to quit\n"),
} else if (!taper && (holdp =
find_diskspace(sched(diskp)->est_size, cur_idle, NULL)) == NULL) {
*cur_idle = max(*cur_idle, IDLE_NO_DISKSPACE);
- if (empty(tapeq) && dumper_to_holding == 0 && rq != &directq) {
+ if (empty(tapeq) && dumper_to_holding == 0 && rq != &directq && all_taper_idle()) {
remove_disk(rq, diskp);
if (diskp->to_holdingdisk != HOLD_REQUIRED) {
enqueue_disk(&directq, diskp);
diskp->to_holdingdisk = HOLD_NEVER;
}
+ if (empty(*rq)) force_flush = 1;
}
} else if (client_constrained(diskp)) {
free_assignedhd(holdp);
dumper_cmd(dumper, PORT_DUMP, diskp, NULL);
}
diskp->host->start_t = now + 15;
+ if (empty(*rq)) force_flush = 1;
if (result_argv)
g_strfreev(result_argv);
if (strcmp(result_argv[2], "INPUT-ERROR") == 0) {
taper->input_error = newstralloc(taper->input_error, result_argv[4]);
+ taper->result = FAILED;
+ amfree(qname);
+ break;
} else if (strcmp(result_argv[2], "INPUT-GOOD") != 0) {
taper->tape_error = newstralloc(taper->tape_error,
_("Taper protocol error"));
if (strcmp(result_argv[3], "TAPE-ERROR") == 0) {
taper->state &= ~TAPER_STATE_TAPE_STARTED;
taper->tape_error = newstralloc(taper->tape_error, result_argv[5]);
+ taper->result = FAILED;
+ amfree(qname);
+ break;
} else if (strcmp(result_argv[3], "TAPE-GOOD") != 0) {
taper->state &= ~TAPER_STATE_TAPE_STARTED;
taper->tape_error = newstralloc(taper->tape_error,
if (strcmp(result_argv[2], "INPUT-ERROR") == 0) {
taper->input_error = newstralloc(taper->input_error, result_argv[5]);
+ taper->result = FAILED;
+ amfree(qname);
+ break;
} else if (strcmp(result_argv[2], "INPUT-GOOD") != 0) {
taper->tape_error = newstralloc(taper->tape_error,
_("Taper protocol error"));
if (strcmp(result_argv[3], "TAPE-ERROR") == 0) {
taper->state &= ~TAPER_STATE_TAPE_STARTED;
taper->tape_error = newstralloc(taper->tape_error, result_argv[6]);
+ taper->result = FAILED;
+ amfree(qname);
+ break;
} else if (strcmp(result_argv[3], "TAPE-GOOD") != 0) {
taper->state &= ~TAPER_STATE_TAPE_STARTED;
taper->tape_error = newstralloc(taper->tape_error,
dp->inprogress = 0;
deallocate_bandwidth(dp->host->netif, sched(dp)->est_kps);
taper->dumper = NULL;
+ taper->disk = NULL;
sched(dp)->dumper = NULL;
sched(dp)->taper = NULL;
start_some_dumps(&runq);
continue;
}
- if(file.dumplevel < 0 || file.dumplevel > 9) {
+ if (file.dumplevel < 0 || file.dumplevel > 399) {
log_add(L_INFO, _("%s: ignoring file with bogus dump level %d."),
destname, file.dumplevel);
amfree(destname);
if (!nodump) {
schedule_ev_read = event_register((event_id_t)0, EV_READFD,
read_schedule, NULL);
+ } else {
+ force_flush = 1;
}
}
log_add(L_WARNING, _("WARNING: got empty schedule from planner"));
if(need_degraded==1) start_degraded_mode(&runq);
schedule_done = 1;
+ if (empty(runq)) force_flush = 1;
start_some_dumps(&runq);
startaflush();
}
}
// when to start a flush
- // We don't start a flush if taper_tape_started == 1 && dump_to_disk_terminated && force_flush == 0,
- // it is a criteria need to exit the first event_loop without flushing everything to tape,
- // they will be flush in another event_loop.
if (taper->state & TAPER_STATE_IDLE) {
if (!degraded_mode && (!empty(tapeq) || !empty(directq)) &&
- (((taper->state & TAPER_STATE_TAPE_STARTED) &&
- force_flush == 1) || // if tape already started and force_flush
+ (taper->state & TAPER_STATE_TAPE_STARTED || // tape already started
!empty(roomq) || // holding disk constraint
idle_reason == IDLE_NO_DISKSPACE || // holding disk constraint
(my_flush_threshold_dumped < tapeq_size && // flush-threshold-dumped &&
if (origsize >= (off_t)0 && level == info.last_level) {
info.consecutive_runs++;
- } else if (origsize >= (off_t)0 || level < info.last_level) {
+ } else if (origsize >= (off_t)0) {
info.last_level = level;
info.consecutive_runs = 1;
}
static int indexfderror;
static int set_datafd;
static char *dle_str = NULL;
+static char *errfname = NULL;
+static int errf_lines = 0;
static dumpfile_t file;
static void process_dumpline(const char *);
static void add_msg_data(const char *, size_t);
static void parse_info_line(char *);
-static void log_msgout(logtype_t);
+static int log_msgout(logtype_t);
static char * dumper_get_security_conf (char *, void *);
static int runcompress(int, pid_t *, comp_t, char *);
break;
}
g_fprintf(errf, "%s\n", str);
+ errf_lines++;
amfree(buf);
}
}
-static void
+static int
log_msgout(
logtype_t typ)
{
char *line;
+ int count = 0;
fflush(errf);
if (fseeko(errf, 0L, SEEK_SET) < 0) {
dbprintf(_("log_msgout: warning - seek failed: %s\n"), strerror(errno));
}
while ((line = agets(errf)) != NULL) {
+ if (errf_lines >= 100 && count >= 20)
+ break;
if (line[0] != '\0') {
log_add(typ, "%s", line);
}
amfree(line);
+ count++;
+ }
+ amfree(line);
+
+ if (errf_lines >= 100) {
+ log_add(typ, "Look in the '%s' file for full error messages", errfname);
}
- afclose(errf);
+ return errf_lines < 100;
}
/* ------------- */
char *indexfile_tmp = NULL;
char *indexfile_real = NULL;
char level_str[NUM_STR_SIZE];
+ char *time_str;
char *fn;
char *q;
times_t runtime;
double dumptime; /* Time dump took in secs */
- char *errfname = NULL;
pid_t indexpid = -1;
char *m;
+ int to_unlink = 1;
startclock();
fh_init(&file);
g_snprintf(level_str, SIZEOF(level_str), "%d", level);
+ time_str = get_timestamp_from_time(0);
fn = sanitise_filename(diskname);
+ errf_lines = 0;
errfname = newvstralloc(errfname,
- AMANDA_TMPDIR,
- "/", hostname,
+ AMANDA_DBGDIR,
+ "/log.error", NULL);
+ mkdir(errfname, 0700);
+ errfname = newvstralloc(errfname,
+ AMANDA_DBGDIR,
+ "/log.error/", hostname,
".", fn,
".", level_str,
+ ".", time_str,
".errout",
NULL);
amfree(fn);
+ amfree(time_str);
if((errf = fopen(errfname, "w+")) == NULL) {
errstr = newvstrallocf(errstr, "errfile open \"%s\": %s",
errfname, strerror(errno));
amfree(errfname);
goto failed;
}
- unlink(errfname); /* so it goes away on close */
- amfree(errfname);
if (streams[INDEXFD].fd != NULL) {
indexfile_real = getindexfname(hostname, diskname, dumper_timestamp, level);
case 1:
log_start_multiline();
log_add(L_STRANGE, "%s %s %d [%s]", hostname, qdiskname, level, errstr);
- log_msgout(L_STRANGE);
+ to_unlink = log_msgout(L_STRANGE);
log_end_multiline();
break;
}
- if (errf) afclose(errf);
+ if (errf)
+ afclose(errf);
+ if (errfname) {
+ if (to_unlink)
+ unlink(errfname);
+ amfree(errfname);
+ }
if (data_path == DATA_PATH_AMANDA)
aclose(db->fd);
log_add(L_FAIL, _("%s %s %s %d [%s]"), hostname, qdiskname, dumper_timestamp,
level, errstr);
if (errf) {
- log_msgout(L_FAIL);
+ to_unlink = log_msgout(L_FAIL);
}
log_end_multiline();
- if (errf) afclose(errf);
+ if (errf)
+ afclose(errf);
+ if (errfname) {
+ if (to_unlink)
+ unlink(errfname);
+ amfree(errfname);
+ }
if (indexfile_tmp) {
unlink(indexfile_tmp);
STREAM_BUFSIZE, 0, NULL, 0);
if (db->fd == -1) {
errstr = newvstrallocf(errstr,
- _("Can't opendata output stream: %s"),
+ _("Can't open data output stream: %s"),
strerror(errno));
dump_result = 2;
stop_dump();
cmdargs = get_pending_cmd();
if (cmdargs) {
if (cmdargs->cmd != ABORT) {
- error(_("beurk"));
+ error(_("beurk %d"), cmdargs->cmd);
}
amfree(errstr);
errstr = stralloc(cmdargs->argv[1]);
#include "cmdline.h"
int find_match(char *host, char *disk);
-char *find_nicedate(char *datestamp);
+static char *find_nicedate(char *datestamp);
+static int len_find_nicedate(char *datestamp);
static int find_compare(const void *, const void *);
static int parse_taper_datestamp_log(char *logline, char **datestamp, char **level);
static gboolean logfile_has_tape(char * label, char * datestamp,
dumpfile_free_data(&file);
}
- g_slist_free_full(holding_file_list);
+ slist_free_full(holding_file_list, g_free);
}
static int
for(output_find_result=output_find;
output_find_result;
output_find_result=output_find_result->next) {
- char *qdiskname;
char *s;
- len=strlen(find_nicedate(output_find_result->timestamp));
+ len=len_find_nicedate(output_find_result->timestamp);
if((int)len > max_len_datestamp)
max_len_datestamp=(int)len;
if((int)len > max_len_hostname)
max_len_hostname = (int)len;
- qdiskname=quote_string(output_find_result->diskname);
- len=strlen(qdiskname);
- amfree(qdiskname);
+ len = len_quote_string(output_find_result->diskname);
if((int)len > max_len_diskname)
max_len_diskname = (int)len;
if (output_find_result->label != NULL) {
- char *qlabel = quote_string(output_find_result->label);
- len=strlen(qlabel);
- amfree(qlabel);
+ len = len_quote_string(output_find_result->label);
if((int)len > max_len_label)
max_len_label = (int)len;
}
return (dp && dp->todo);
}
-char *
+static char *
find_nicedate(
char *datestamp)
{
return nice;
}
+static int
+len_find_nicedate(
+ char *datestamp)
+{
+ if(strlen(datestamp) <= 8) {
+ return 10;
+ } else {
+ return 19;
+ }
+}
+
static int
parse_taper_datestamp_log(
char *logline,
char *number;
int fileno;
char *current_label = stralloc("");
- char *rest;
+ char *rest, *rest_undo;
char *ck_label=NULL;
int level = 0;
off_t filenum;
find_result_t *a_part_find;
gboolean right_label = FALSE;
gboolean found_something = FALSE;
- regex_t regex;
- int reg_result;
- regmatch_t pmatch[4];
double sec;
off_t kb;
off_t orig_kb;
continue;
}
rest = s - 1;
- if((s = strchr(s, '\n')) != NULL) {
- *s = '\0';
- }
-
- /* extract sec, kb, kps, orig-kb from 'rest', if present. This isn't the stone age
- * anymore, so we'll just do it the easy way (a regex) */
- bzero(®ex, sizeof(regex));
- reg_result = regcomp(®ex,
- "\\[sec ([0-9.]+) kb ([0-9]+) kps [0-9.]+ orig-kb ([0-9]+)\\]", REG_EXTENDED);
- if (reg_result != 0) {
- error("Error compiling regular expression for parsing log lines");
- /* NOTREACHED */
- }
-
- /* an error here just means the line wasn't found -- not fatal. */
- reg_result = regexec(®ex, rest, sizeof(pmatch)/sizeof(*pmatch), pmatch, 0);
- if (reg_result == 0) {
- char *str;
-
- str = find_regex_substring(rest, pmatch[1]);
- sec = atof(str);
- amfree(str);
-
- str = find_regex_substring(rest, pmatch[2]);
- kb = OFF_T_ATOI(str);
- amfree(str);
-
- str = find_regex_substring(rest, pmatch[3]);
- orig_kb = OFF_T_ATOI(str);
- amfree(str);
- } else {
- regfree(®ex);
- bzero(®ex, sizeof(regex));
- /* the .* at the end of this captures the old {wr: .. } statistics */
- reg_result = regcomp(®ex,
- "\\[sec ([0-9.]+) kb ([0-9]+) kps [0-9.]+.*\\]", REG_EXTENDED);
- if (reg_result != 0) {
- error("Error compiling regular expression for parsing log lines");
- /* NOTREACHED */
+ skip_non_whitespace(s, ch);
+ rest_undo = s - 1;
+ *rest_undo = '\0';
+ if (strcmp(rest, "[sec") == 0) {
+ skip_whitespace(s, ch);
+ if(ch == '\0') {
+ g_printf(_("strange log line in %s \"%s\"\n"),
+ logfile, curstr);
+ continue;
+ }
+ sec = atof(s - 1);
+ skip_non_whitespace(s, ch);
+ skip_whitespace(s, ch);
+ rest = s - 1;
+ skip_non_whitespace(s, ch);
+ rest_undo = s - 1;
+ *rest_undo = '\0';
+ if (strcmp(rest, "kb") != 0) {
+ g_printf(_("Bstrange log line in %s \"%s\"\n"),
+ logfile, curstr);
+ continue;
}
- /* an error here just means the line wasn't found -- not fatal. */
- reg_result = regexec(®ex, rest, sizeof(pmatch)/sizeof(*pmatch), pmatch, 0);
- if (reg_result == 0) {
- char *str;
-
- str = find_regex_substring(rest, pmatch[1]);
- sec = atof(str);
- amfree(str);
+ skip_whitespace(s, ch);
+ if (ch == '\0') {
+ g_printf(_("strange log line in %s \"%s\"\n"),
+ logfile, curstr);
+ continue;
+ }
+ kb = atof(s - 1);
+ skip_non_whitespace(s, ch);
+ skip_whitespace(s, ch);
+ rest = s - 1;
+ skip_non_whitespace(s, ch);
+ rest_undo = s - 1;
+ *rest_undo = '\0';
+ if (strcmp(rest, "kps") != 0) {
+ g_printf(_("Cstrange log line in %s \"%s\"\n"),
+ logfile, curstr);
+ continue;
+ }
- str = find_regex_substring(rest, pmatch[2]);
- kb = OFF_T_ATOI(str);
- amfree(str);
+ skip_whitespace(s, ch);
+ if (ch == '\0') {
+ g_printf(_("strange log line in %s \"%s\"\n"),
+ logfile, curstr);
+ continue;
+ }
+ /* kps = atof(s - 1); */
+ skip_non_whitespace(s, ch);
+ skip_whitespace(s, ch);
+ rest = s - 1;
+ skip_non_whitespace(s, ch);
+ rest_undo = s - 1;
+ *rest_undo = '\0';
+ if (strcmp(rest, "orig-kb") != 0) {
orig_kb = 0;
} else {
- sec = 0;
- kb = 0;
- orig_kb = 0;
+
+ skip_whitespace(s, ch);
+ if(ch == '\0') {
+ g_printf(_("strange log line in %s \"%s\"\n"),
+ logfile, curstr);
+ continue;
+ }
+ orig_kb = atof(s - 1);
}
+ } else {
+ sec = 0;
+ kb = 0;
+ orig_kb = 0;
+ *rest_undo = ' ';
}
- if (strncmp(rest, "error ", 6) == 0) rest += 6;
- if (strncmp(rest, "config ", 7) == 0) rest += 7;
- regfree(®ex);
+
+ if (strncmp(rest, "error", 5) == 0) rest += 6;
+ if (strncmp(rest, "config", 6) == 0) rest += 7;
dp = lookup_disk(host,disk);
if ( dp == NULL ) {
dumpfile_free_data(&file);
}
- if (file_list) g_slist_free_full(file_list);
+ if (file_list) slist_free_full(file_list, g_free);
return result_list;
}
dumpfile_free_data(&dfile);
}
- g_slist_free_full(all_files);
+ slist_free_full(all_files, g_free);
return datestamps;
}
amfree(qhname);
dumpfile_free_data(&file);
}
- g_slist_free_full(holding_list);
+ slist_free_full(holding_list, g_free);
holding_list = NULL;
}
g_fprintf(stderr, _("ENDFLUSH\n"));
size = (gint64)10000;
if (size > tapetype_get_length(tape)/2)
size = tapetype_get_length(tape)/2;
- if (size > level0_size/2)
- size = level0_size/2;
+ if (level0_size > 0 && dp->strategy != DS_NOFULL) {
+ if (size > level0_size/2)
+ size = level0_size/2;
+ }
*stats = 0;
}
}
size = (gint64)100000;
if (size > tapetype_get_length(tape)/2)
size = tapetype_get_length(tape)/2;
- if (size > level0_size/2)
- size = level0_size/2;
+ if (level0_size > 0 && dp->strategy != DS_NOFULL) {
+ if (size > level0_size/2)
+ size = level0_size/2;
+ }
*stats = 0;
}
+ } else {
+ char *conf_tapetype = getconf_str(CNF_TAPETYPE);
+ tapetype_t *tape = lookup_tapetype(conf_tapetype);
+ size = (gint64)100000;
+ if (size > tapetype_get_length(tape)/2)
+ size = tapetype_get_length(tape)/2;
}
return size;
g_fprintf(tapef, "%s %s", tp->datestamp, tp->label);
if(tp->reuse) g_fprintf(tapef, " reuse");
else g_fprintf(tapef, " no-reuse");
+ if (tp->barcode)
+ g_fprintf(tapef, " BARCODE:%s", tp->barcode);
if (tp->comment)
g_fprintf(tapef, " #%s", tp->comment);
g_fprintf(tapef, "\n");
s[-1] = '\0';
skip_whitespace(s, ch);
}
+ if (strncmp_const(s - 1, "BARCODE:") == 0) {
+ s1 = s - 1 + 8;
+ skip_non_whitespace(s, ch);
+ s[-1] = '\0';
+ skip_whitespace(s, ch);
+ tp->barcode = stralloc(s1);
+ } else {
+ tp->barcode = NULL;
+ }
+
if (*(s - 1) == '#') {
tp->comment = stralloc(s); /* skip leading '#' */
char * datestamp;
int reuse;
char *label;
+ char *barcode;
char *comment;
} tape_t;
CONFIG_DIR = @CONFIG_DIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
CYGPATH_W = @CYGPATH_W@
DD = @DD@
DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
/* close our pipes and fd's if they're still open */
if (self->pipe[0] != -1) close(self->pipe[0]);
if (self->pipe[1] != -1) close(self->pipe[1]);
- if (self->input_listen_socket != -1) close(self->input_listen_socket);
- if (self->output_listen_socket != -1) close(self->output_listen_socket);
if (self->input_data_socket != -1) close(self->input_data_socket);
if (self->output_data_socket != -1) close(self->output_data_socket);
+ if (self->input_listen_socket != -1) close(self->input_listen_socket);
+ if (self->output_listen_socket != -1) close(self->output_listen_socket);
if (self->read_fd != -1) close(self->read_fd);
if (self->write_fd != -1) close(self->write_fd);