/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
+2013-01-08 Jean-Louis Martineau <martineau@zmanda.com>
+ * VERSION: 3.3.3
+
+2013-01-08 Jean-Louis Martineau <martineau@zmanda.com>
+ * ndmp-src/ndmjob_args.c: Handle more than 1000 arguments.
+
+2013-01-04 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Scan.pm (oldest_reusable_volume): Check the
+ labelstr.
+ * installcheck/Amanda_Taper_Scan.pl: Test it.
+
+2013-01-04 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amrmtape.pl: Do not check the 'log' file.
+
+2012-12-27 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amrmtape.pl: Add the pid on the temporary filename.
+
+2012-12-27 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/util.c (make_amanda_tmpdir): New function to create the
+ AMANDA_TMPDIR directory.
+ * common-src/util.h (make_amanda_tmpdir): Add prototype.
+ * common-src/debug.c (debug_open): Call make_amanda_tmpdir().
+
+2012-12-24 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/driver.c (tape_action): Do not count free tape space if
+ exceed max-dle-by-volume.
+
+2012-12-18 Jean-Louis Martineau <martineau@zmanda.com>
+ * NEWS, ReleaseNotes: Changes in 3.3.3
+
+2012-12-18 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Worker.pm: Ignore duplicate DONE/FAILED messages.
+
+2012-12-13 Dan Locks <dwlocks@zmanda.com>
+ * packaging/common/post_inst_functions.sh: revoke rw permissions for
+ group and other
+ * packaging/common/post_rm_functions.sh: fix function name to match
+ usage.
+ * packaging/common/test_sh_libs.sh: update test.
+
+2012-12-13 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amrmtape.pl: Die if opening CURINFO for writing fail.
+
+2012-12-12 Dan Locks <dwlocks@zmanda.com>
+ * packaging/common/post_inst_functions.sh: don't use uuencode -m for
+ solaris 8 compatibility.
+
+2012-12-11 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Changer/multi.pm, server-src/amcheck-device.pl: Fix perl
+ warning.
+
+2012-12-10 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/logfile.c (log_rename): Donot abort if the log do not
+ exists.
+
+2012-12-10 Jean-Louis Martineau <martineau@zmanda.com>
+ * man/xml-source/amanda-devices.7.xml: Typo, s/SWITF/SWIFT/.
+
+2012-12-10 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amstatus.pl: No src-ip in PORT-DUMP.
+
+2012-12-10 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Scribe.pm: Log FAILED if nothing is written to
+ tape.
+ * server-src/amstatus.pl: Check ntape is defined.
+
+2012-12-07 Dan Locks <dwlocks@zmanda.com>
+ * packaging/common/post_inst_functions.sh: use amandausers's .gnupg/
+ instead of installing user's, and suppress warnings about
+ permissions.
+
+2012-12-07 Dan Locks <dwlocks@zmanda.com>
+ * common_z/post_inst_functions.sh: head and tail invocation may only
+ use "-#", not "-n #" for solaris 8 compatibility
+
+2012-12-07 Jean-Louis Martineau <martineau@zmanda.com>
+ * contrib/convert-zd-mtx-to-robot.sh: set tpchanger instead of
+ tapedev.
+
+2012-12-07 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/driver.c: Fix 32 bits overflow.
+
+2012-12-06 Dan Locks <dwlocks@zmanda.com>
+ * packaging/common/post_inst_functions.sh: use --passphrase-fd to
+ support older versions of gpg.
+
+2012-12-06 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amstatus.pl: Parse new PORT-DUMP format
+
+2012-12-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amstatus.pl: Fix exit status.
+ * installcheck/amstatus.pl: Fix for previous patch.
+
+2012-12-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amstatus.pl: Show taping status after dump failure.
+
+2012-12-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * installcheck/taper.pl: Add check for previous patch.
+
+2012-12-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Worker.pm: Do it at the right place.
+
+2012-12-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Worker.pm: Use header is_partial to get dump
+ status for FILE-WRITE.
+
+2012-12-04 Jean-Louis Martineau <martineau@zmanda.com>
+ * client-src/client_util.c: print script output for backup with the
+ "| " prefix.
+
+2012-12-04 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amvault.pl: Missing return statement.
+
+2012-12-03 Dan Locks <dwlocks@zmanda.com>
+ * packaging/common/post_inst_functions.sh: add get_random_lines() and
+ use it to generate random passwords
+ * packaging/common/test_sh_libs.sh: test and use get_random_lines(),
+ use static log file name, enforce order on tests using
+ (get_random_lines, create_gnupg, create_ampassphrase, and
+ create_amkey.
+ * packaging/deb/postinst.src, packaging/rpm/amanda.spec.src,
+ packaging/sun-pkg/client/postinstall.src: use command -v instead of
+ unportable which.
+
+2012-12-03 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/logfile.c (get_logline): Parse each line separately.
+
+2012-11-28 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/s3.c: Force new connection after RequestTimeout.
+
+2012-11-24 Dan Locks <dwlocks@zmanda.com>
+ * packaging/rpm/amanda.spec.src: fix comparison operator
+
+2012-11-23 Jean-Louis Martineau <martineau@zmanda.com>
+ * installcheck/Amanda_Config.pl, installcheck/Amanda_DB_Catalog.pl,
+ installcheck/Installcheck/Config.pm, perl/Amanda/Report/human.pm,
+ perl/Amanda/Taper/Worker.pm, server-src/amtape.pl: Fix perl warning.
+
+2012-11-23 Dan Locks <dwlocks@zmanda.com>
+ * packaging/rpm/amanda.spec.src: fix awk SuSE detection syntax
+
+2012-11-23 Dan Locks <dwlocks@zmanda.com>
+ * common_z/post_inst_functions.sh: add --no-use-agent option to gpg
+ invocation to avoid problems with uninitialized gpg keyrings.
+
+2012-11-23 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/null-device.c: Return DEVICE_STATUS_VOLUME_UNLABELED |
+ DEVICE_STATUS_VOLUME_ERROR on open for reading.
+ * installcheck/amdevcheck.pl: Fix.
+
+2012-11-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * config/amanda/flags.m4: Swig is always compiled with
+ -Wno-deprecated-declarations
+ * common-src/amflock.h: s/file_lock_/file_lock/
+ * device-src/directtcp-connection.h:
+ s/DirectTCPConnection_/DirectTCPConnection/
+ * ndmp-src/ndmpconnobj.h: s/NDMPConnection_/NDMPConnection/
+ * server-src/cmdline.h: s/dumpspec_s/dumpspec_t/
+
+2012-11-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Cmdline.swg: Undo previous patch.
+
+2012-11-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * config/amanda/libs.m4: remove deprecated warning for glib > 2.34.0
+ * perl/Amanda/Cmdline.swg: s/dumpspec_t/dumpspec_s/
+
+2012-11-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Changer/robot.pm: return 'all slots are empty'.
+ * perl/Amanda/Taper/Scan/traditional.pm: Call _user_msg on error.
+
+2012-11-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Changer/robot.pm: Keep a different current_slot for each
+ config.
+
+2012-11-21 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/bsd-security.c (stream_read_callback): Do not cancel the
+ event in case of successful read.
+ * common-src/security-util.c: Typo.
+
+2012-11-15 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Changer/aggregate.pm, perl/Amanda/Changer/disk.pm,
+ perl/Amanda/Changer/multi.pm,
+ perl/Amanda/Changer/robot.pm: Add LOCK-TIMEOUT property.
+ * perl/Amanda/Changer.pm: Handle lock-timeout property.
+ * man/xml-source/amanda-changers.7.xml: Document new LOCK-TIMEOUT
+ properties.
+
+2012-11-14 Jean-Louis Martineau <martineau@zmanda.com>
+ * application-src/amsamba.pl: Password can be encoded.
+
+2012-11-14 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Report/human.pm: Do not print failure for config
+ setting.
+ * perl/Amanda/Taper/Worker.pm: Send TAPE-CONFIG.
+ * server-src/amflush.c: Do not add L_DISK if nothing to flush.
+ * server-src/amstatus.pl: Parse TAPE-CONFIG and print appropriate
+ message.
+ * server-src/driver.c: Parse TAPE-CONFIG.
+ * installcheck/taper.pl: Check new TAPE-CONFIG in protocol.
+ * installcheck/catalogs/amflush.cat: Fix for new format.
+
+2012-11-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * man/xml-source/amanda-devices.7.xml: Add 'OAUTH2' and 'CASTOR' for
+ value of the storage-api property.
+
+2012-10-25 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/event.c: Disable -Wmissing-field-initializers when using
+ G_STATIC_MUTEX_INIT because of warning with glib-2.32.
+
+2012-10-25 Jean-Louis Martineau <martineau@zmanda.com>
+ * man/xml-source/amfetchdump.8.xml: Document --extract, --directory,
+ --data-path and --application-property.
+
+2012-10-25 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/event.c: Use a GStaticMutex.
+
+2012-10-25 Jean-Louis Martineau <martineau@zmanda.com>
+ * ndmp-src/ndmpconnobj.c: Use a GStaticMutex.
+
+2012-10-24 Jean-Louis Martineau <martineau@zmanda.com>
+ * installcheck/Amanda_Device.pl: Fix count.
+
+2012-10-23 Jean-Louis Martineau <martineau@zmanda.com>
+ * ndmp-src/ndmpconnobj.c: Use event_create and event_activate.
+ Create static notify_data_t.
+
+2012-10-23 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/event.c (event_create, event_activate): New function, it
+ split event_register in two.
+ * common-src/event.h (event_create, event_activate): New prototype.
+
+2012-10-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/device.c (device_accept, device_connect,
+ device_write_from_connection, device_read_to_connection): They take
+ (int *, GMutex *, GCond *) new arguments to be able to interupt
+ them.
+ * device-src/device.h: Change prototype.
+ * device-src/ndmp-device.c: Implement new functionnality.
+ * device-src/xfer-dest-taper-directtcp.c,
+ device-src/xfer-source-recovery.c: Use the new API.
+ * installcheck/Amanda_Device.pl: Remove directtcp test.
+ * ndmp-src/ndmpconnobj.c (ndmp_connection_wait_for_notify_with_cond):
+ Allow to be cancelled.
+ * ndmp-src/ndmpconnobj.h: Change prototype.
+ * perl/Amanda/Device.swg: Remove accept, connect,
+ write_from_connection and read-to_connection.
+
+2012-10-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Scribe.pm (abort_setup): New method.
+ * perl/Amanda/Taper/Scribe.pm (_dump_done): Return if $dump_cb is not
+ set.
+ * perl/Amanda/Taper/Worker.pm: Call abort_setup if setup failed.
+
+2012-10-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amfetchdump.pl: typo, remove '.' in argv.
+
+2012-10-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/dumper.c (do_dump): Make the header file only
+ HEADER_DONE.
+
+2012-10-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Controller.pm: Reverse taper/driver in log.
+
+2012-10-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * ndmp-src/ndmjob_args.c (handle_long_option): Close the fd.
+
+2012-10-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/event.c: Make the code thread safe.
+
+2012-10-19 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/match.c: Handle '=' as first characters of expression.
+ * man/xml-source/amanda-match.7.xml: Document new '=' as first
+ character of expression.
+ * man/xml-source/amadmin.8.xml, man/xml-source/amcheck.8.xml,
+ * man/xml-source/amdump.8.xml, man/xml-source/amfetchdump.8.xml,
+ * man/xml-source/amflush.8.xml, man/xml-source/amrestore.8.xml,
+ * man/xml-source/amvault.8.xml: Document new '--exact-match' argument.
+ * perl/Amanda/Cmdline.swg: Add CMDLINE_EXACT_MATCH
+ * server-src/diskfile.c (match_disklist, match_dumpfile):
+ New exact_match argument.
+ * server-src/diskfile.h (match_disklist, match_dumpfile):
+ Change prototype.
+ * server-src/cmdline.c (cmdline_parse_dumpspecs): CMDLINE_EXACT_MATCH.
+ * server-src/cmdline.h: New CMDLINE_EXACT_MATCH.
+ * server-src/amadmin.c, server-src/amcheck.c,
+ server-src/amdump.pl, server-src/amfetchdump.pl,
+ server-src/amflush.c, server-src/amrestore.pl,
+ server-src/amvault.pl, server-src/planner.c: Add --exact-match
+ argument.
+ * installcheck/Amanda_Cmdline.pl: Check '='.
+ * installcheck/amadmin.pl: Check --exact-match and '='.
+
+2012-10-19 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amfetchdump.pl: Fix for compressed dump.
+
+2012-10-19 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amfetchdump.pl: Add [--extract --directory directory
+ [--data-path (amanda|directtcp)]
+ [--application-property='NAME=VALUE']*]
+ * man/xml-source/amfetchdump.8.xml: Document them.
+ * perl/Amanda/Extract.pm: New utilities torun application from perl.
+ * perl/Makefile.am: Add Amanda/Extract.pm
+ * perl/Amanda/Recovery/Clerk.pm: Small fix.
+
+2012-10-18 Jean-Louis Martineau <martineau@zmanda.com>
+ * All files: Change Zmanda licensing to GPLv2+ and LGPLv2+, Add Zmanda
+ copyright to files modified by Zmanda.
+
+2012-10-15 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/conffile.c: New REPORT-USE-MEDIA and REPORT-NEXT-MEDIA.
+ * common-src/conffile.h: And CNF_REPORT_USE_MEDIA and
+ CNF_REPORT_NEXT_MEDIA
+ * man/xml-source/amanda.conf.5.xml: Document REPORT-USE-MEDIA and
+ REPORT-NEXT-MEDIA.
+ * perl/Amanda/Config.swg: Add CNF_REPORT_USE_MEDIA and
+ CNF_REPORT_NEXT_MEDIA.
+ * perl/Amanda/Report/human.pm: Use them.
+
+2012-10-12 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amstatus.pl (showtime): Use calandar days.
+
+2012-10-12 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Worker.pm: Add data_path to %splitting_args.
+ * perl/Amanda/Taper/Scribe.pm: Correctly set part_* for DIRECTTCP
+ data_path.
+
+2012-10-11 Jean-Louis Martineau <martineau@zmanda.com>
+ * amandad-src/amandad.c: Add a timeout.
+ * common-src/event.c: List all event in debug mode.
+ * common-src/security-util.c: Call the accept_fn on connection close.
+
+2012-10-11 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/amcryptsimple.pl: Add '-z 0' to gpg argument when
+ encrypting.
+
+2012-10-09 Jean-Louis Martineau <martineau@zmanda.com>
+ * oldrecover-src/amrecover.c: Solaris do not have sa_restorer.
+
+2012-10-09 Jean-Louis Martineau <martineau@zmanda.com>
+ * amar-src/amarchiver.c, client-src/selfcheck.c,
+ common-src/bsd-security.c, common-src/util.c,
+ device-src/device.c, device-src/ndmp-device.c,
+ common-src/util.c, device-src/tape-device.c,
+ oldrecover-src/amrecover.c, recover-src/extract_list.c,
+ recover-src/set_commands.c, server-src/diskfile.c,
+ server-src/driver.c: Fix bug found by Coverity.
+
+2012-10-09 Jean-Louis Martineau <martineau@zmanda.com>
+ * example/Makefile.am: Build amanda-CAStor.conf from
+ amanda-CAStor.conf.in
+ * example/template.d/amanda-CAStor.conf: Remove
+ * example/template.d/amanda-CAStor.conf.in: New file.
+
+2012-10-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/security-util.c: Change the security_stream_read callback
+ to not release the event if the read succeed.
+ * amandad-src/amandad.c, common-src/amservice.c,
+ recover-src/extract_list.c, server-src/dumper.c: Do not restart
+ security_stream_read if the read succeeded.
+ * server-src/dumper.c: Handle timeout without starting too much event.
+
+2012-10-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/driver.c (tape_action): Fix handling of
+ taper-parallel-write.
+ * server-src/driver.c: Go in degraded mode only after all taper failed.
+
+2012-10-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amstatus.pl: Fix for TAKE-SCRIBE-FROM command, handle
+ multiple taper status files.
+
+2012-10-02 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amstatus.pl: Fix for (eof) from dumper/chunker or taper.
+
+2012-09-27 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/s3-device.c: Fix reps and reps_bucket name.
+
+2012-09-26 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/conffile.c (get_multiplier): Fix for for CONF_END.
+
+2012-09-25 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/xfer-dest-taper-splitter.c: Do not increase partnum if
+ the size is 0.
+ * installcheck/Amanda_Xfer.pl: Fix partnum check.
+ * perl/Amanda/Taper/Scribe.pm: Improve debugging.
+
+2012-09-25 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Scan/lexical.pm,
+ perl/Amanda/Taper/Scan/oldest.pm: Fix perl warning.
+
+2012-09-24 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Changer/robot.pm: Fix for header not read.
+
+2012-09-24 Jean-Louis Martineau <martineau@zmanda.com>
+ * man/xml-source/amanda.conf.5.xml (part-size): Improve documentation.
+
+2012-09-24 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Taper/Scribe.pm (device_started): Can get non-numeric
+ result.
+
+2012-09-21 Jean-Louis Martineau <martineau@zmanda.com>
+ * man/xml-source/tapelist.5.xml: Add BLOCKSIZE.
+
+2012-09-21 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Tapelist.swg: die() if tapelist is not valid.
+ * server-src/tapefile.c: exit if tapelist is not valid.
+ * installcheck/Amanda_Tapelist.pl: Add more check.
+ * perl/Amanda/Changer.pm: Add $err->device
+ * perl/Amanda/Changer/robot.pm: Return error if barcode do not match
+ with tapelist.
+ * server-src/amtape.pl (inventory): Print if barcode do not match.
+
+2012-09-21 Jean-Louis Martineau <martineau@zmanda.com>
+ * installcheck/Makefile.am (catalogs): Add
+ catalogs/taper-parallel-write.cat.
+
+2012-09-21 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/s3.c: Fix date_sync_regex.
+
+2012-09-20 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amstatus.pl: Fix for taper-parallel-write > 1.
+ * installcheck/amstatus.pl: Checkit.
+ * installcheck/catalogs/taper-parallel-write.cat: New catalog.
+
+2012-09-19 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/s3.c: Castor require libcurl 7.19.1.
+
+2012-09-18 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/s3-device.c, device-src/s3.c: Castor require libcurl
+ 7.19.1.
+
+2012-09-17 Jean-Louis Martineau <martineau@zmanda.com>
+ * device-src/s3-device.c, device-src/s3.c
+ device-src/s3.h: Add CASTOR S3_API.
+ * example/template.d/amanda-CAStor.conf: Example
+ config for castor.
+
+2012-09-17 Jean-Louis Martineau <martineau@zmanda.com>
+ * application-src/amgtar.c: Set gnutar_listdir after the config for
+ the backup set is read.
+
+2012-09-17 Jean-Louis Martineau <martineau@zmanda.com>
+ * common-src/amxml.c (amstart_element): Set data_user->dle->property.
+
+2012-09-05 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amcheckdump.pl: s/correclty/correctly/g
+
+2012-08-24 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Changer/robot.pm: Correctly set f_type and device_error
+ in state.
+ * perl/Amanda/ScanInventory.pm (volume_is_labelable): Set labelstr for
+ does_not_match_labelstr.
+ * perl/Amanda/Taper/Scan/lexical.pm,
+ perl/Amanda/Taper/Scan/oldest.pm (analyze): Check label match
+ labelstr.
+ * server-src/amcheck-device.pl (_user_msg_fn): print message when res
+ is not set.
+ * server-src/amtape.pl: Fix for device returning empty error.
+ * installcheck/Amanda_Changer_ndmp.pl,
+ installcheck/Amanda_Changer_robot.pl: Fix for f_type set.
+
+2012-08-24 Jean-Louis Martineau <martineau@zmanda.com>
+ * installcheck/gnutar.pl: fc17 gnutar is like fc15.
+
+2012-08-24 Jean-Louis Martineau <martineau@zmanda.com>
+ * installcheck/Amanda_Device.pl: Print error if nc, nc6 or netcat is
+ not installed.
+
+2012-08-23 Jean-Louis Martineau <martineau@zmanda.com>
+ * perl/Amanda/Changer/disk.pm: Use the changerfile for the statefile.
+
+2012-08-22 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/amdump.pl: Create amdump.<timestamp>, amdump and amdump.1
+ are maintained as symlink.
+
+2012-08-21 Jean-Louis Martineau <martineau@zmanda.com>
+ * server-src/planner.c (handle_result): Correctly log some error.
+
2012-07-24 Jean-Louis Martineau <martineau@zmanda.com>
* device-src/s3-device.c: New REUSE-CONNECTION property.
* device-src/s3.c: Do not reuse connection if REUSE-CONNECTION is
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# in this file at all, due to limitations of Automake.
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(pkgdatadir)"
DATA = $(pkgdata_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
- { test ! -d "$(distdir)" \
- || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr "$(distdir)"; }; }
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AIX_BACKUP = @AIX_BACKUP@
.SUFFIXES:
.SUFFIXES:
-am--refresh:
+am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(am__configure_deps)
@for dep in $?; do \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-rm -f libtool config.lt
install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
@list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files
+ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
$(am__remove_distdir)
dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__remove_distdir)
dist-lzma: distdir
$(am__remove_distdir)
dist-xz: distdir
- tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
+ chmod -R a-w $(distdir); chmod u+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
- @$(am__cd) '$(distuninstallcheck_dir)' \
- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
installcheck: installcheck-recursive
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
- dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
- dist-zip distcheck distclean distclean-generic \
+ dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \
+ dist-xz dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
+Changes in release 3.3.3
+
+ * amdump.X log files use timestamp instead of number, amdump and amdump.1
+ are maintained as symlink.
+ * chg-disk
+ o Use the changerfile for the statefile.
+ * s3 device
+ o support CASTOR storage
+ * amanda.conf
+ o New REPORT-USE-MEDIA and REPORT-NEXT-MEDIA.
+ * amfetchdump
+ o new --extract, --directory, --data-path and --application-property
+ arguments. It allow to do the extraction on the server.
+ * --exact-match argument to many command, and '=' prefix to expression.
+ o It diable use of expression for host, disk, level and datestamp on
+ command line argument.
+ * All changer scripts.
+ o Add LOCK-TIMEOUT property.
+ * Many bug fix
+
Changes in release 3.3.2
* amgtar
Software
Copyright (c) 1991-1998 University of Maryland at College Park
+Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
All Rights Reserved.
PLEASE NOTE: THIS SOFTWARE IS BEING MADE AVAILABLE "AS-IS". We make
+ Release Notes for amanda-3.3.3
+
+* amdump.X log files use timestamp instead of number, amdump and amdump.1
+ are maintained as symlink.
+* chg-disk
+ o Use the changerfile for the statefile.
+* s3 device
+ o support CASTOR storage
+* amanda.conf
+ o New REPORT-USE-MEDIA and REPORT-NEXT-MEDIA.
+* amfetchdump
+ o new --extract, --directory, --data-path and --application-property
+ arguments. It allow to do the extraction on the server.
+* --exact-match argument to many command, and '=' prefix to expression.
+ o It diable use of expression for host, disk, level and datestamp on
+ command line argument.
+* All changer scripts.
+ o Add LOCK-TIMEOUT property.
+* Many bug fix.
+
+
Release Notes for amanda-3.3.2
* amgtar
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
fi[]dnl
])# PKG_CHECK_MODULES
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.1], [],
+m4_if([$1], [1.11.6], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 10
+# serial 12
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 5
# _AM_MANGLE_OPTION(NAME)
# -----------------------
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_RUN_LOG(COMMAND)
# -------------------
# Run COMMAND, save the exit status in ac_status, and log it.
fi
AC_MSG_RESULT(yes)])
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
+# serial 3
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)"
LTLIBRARIES = $(amlib_LTLIBRARIES)
libamandad_la_DEPENDENCIES = ../common-src/libamanda.la
$(LDFLAGS) -o $@
SOURCES = $(libamandad_la_SOURCES) amandad.c
DIST_SOURCES = $(libamandad_la_SOURCES) amandad.c
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
@list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \
}
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libamandad.la: $(libamandad_la_OBJECTS) $(libamandad_la_DEPENDENCIES)
+libamandad.la: $(libamandad_la_OBJECTS) $(libamandad_la_DEPENDENCIES) $(EXTRA_libamandad_la_DEPENDENCIES)
$(libamandad_la_LINK) -rpath $(amlibdir) $(libamandad_la_OBJECTS) $(libamandad_la_LIBADD) $(LIBS)
install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_PROGRAMS)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-amandad$(EXEEXT): $(amandad_OBJECTS) $(amandad_DEPENDENCIES)
+amandad$(EXEEXT): $(amandad_OBJECTS) $(amandad_DEPENDENCIES) $(EXTRA_amandad_DEPENDENCIES)
@rm -f amandad$(EXEEXT)
$(LINK) $(amandad_OBJECTS) $(amandad_LDADD) $(LIBS)
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
*/
GSList *serviceq = NULL;
-static int wait_30s = 1;
+static event_handle_t *exit_event;
static int exit_on_qlength = 1;
static char *auth = NULL;
static kencrypt_type amandad_kencrypt = KENCRYPT_NONE;
strcasecmp(auth, "ssh") == 0 ||
strcasecmp(auth, "local") == 0 ||
strcasecmp(auth, "bsdtcp") == 0) {
- wait_30s = 0;
exit_on_qlength = 1;
}
* Schedule an event that will try to exit every 30 seconds if there
* are no requests outstanding.
*/
- if(wait_30s)
- (void)event_register((event_id_t)30, EV_TIME, exit_check, &no_exit);
+ exit_event = event_register((event_id_t)30, EV_TIME, exit_check, &no_exit);
/*
* Call event_loop() with an arg of 0, telling it to block until all
if (no_exit)
return;
+ g_debug("timeout exit");
dbclose();
exit(0);
}
/*
* If handle is NULL, then the connection is closed.
*/
- if(handle == NULL) {
+ if (handle == NULL) {
+ if (exit_on_qlength && exit_event) {
+ /* remove the timeout, we will exit once the service terminate */
+ event_release(exit_event);
+ exit_event = NULL;
+ }
return;
}
dbprintf(_("process_writenetfd: dh->fd_write <= 0\n"));
} else if (size > 0) {
full_write(dh->fd_write, buf, (size_t)size);
- security_stream_read(dh->netfd, process_writenetfd, dh);
- }
- else {
+ } else {
aclose(dh->fd_write);
}
}
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(sbindir)"
LTLIBRARIES = $(amlib_LTLIBRARIES)
libamar_la_DEPENDENCIES = ../common-src/libamanda.la
$(amarchiver_SOURCES)
DIST_SOURCES = $(libamar_la_SOURCES) $(amar_test_SOURCES) \
$(amarchiver_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
@list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \
}
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libamar.la: $(libamar_la_OBJECTS) $(libamar_la_DEPENDENCIES)
+libamar.la: $(libamar_la_OBJECTS) $(libamar_la_DEPENDENCIES) $(EXTRA_libamar_la_DEPENDENCIES)
$(libamar_la_LINK) -rpath $(amlibdir) $(libamar_la_OBJECTS) $(libamar_la_LIBADD) $(LIBS)
clean-noinstPROGRAMS:
rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-amar-test$(EXEEXT): $(amar_test_OBJECTS) $(amar_test_DEPENDENCIES)
+amar-test$(EXEEXT): $(amar_test_OBJECTS) $(amar_test_DEPENDENCIES) $(EXTRA_amar_test_DEPENDENCIES)
@rm -f amar-test$(EXEEXT)
$(LINK) $(amar_test_OBJECTS) $(amar_test_LDADD) $(LIBS)
-amarchiver$(EXEEXT): $(amarchiver_OBJECTS) $(amarchiver_DEPENDENCIES)
+amarchiver$(EXEEXT): $(amarchiver_OBJECTS) $(amarchiver_DEPENDENCIES) $(EXTRA_amarchiver_DEPENDENCIES)
@rm -f amarchiver$(EXEEXT)
$(LINK) $(amarchiver_OBJECTS) $(amarchiver_LDADD) $(LIBS)
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
if test "$$failed" -eq 0; then \
- echo "$$grn$$dashes"; \
+ col="$$grn"; \
else \
- echo "$$red$$dashes"; \
+ col="$$red"; \
fi; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes$$std"; \
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
test "$$failed" -eq 0; \
else :; fi
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
{
printf("Usage: amarchiver [--version|--create|--list|--extract] [--verbose]* [--file file]\n");
printf(" [filename]*\n");
+ exit(1);
}
static void
g_fprintf(stderr,"Only one of --create, --list or --extract must be provided\n");
usage();
}
- if (opt_list > 1) {
- if (argc) {
- g_fprintf(stderr, "--list does not take any additional filenames\n");
- usage();
- }
- }
if (opt_create > 0)
do_create(opt_file, opt_verbose, argc, argv);
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(amplotdir)"
SCRIPTS = $(sbin_SCRIPTS)
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DATA = $(amplot_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-sbinSCRIPTS: $(sbin_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+ dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir)
mostlyclean-libtool:
-rm -f *.lo
-rm -rf .libs _libs
install-amplotDATA: $(amplot_DATA)
@$(NORMAL_INSTALL)
- test -z "$(amplotdir)" || $(MKDIR_P) "$(DESTDIR)$(amplotdir)"
@list='$(amplot_DATA)'; test -n "$(amplotdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amplotdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amplotdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(amplot_DATA)'; test -n "$(amplotdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(amplotdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(amplotdir)" && rm -f $$files
+ dir='$(DESTDIR)$(amplotdir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
#
# Amanda, The Advanced Maryland Automatic Network Disk Archiver
# Copyright (c) 1992-1998, 2000 University of Maryland at College Park
+# Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
# All Rights Reserved.
#
# Permission to use, copy, modify, distribute, and sell this software and its
#
# Amanda, The Advanced Maryland Automatic Network Disk Archiver
# Copyright (c) 1992,1993.1994-1998 University of Maryland at College Park
+# Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
# All Rights Reserved.
#
# Permission to use, copy, modify, distribute, and sell this software and its
#!@SHELL@
# Amanda, The Advanced Maryland Automatic Network Disk Archiver
# Copyright (c) 1992-1998 University of Maryland at College Park
+# Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
# All Rights Reserved.
#
# Permission to use, copy, modify, distribute, and sell this software and its
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
SCRIPTS = $(applicationexec_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
$(LDFLAGS) -o $@
SOURCES = amgtar.c amstar.c teecount.c
DIST_SOURCES = amgtar.c amstar.c teecount.c
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_PROGRAMS)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
rm -f $$list
install-applicationexecPROGRAMS: $(applicationexec_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(applicationexecdir)" || $(MKDIR_P) "$(DESTDIR)$(applicationexecdir)"
@list='$(applicationexec_PROGRAMS)'; test -n "$(applicationexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(applicationexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(applicationexecdir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-amgtar$(EXEEXT): $(amgtar_OBJECTS) $(amgtar_DEPENDENCIES)
+amgtar$(EXEEXT): $(amgtar_OBJECTS) $(amgtar_DEPENDENCIES) $(EXTRA_amgtar_DEPENDENCIES)
@rm -f amgtar$(EXEEXT)
$(LINK) $(amgtar_OBJECTS) $(amgtar_LDADD) $(LIBS)
-amstar$(EXEEXT): $(amstar_OBJECTS) $(amstar_DEPENDENCIES)
+amstar$(EXEEXT): $(amstar_OBJECTS) $(amstar_DEPENDENCIES) $(EXTRA_amstar_DEPENDENCIES)
@rm -f amstar$(EXEEXT)
$(LINK) $(amstar_OBJECTS) $(amstar_LDADD) $(LIBS)
-teecount$(EXEEXT): $(teecount_OBJECTS) $(teecount_DEPENDENCIES)
+teecount$(EXEEXT): $(teecount_OBJECTS) $(teecount_DEPENDENCIES) $(EXTRA_teecount_DEPENDENCIES)
@rm -f teecount$(EXEEXT)
$(LINK) $(teecount_OBJECTS) $(teecount_LDADD) $(LIBS)
install-applicationexecSCRIPTS: $(applicationexec_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(applicationexecdir)" || $(MKDIR_P) "$(DESTDIR)$(applicationexecdir)"
@list='$(applicationexec_SCRIPTS)'; test -n "$(applicationexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(applicationexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(applicationexecdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@list='$(applicationexec_SCRIPTS)'; test -n "$(applicationexecdir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(applicationexecdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(applicationexecdir)" && rm -f $$files
+ dir='$(DESTDIR)$(applicationexecdir)'; $(am__uninstall_files_from_dir)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/* parse argument */
command = argv[1];
- gnutar_listdir = stralloc(getconf_str(CNF_GNUTAR_LIST_DIR));
argument.config = NULL;
argument.host = NULL;
argument.message = 0;
g_critical(_("errors processing config file"));
}
+ if (!gnutar_listdir) {
+ gnutar_listdir = g_strdup(getconf_str(CNF_GNUTAR_LIST_DIR));
+ }
+
re_table = build_re_table(init_re_table, normal_message, ignore_message,
strange_message);
#!@PERL@
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#!@PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#!@PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#!@PERL@
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
use Sys::Hostname;
use Symbol;
use IO::Handle;
+use MIME::Base64 ();
use Amanda::Constants;
use Amanda::Config qw( :init :getconf config_dir_relative );
use Amanda::Debug qw( :logging );
$self->{domain} = $domain if defined $domain && $domain ne "";
my ($username, $password) = split('%', $userpasswd, 2);
$self->{username} = $username;
+ if ($password =~ /^6G\!dr(.*)/) {
+ my $base64 = $1;
+ $password = MIME::Base64::decode($base64);
+ }
$self->{password} = $password;
$self->{password} = undef if (defined $password && $password eq "");
} else {
sub command_selfcheck {
my $self = shift;
- $self->print_to_server("disk " . quote_string($self->{disk}));
+ $self->print_to_server("disk " . quote_string($self->{disk}),
+ $Amanda::Script_App::GOOD);
$self->print_to_server("amsamba version " . $Amanda::Constants::VERSION,
$Amanda::Script_App::GOOD);
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
#!@PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#!@PERL@
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#!@PERL@
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#!@PERL@
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amlibexecdir)" \
"$(DESTDIR)$(amlibexecdir)"
SCRIPTS = $(amlibexec_SCRIPTS)
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DATA = $(amlibexec_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files
+ dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir)
mostlyclean-libtool:
-rm -f *.lo
-rm -rf .libs _libs
install-amlibexecDATA: $(amlibexec_DATA)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_DATA)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(amlibexec_DATA)'; test -n "$(amlibexecdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files
+ dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
#
# Amanda, The Advanced Maryland Automatic Network Disk Archiver
# Copyright (c) 1991-1999 University of Maryland at College Park
+# Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
# All Rights Reserved.
#
# Permission to use, copy, modify, distribute, and sell this software and its
#
# Amanda, The Advanced Maryland Automatic Network Disk Archiver
# Copyright (c) 1991-1999 University of Maryland at College Park
+# Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
# All Rights Reserved.
#
# Permission to use, copy, modify, distribute, and sell this software and its
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" \
"$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(sbindir)"
LTLIBRARIES = $(amlib_LTLIBRARIES)
DIST_SOURCES = $(am__libamclient_la_SOURCES_DIST) calcsize.c \
$(getfsent_SOURCES) killpgrp.c noop.c rundump.c runtar.c \
selfcheck.c $(sendbackup_SOURCES) sendsize.c
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
@list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \
}
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libamclient.la: $(libamclient_la_OBJECTS) $(libamclient_la_DEPENDENCIES)
+libamclient.la: $(libamclient_la_OBJECTS) $(libamclient_la_DEPENDENCIES) $(EXTRA_libamclient_la_DEPENDENCIES)
$(libamclient_la_LINK) -rpath $(amlibdir) $(libamclient_la_OBJECTS) $(libamclient_la_LIBADD) $(LIBS)
install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_PROGRAMS)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-calcsize$(EXEEXT): $(calcsize_OBJECTS) $(calcsize_DEPENDENCIES)
+calcsize$(EXEEXT): $(calcsize_OBJECTS) $(calcsize_DEPENDENCIES) $(EXTRA_calcsize_DEPENDENCIES)
@rm -f calcsize$(EXEEXT)
$(LINK) $(calcsize_OBJECTS) $(calcsize_LDADD) $(LIBS)
-getfsent$(EXEEXT): $(getfsent_OBJECTS) $(getfsent_DEPENDENCIES)
+getfsent$(EXEEXT): $(getfsent_OBJECTS) $(getfsent_DEPENDENCIES) $(EXTRA_getfsent_DEPENDENCIES)
@rm -f getfsent$(EXEEXT)
$(LINK) $(getfsent_OBJECTS) $(getfsent_LDADD) $(LIBS)
-killpgrp$(EXEEXT): $(killpgrp_OBJECTS) $(killpgrp_DEPENDENCIES)
+killpgrp$(EXEEXT): $(killpgrp_OBJECTS) $(killpgrp_DEPENDENCIES) $(EXTRA_killpgrp_DEPENDENCIES)
@rm -f killpgrp$(EXEEXT)
$(LINK) $(killpgrp_OBJECTS) $(killpgrp_LDADD) $(LIBS)
-noop$(EXEEXT): $(noop_OBJECTS) $(noop_DEPENDENCIES)
+noop$(EXEEXT): $(noop_OBJECTS) $(noop_DEPENDENCIES) $(EXTRA_noop_DEPENDENCIES)
@rm -f noop$(EXEEXT)
$(LINK) $(noop_OBJECTS) $(noop_LDADD) $(LIBS)
-rundump$(EXEEXT): $(rundump_OBJECTS) $(rundump_DEPENDENCIES)
+rundump$(EXEEXT): $(rundump_OBJECTS) $(rundump_DEPENDENCIES) $(EXTRA_rundump_DEPENDENCIES)
@rm -f rundump$(EXEEXT)
$(LINK) $(rundump_OBJECTS) $(rundump_LDADD) $(LIBS)
-runtar$(EXEEXT): $(runtar_OBJECTS) $(runtar_DEPENDENCIES)
+runtar$(EXEEXT): $(runtar_OBJECTS) $(runtar_DEPENDENCIES) $(EXTRA_runtar_DEPENDENCIES)
@rm -f runtar$(EXEEXT)
$(LINK) $(runtar_OBJECTS) $(runtar_LDADD) $(LIBS)
-selfcheck$(EXEEXT): $(selfcheck_OBJECTS) $(selfcheck_DEPENDENCIES)
+selfcheck$(EXEEXT): $(selfcheck_OBJECTS) $(selfcheck_DEPENDENCIES) $(EXTRA_selfcheck_DEPENDENCIES)
@rm -f selfcheck$(EXEEXT)
$(LINK) $(selfcheck_OBJECTS) $(selfcheck_LDADD) $(LIBS)
-sendbackup$(EXEEXT): $(sendbackup_OBJECTS) $(sendbackup_DEPENDENCIES)
+sendbackup$(EXEEXT): $(sendbackup_OBJECTS) $(sendbackup_DEPENDENCIES) $(EXTRA_sendbackup_DEPENDENCIES)
@rm -f sendbackup$(EXEEXT)
$(LINK) $(sendbackup_OBJECTS) $(sendbackup_LDADD) $(LIBS)
-sendsize$(EXEEXT): $(sendsize_OBJECTS) $(sendsize_DEPENDENCIES)
+sendsize$(EXEEXT): $(sendsize_OBJECTS) $(sendsize_DEPENDENCIES) $(EXTRA_sendsize_DEPENDENCIES)
@rm -f sendsize$(EXEEXT)
$(LINK) $(sendsize_OBJECTS) $(sendsize_LDADD) $(LIBS)
install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files
+ dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir)
install-sbinSCRIPTS: $(sbin_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+ dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
#! @PERL@
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
}
void run_client_script_output(gpointer data, gpointer user_data);
+void run_client_script_output_backup(gpointer data, gpointer user_data);
void run_client_script_err_amcheck(gpointer data, gpointer user_data);
void run_client_script_err_estimate(gpointer data, gpointer user_data);
void run_client_script_err_backup(gpointer data, gpointer user_data);
}
}
+void
+run_client_script_output_backup(
+ gpointer data,
+ gpointer user_data)
+{
+ char *line = data;
+ script_output_t *so = user_data;
+
+ if (line && so->stream) {
+ g_fprintf(so->stream, "| %s\n", line);
+ }
+}
+
void
run_client_script_err_amcheck(
gpointer data,
GSList *scriptlist;
script_t *script;
GFunc client_script_err = NULL;
+ GFunc client_script_out = NULL;
script_output_t so = { streamout, dle };
for (scriptlist = dle->scriptlist; scriptlist != NULL;
scriptlist = scriptlist->next) {
script = (script_t *)scriptlist->data;
run_client_script(script, execute_on, g_options, dle);
- if (script->result && script->result->output) {
- g_ptr_array_foreach(script->result->output,
- run_client_script_output,
- &so);
- g_ptr_array_free(script->result->output, TRUE);
- script->result->output = NULL;
- }
- if (script->result && script->result->err) {
+ if (script->result) {
switch (execute_on) {
case EXECUTE_ON_PRE_DLE_AMCHECK:
case EXECUTE_ON_PRE_HOST_AMCHECK:
case EXECUTE_ON_POST_DLE_AMCHECK:
case EXECUTE_ON_POST_HOST_AMCHECK:
+ client_script_out = run_client_script_output;
client_script_err = run_client_script_err_amcheck;
break;
case EXECUTE_ON_PRE_DLE_ESTIMATE:
case EXECUTE_ON_PRE_HOST_ESTIMATE:
case EXECUTE_ON_POST_DLE_ESTIMATE:
case EXECUTE_ON_POST_HOST_ESTIMATE:
+ client_script_out = run_client_script_output;
if (am_has_feature(g_options->features,
fe_sendsize_rep_warning)) {
client_script_err = run_client_script_err_estimate;
case EXECUTE_ON_PRE_HOST_BACKUP:
case EXECUTE_ON_POST_DLE_BACKUP:
case EXECUTE_ON_POST_HOST_BACKUP:
+ client_script_out = run_client_script_output_backup;
client_script_err = run_client_script_err_backup;
break;
case EXECUTE_ON_PRE_RECOVER:
case EXECUTE_ON_PRE_LEVEL_RECOVER:
case EXECUTE_ON_POST_LEVEL_RECOVER:
case EXECUTE_ON_INTER_LEVEL_RECOVER:
+ client_script_out = run_client_script_output;
client_script_err = run_client_script_err_recover;
}
- if (client_script_err != NULL) {
- g_ptr_array_foreach(script->result->err,
- client_script_err,
- &so);
+ if (script->result->output) {
+ if (client_script_out) {
+ g_ptr_array_foreach(script->result->output,
+ client_script_out,
+ &so);
+ }
+ g_ptr_array_free(script->result->output, TRUE);
+ script->result->output = NULL;
+ }
+ if (script->result->err) {
+ if (client_script_err != NULL) {
+ g_ptr_array_foreach(script->result->err,
+ client_script_err,
+ &so);
+ }
+ g_ptr_array_free(script->result->err, TRUE);
+ script->result->err = NULL;
}
- g_ptr_array_free(script->result->err, TRUE);
- script->result->err = NULL;
}
}
}
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2001 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
FILE *release = fopen("/etc/lsb-release", "r");
distro = "Ubuntu";
if (release) {
- char *result;
- while ((result = fgets(line, 1024, release))) {
+ while (fgets(line, 1024, release)) {
if (strstr(line, "DESCRIPTION")) {
platform = strchr(line, '=');
if (platform) platform++;
if (result) {
platform = line;
}
+ fclose(release);
}
- fclose(release);
}
amfree(uname);
}
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(sbindir)" \
"$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(sbindir)" \
"$(DESTDIR)$(amlibexecdir)"
$(fileheader_test_SOURCES) $(genversion_SOURCES) \
$(hexencode_test_SOURCES) $(ipc_binary_test_SOURCES) \
$(match_test_SOURCES) $(quoting_test_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DATA = $(amlibexec_DATA)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
@list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \
}
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libamanda.la: $(libamanda_la_OBJECTS) $(libamanda_la_DEPENDENCIES)
+libamanda.la: $(libamanda_la_OBJECTS) $(libamanda_la_DEPENDENCIES) $(EXTRA_libamanda_la_DEPENDENCIES)
$(libamanda_la_LINK) -rpath $(amlibdir) $(libamanda_la_OBJECTS) $(libamanda_la_LIBADD) $(LIBS)
-libtestutils.la: $(libtestutils_la_OBJECTS) $(libtestutils_la_DEPENDENCIES)
+libtestutils.la: $(libtestutils_la_OBJECTS) $(libtestutils_la_DEPENDENCIES) $(EXTRA_libtestutils_la_DEPENDENCIES)
$(LINK) $(libtestutils_la_OBJECTS) $(libtestutils_la_LIBADD) $(LIBS)
clean-noinstPROGRAMS:
rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-amflock-test$(EXEEXT): $(amflock_test_OBJECTS) $(amflock_test_DEPENDENCIES)
+amflock-test$(EXEEXT): $(amflock_test_OBJECTS) $(amflock_test_DEPENDENCIES) $(EXTRA_amflock_test_DEPENDENCIES)
@rm -f amflock-test$(EXEEXT)
$(LINK) $(amflock_test_OBJECTS) $(amflock_test_LDADD) $(LIBS)
-amsemaphore-test$(EXEEXT): $(amsemaphore_test_OBJECTS) $(amsemaphore_test_DEPENDENCIES)
+amsemaphore-test$(EXEEXT): $(amsemaphore_test_OBJECTS) $(amsemaphore_test_DEPENDENCIES) $(EXTRA_amsemaphore_test_DEPENDENCIES)
@rm -f amsemaphore-test$(EXEEXT)
$(LINK) $(amsemaphore_test_OBJECTS) $(amsemaphore_test_LDADD) $(LIBS)
-amservice$(EXEEXT): $(amservice_OBJECTS) $(amservice_DEPENDENCIES)
+amservice$(EXEEXT): $(amservice_OBJECTS) $(amservice_DEPENDENCIES) $(EXTRA_amservice_DEPENDENCIES)
@rm -f amservice$(EXEEXT)
$(LINK) $(amservice_OBJECTS) $(amservice_LDADD) $(LIBS)
-bsdsecurity$(EXEEXT): $(bsdsecurity_OBJECTS) $(bsdsecurity_DEPENDENCIES)
+bsdsecurity$(EXEEXT): $(bsdsecurity_OBJECTS) $(bsdsecurity_DEPENDENCIES) $(EXTRA_bsdsecurity_DEPENDENCIES)
@rm -f bsdsecurity$(EXEEXT)
$(LINK) $(bsdsecurity_OBJECTS) $(bsdsecurity_LDADD) $(LIBS)
-event-test$(EXEEXT): $(event_test_OBJECTS) $(event_test_DEPENDENCIES)
+event-test$(EXEEXT): $(event_test_OBJECTS) $(event_test_DEPENDENCIES) $(EXTRA_event_test_DEPENDENCIES)
@rm -f event-test$(EXEEXT)
$(LINK) $(event_test_OBJECTS) $(event_test_LDADD) $(LIBS)
-file$(EXEEXT): $(file_OBJECTS) $(file_DEPENDENCIES)
+file$(EXEEXT): $(file_OBJECTS) $(file_DEPENDENCIES) $(EXTRA_file_DEPENDENCIES)
@rm -f file$(EXEEXT)
$(LINK) $(file_OBJECTS) $(file_LDADD) $(LIBS)
-fileheader-test$(EXEEXT): $(fileheader_test_OBJECTS) $(fileheader_test_DEPENDENCIES)
+fileheader-test$(EXEEXT): $(fileheader_test_OBJECTS) $(fileheader_test_DEPENDENCIES) $(EXTRA_fileheader_test_DEPENDENCIES)
@rm -f fileheader-test$(EXEEXT)
$(LINK) $(fileheader_test_OBJECTS) $(fileheader_test_LDADD) $(LIBS)
-genversion$(EXEEXT): $(genversion_OBJECTS) $(genversion_DEPENDENCIES)
+genversion$(EXEEXT): $(genversion_OBJECTS) $(genversion_DEPENDENCIES) $(EXTRA_genversion_DEPENDENCIES)
@rm -f genversion$(EXEEXT)
$(LINK) $(genversion_OBJECTS) $(genversion_LDADD) $(LIBS)
-hexencode-test$(EXEEXT): $(hexencode_test_OBJECTS) $(hexencode_test_DEPENDENCIES)
+hexencode-test$(EXEEXT): $(hexencode_test_OBJECTS) $(hexencode_test_DEPENDENCIES) $(EXTRA_hexencode_test_DEPENDENCIES)
@rm -f hexencode-test$(EXEEXT)
$(LINK) $(hexencode_test_OBJECTS) $(hexencode_test_LDADD) $(LIBS)
-ipc-binary-test$(EXEEXT): $(ipc_binary_test_OBJECTS) $(ipc_binary_test_DEPENDENCIES)
+ipc-binary-test$(EXEEXT): $(ipc_binary_test_OBJECTS) $(ipc_binary_test_DEPENDENCIES) $(EXTRA_ipc_binary_test_DEPENDENCIES)
@rm -f ipc-binary-test$(EXEEXT)
$(LINK) $(ipc_binary_test_OBJECTS) $(ipc_binary_test_LDADD) $(LIBS)
-match-test$(EXEEXT): $(match_test_OBJECTS) $(match_test_DEPENDENCIES)
+match-test$(EXEEXT): $(match_test_OBJECTS) $(match_test_DEPENDENCIES) $(EXTRA_match_test_DEPENDENCIES)
@rm -f match-test$(EXEEXT)
$(LINK) $(match_test_OBJECTS) $(match_test_LDADD) $(LIBS)
-quoting-test$(EXEEXT): $(quoting_test_OBJECTS) $(quoting_test_DEPENDENCIES)
+quoting-test$(EXEEXT): $(quoting_test_OBJECTS) $(quoting_test_DEPENDENCIES) $(EXTRA_quoting_test_DEPENDENCIES)
@rm -f quoting-test$(EXEEXT)
$(LINK) $(quoting_test_OBJECTS) $(quoting_test_LDADD) $(LIBS)
install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files
+ dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir)
install-sbinSCRIPTS: $(sbin_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+ dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -rf .libs _libs
install-amlibexecDATA: $(amlibexec_DATA)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_DATA)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(amlibexec_DATA)'; test -n "$(amlibexecdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files
+ dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
if test "$$failed" -eq 0; then \
- echo "$$grn$$dashes"; \
+ col="$$grn"; \
else \
- echo "$$red$$dashes"; \
+ col="$$red"; \
fi; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes$$std"; \
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
test "$$failed" -eq 0; \
else :; fi
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
#
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
#
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
sub encrypt() {
my $gpg_agent_cmd = do_gpg_agent();
my $gpg = which_gpg();
- system "$gpg_agent_cmd $gpg --batch --no-secmem-warning --disable-mdc --symmetric --cipher-algo AES256 --passphrase-fd 3 3<$AM_PASS";
+ system "$gpg_agent_cmd $gpg --batch -z 0 --no-secmem-warning --disable-mdc --symmetric --cipher-algo AES256 --passphrase-fd 3 3<$AM_PASS";
if ($? == -1) {
print STDERR "failed to execute gpg: $!\n";
exit (1);
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* New interface
*/
-typedef struct file_lock_ {
+typedef struct file_lock {
/* the entire contents of the locked file */
char *data;
size_t len;
#! @PERL@
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
void *cookie G_GNUC_UNUSED)
{
size_t nread;
- char buf[1024];
+ char buf[1025];
- event_release(event_in);
nread = read(0, buf, 1024);
- if (nread == 0) {
+ if (nread <= 0) {
+ event_release(event_in);
security_stream_close(fd);
return;
}
buf[nread] = '\0';
security_stream_write(fd, buf, nread);
- event_in = event_register((event_id_t)0, EV_READFD, read_in, NULL);
}
static void
if (errno > 0) {
g_debug("failed to write to stdout: %s", strerror(errno));
}
- security_stream_read(fd, read_server, NULL);
break;
}
}
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
g_hash_table_new_full(g_str_hash, g_str_equal, &g_free, &free_property_t);
data_user->script = NULL;
data_user->alevel = NULL;
+ data_user->dle->property = data_user->property;
data_user->encoding = NULL;
data_user->raw = NULL;
} else if(strcmp(element_name, "disk" ) == 0 ||
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
security_stream_seterror(&bs->secstr, "%s", strerror(errno));
bs->len = n;
sync_pktlen = bs->len;
- sync_pkt = malloc(sync_pktlen);
- memcpy(sync_pkt, bs->databuf, sync_pktlen);
+ if (sync_pktlen > 0) {
+ sync_pkt = malloc(sync_pktlen);
+ memcpy(sync_pkt, bs->databuf, sync_pktlen);
+ } else {
+ sync_pkt = NULL;
+ }
}
/*
assert(bs != NULL);
- /*
- * Remove the event first, in case they reschedule it in the callback.
- */
- bsd_stream_read_cancel(bs);
do {
n = read(bs->fd, bs->databuf, SIZEOF(bs->databuf));
} while ((n < 0) && ((errno == EINTR) || (errno == EAGAIN)));
+ if (n <= 0)
+ bsd_stream_read_cancel(bs);
if (n < 0)
security_stream_seterror(&bs->secstr, "%s", strerror(errno));
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
CONF_DATA_PATH, CONF_AMANDA, CONF_DIRECTTCP,
CONF_TAPER_PARALLEL_WRITE, CONF_INTERACTIVITY, CONF_TAPERSCAN,
CONF_MAX_DLE_BY_VOLUME, CONF_EJECT_VOLUME, CONF_TMPDIR,
+ CONF_REPORT_USE_MEDIA, CONF_REPORT_NEXT_MEDIA,
/* execute on */
CONF_PRE_AMCHECK, CONF_POST_AMCHECK,
{ "RECORD", CONF_RECORD },
{ "RECOVERY_LIMIT", CONF_RECOVERY_LIMIT },
{ "REP_TRIES", CONF_REP_TRIES },
+ { "REPORT_USE_MEDIA", CONF_REPORT_USE_MEDIA },
+ { "REPORT_NEXT_MEDIA", CONF_REPORT_NEXT_MEDIA },
{ "REQ_TRIES", CONF_REQ_TRIES },
{ "REQUIRED", CONF_REQUIRED },
{ "RESERVE", CONF_RESERVE },
{ CONF_RECOVERY_LIMIT , CONFTYPE_HOST_LIMIT, read_host_limit , CNF_RECOVERY_LIMIT , NULL },
{ CONF_INTERACTIVITY , CONFTYPE_STR , read_dinteractivity, CNF_INTERACTIVITY , NULL },
{ CONF_TAPERSCAN , CONFTYPE_STR , read_dtaperscan , CNF_TAPERSCAN , NULL },
+ { CONF_REPORT_USE_MEDIA , CONFTYPE_BOOLEAN , read_bool , CNF_REPORT_USE_MEDIA , NULL },
+ { CONF_REPORT_NEXT_MEDIA , CONFTYPE_BOOLEAN , read_bool , CNF_REPORT_NEXT_MEDIA , NULL },
{ CONF_UNKNOWN , CONFTYPE_INT , NULL , CNF_CNF , NULL }
};
/* get multiplier, if any */
get_conftoken(CONF_ANY);
- if (tok == CONF_MULT1 && unit == CONF_UNIT_K) {
+ if (tok == CONF_NL || tok == CONF_END) { /* no multiplier */
+ val = val;
+ } else if (tok == CONF_MULT1 && unit == CONF_UNIT_K) {
val /= 1024;
- } else if (tok == CONF_NL || tok == CONF_MULT1 ||
+ } else if (tok == CONF_MULT1 ||
(tok == CONF_MULT1K && unit == CONF_UNIT_K)) {
val *= 1; /* multiply by one */
} else if (tok == CONF_MULT7) {
conf_init_str (&conf_data[CNF_KRB5PRINCIPAL] , "service/amanda");
conf_init_str (&conf_data[CNF_LABEL_NEW_TAPES] , "");
conf_init_bool (&conf_data[CNF_EJECT_VOLUME] , 0);
+ conf_init_bool (&conf_data[CNF_REPORT_USE_MEDIA] , TRUE);
+ conf_init_bool (&conf_data[CNF_REPORT_NEXT_MEDIA] , TRUE);
conf_init_str (&conf_data[CNF_TMPDIR] , "");
conf_init_bool (&conf_data[CNF_USETIMESTAMPS] , 1);
conf_init_int (&conf_data[CNF_CONNECT_TRIES] , CONF_UNIT_NONE, 3);
autolabel->autolabel = AL_VOLUME_ERROR | AL_EMPTY;
}
}
+
+ if (!getconf_seen(CNF_REPORT_USE_MEDIA) &&
+ getconf_seen(CNF_MAX_DLE_BY_VOLUME)) {
+ conf_init_bool(&conf_data[CNF_REPORT_USE_MEDIA], FALSE);
+ }
+ if (!getconf_seen(CNF_REPORT_NEXT_MEDIA) &&
+ getconf_seen(CNF_MAX_DLE_BY_VOLUME)) {
+ conf_init_bool(&conf_data[CNF_REPORT_NEXT_MEDIA], FALSE);
+ }
}
/* fill in the debug_* values */
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
CNF_MAX_DLE_BY_VOLUME,
CNF_EJECT_VOLUME,
CNF_TMPDIR,
+ CNF_REPORT_USE_MEDIA,
+ CNF_REPORT_NEXT_MEDIA,
CNF_CNF /* sentinel */
} confparm_key;
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
char *s = NULL;
mode_t mask;
+ /* create AMANDA_TMPDIR */
+ make_amanda_tmpdir();
+
/* set up logging while we're here */
debug_setup_logging();
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/* A list of all extant event_handle objects, used for searching for particular
* events and for deleting dead events */
-GSList *all_events;
+GSList *all_events = NULL;
+
+#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 31))
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
+GStaticMutex event_mutex = G_STATIC_MUTEX_INIT;
+#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 31))
+# pragma GCC diagnostic pop
+#endif
/*
* Utility functions
void *arg)
{
event_handle_t *handle;
- GIOCondition cond;
+
+ handle = event_create(data, type, fn, arg);
+ event_activate(handle);
+ return handle;
+}
+
+event_handle_t *
+event_create(
+ event_id_t data,
+ event_type_t type,
+ event_fn_t fn,
+ void *arg)
+{
+ event_handle_t *handle;
+
+ g_static_mutex_lock(&event_mutex);
/* sanity-checking */
if ((type == EV_READFD) || (type == EV_WRITEFD)) {
event_debug(1, _("event: register: %p->data=%jd, type=%s\n"),
handle, handle->data, event_type2str(handle->type));
+ g_static_mutex_unlock(&event_mutex);
+ return handle;
+}
+
+void
+event_activate(
+ event_handle_t *handle)
+{
+ GIOCondition cond;
+ assert(handle != NULL);
+
+ g_static_mutex_lock(&event_mutex);
+
/* add to the list of events */
all_events = g_slist_prepend(all_events, (gpointer)handle);
/* and set up the GSource for this event */
- switch (type) {
+ switch (handle->type) {
case EV_READFD:
case EV_WRITEFD:
/* create a new source */
- if (type == EV_READFD) {
+ if (handle->type == EV_READFD) {
cond = G_IO_IN | G_IO_HUP | G_IO_ERR;
} else {
cond = G_IO_OUT | G_IO_ERR;
}
- handle->source = new_fdsource(data, cond);
+ handle->source = new_fdsource(handle->data, cond);
/* attach it to the default GMainLoop */
g_source_attach(handle->source, NULL);
case EV_TIME:
/* Glib provides a nice shortcut for timeouts. The *1000 converts
* seconds to milliseconds. */
- handle->source_id = g_timeout_add(data * 1000, event_handle_callback,
+ handle->source_id = g_timeout_add(handle->data * 1000, event_handle_callback,
(gpointer)handle);
/* But it doesn't give us the source directly.. */
break;
default:
- error(_("Unknown event type %s"), event_type2str(type));
+ error(_("Unknown event type %s"), event_type2str(handle->type));
}
- return handle;
+ g_static_mutex_unlock(&event_mutex);
+ return;
}
+
/*
* Mark an event to be released. Because we may be traversing the queue
* when this is called, we must wait until later to actually remove
{
assert(handle != NULL);
+ g_static_mutex_lock(&event_mutex);
event_debug(1, _("event: release (mark): %p data=%jd, type=%s\n"),
handle, handle->data,
event_type2str(handle->type));
/* Mark it as dead and leave it for the event_loop to remove */
handle->is_dead = TRUE;
+ g_static_mutex_unlock(&event_mutex);
}
/*
GSList *tofire = NULL;
int nwaken = 0;
+ g_static_mutex_lock(&event_mutex);
event_debug(1, _("event: wakeup: enter (%jd)\n"), id);
/* search for any and all matching events, and record them. This way
event_handle_t *eh = (event_handle_t *)iter->data;
if (eh->type == EV_WAIT && eh->data == id && !eh->is_dead) {
event_debug(1, _("A: event: wakeup triggering: %p id=%jd\n"), eh, id);
+ /* The lcok must be release before running the event */
+ g_static_mutex_unlock(&event_mutex);
fire(eh);
+ g_static_mutex_lock(&event_mutex);
nwaken++;
}
}
/* and free the temporary list */
g_slist_free(tofire);
+ g_static_mutex_unlock(&event_mutex);
return (nwaken);
}
any_mainloop_events(void)
{
GSList *iter;
+ gboolean ret = FALSE;
for (iter = all_events; iter != NULL; iter = g_slist_next(iter)) {
event_handle_t *hdl = (event_handle_t *)iter->data;
event_debug(2, _("list %p: %s/%jd\n"), hdl, event_type2str((hdl)->type), (hdl)->data);
if (hdl->type != EV_WAIT)
- return TRUE;
+ ret = TRUE;
}
- return FALSE;
+ return ret;
}
static void
event_handle_t *wait_eh,
int nonblock)
{
+ g_static_mutex_lock(&event_mutex);
event_debug(1, _("event: loop: enter: nonblockg=%d, eh=%p\n"), nonblock, wait_eh);
/* If we're waiting for a specific event, then reset its has_fired flag */
if (!any_mainloop_events())
break;
- /* Do an interation */
+ /* Do an iteration */
+ /* Relese the lock before running an iteration */
+ g_static_mutex_unlock(&event_mutex);
g_main_context_iteration(NULL, !nonblock);
+ g_static_mutex_lock(&event_mutex);
/* If the event we've been waiting for has fired or been released, as
* appropriate, we're done. See the comments for event_wait in event.h
* has been released. */
flush_dead_events(NULL);
+ g_static_mutex_unlock(&event_mutex);
}
GMainLoop *
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* caller calling event_loop() often enough.
*/
event_handle_t *event_register(event_id_t, event_type_t, event_fn_t, void *);
+event_handle_t *event_create(event_id_t, event_type_t, event_fn_t, void *);
+void event_activate(event_handle_t *);
/*
* Release an event handler.
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1997-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1997-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Copyright (c) 2010-2012 Zmanda Inc. All Rights Reserved.
*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License version 2.1 as
- * published by the Free Software Foundation.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* file named AUTHORS, in the root directory of this distribution.
*/
/*
- * $Id: genversion.c 2031 2009-07-09 14:44:32Z djmitche $
+ * $Id: genversion.c 4946 2012-10-18 11:15:16Z martinea $
*
* dump the current Amanda version info
*/
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) Zmanda Inc. All Rights Reserved.
*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License version 2.1 as
- * published by the Free Software Foundation.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2010-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
char *lglob, *lhost;
int ret;
+ if (*glob == '=') {
+ return strcmp(glob+1, host) == 0;
+ }
lglob = g_ascii_strdown(glob, -1);
lhost = g_ascii_strdown(host, -1);
gboolean windows_share = !(strncmp(disk, "\\\\", 2) || strchr(disk, '/'));
+ if (*glob == '=') {
+ return strcmp(glob+1, disk) == 0;
+ }
+
if (windows_share) {
glob2 = convert_winglob_to_unix(glob);
disk2 = convert_unc_to_unix(disk);
goto illegal;
}
+ if (*dateexp == '=') {
+ return strcmp(dateexp+1, datestamp) == 0;
+ }
+
/* strip and ignore an initial "^" */
if(dateexp[0] == '^') {
strncpy(mydateexp, dateexp+1, sizeof(mydateexp)-1);
/*NOTREACHED*/
}
+ if (*levelexp == '=') {
+ return strcmp(levelexp+1, level) == 0;
+ }
+
if(levelexp[0] == '^') {
strncpy(mylevelexp, levelexp+1, strlen(levelexp)-1);
mylevelexp[strlen(levelexp)-1] = '\0';
/*
* Copyright (c) 2010-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* If no accept handler was setup, then just return.
*/
if (udp->accept_fn == NULL) {
- dbprintf(_("Receive packet from unknown source"));
+ g_debug(_("Receive packet from unknown source"));
return;
}
* We remove it first because we don't want to get in their
* way if they reschedule it.
*/
- tcpm_stream_read_cancel(rs);
if (rs->rc->pktlen <= 0) {
auth_debug(1, _("sec: stream_read_callback: %s\n"), rs->rc->errmsg);
+ tcpm_stream_read_cancel(rs);
security_stream_seterror(&rs->secstr, "%s", rs->rc->errmsg);
if(rs->closed_by_me == 0 && rs->closed_by_network == 0)
sec_tcp_conn_put(rs->rc);
assert(cookie != NULL);
- auth_debug(1, _("sec: conn_read_callback\n"));
+ auth_debug(1, _("sec: conn_read_callback %d %d\n"), (int)rc->event_id, rc->read);
/* Read the data off the wire. If we get errors, shut down. */
rval = tcpm_recv_token(rc, rc->read, &rc->handle, &rc->errmsg, &rc->pkt,
revent);
/* delete our 'accept' reference */
if (rc->accept_fn != NULL) {
+ (*rc->accept_fn)(NULL, NULL);
if(rc->refcnt != 1) {
dbprintf(_("STRANGE, rc->refcnt should be 1, it is %d\n"),
rc->refcnt);
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
-#define BUILT_REV "4847"
-#define BUILT_BRANCH "community_3_3_2"
+#define BUILT_REV "5099"
+#define BUILT_BRANCH "community_3_3_3"
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
{
int infd, outfd;
int save_errno;
- size_t nb;
+ ssize_t nb;
char buf[32768];
char *quoted;
}
while((nb=read(infd, &buf, SIZEOF(buf))) > 0) {
- if(full_write(outfd,&buf,nb) < nb) {
+ if(full_write(outfd,&buf,nb) < (size_t)nb) {
save_errno = errno;
quoted = quote_string(dst);
*errmsg = vstrallocf(_("Error writing to '%s': %s"),
out = fdopen(outpipe[0],"r");
err = fdopen(errpipe[0],"r");
- output_string = agets(out);
- if (!output_string)
- output_string = agets(err);
+ if (out) {
+ output_string = agets(out);
+ fclose(out);
+ }
- fclose(out);
- fclose(err);
+ if (err) {
+ if (!output_string)
+ output_string = agets(err);
+ fclose(err);
+ }
waitpid(pid, NULL, 0);
return output_string;
}
+gboolean
+make_amanda_tmpdir(void)
+{
+ struct stat stat_buf;
+
+ if (stat(AMANDA_TMPDIR, &stat_buf) != 0) {
+ if (errno != ENOENT) {
+ g_debug("Error doing a stat of AMANDA_TMPDIR (%s): %s", AMANDA_TMPDIR, strerror(errno));
+ return FALSE;
+ }
+ /* create it */
+ if (mkdir(AMANDA_TMPDIR,0700) != 0) {
+ g_debug("Error mkdir of AMANDA_TMPDIR (%s): %s", AMANDA_TMPDIR, strerror(errno));
+ return FALSE;
+ }
+ if (chown(AMANDA_TMPDIR, (int)get_client_uid(), (int)get_client_gid()) < 0) {
+ g_debug("Error chown of AMANDA_TMPDIR (%s): %s", AMANDA_TMPDIR, strerror(errno));
+ return FALSE;
+ }
+ return TRUE;
+ } else {
+ /* check permission */
+ return TRUE;
+ }
+}
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/* execute the program and get the first line from stdout ot stderr */
char *get_first_line(GPtrArray *argv_ptr);
+
+gboolean make_amanda_tmpdir(void);
+
#endif /* UTIL_H */
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX_BACKUP = @AIX_BACKUP@
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(srcdir)/amanda/file-list $(srcdir)/gettext-macros/file-list $(srcdir)/gnulib/file-list $(srcdir)/macro-archive/file-list $(srcdir)/automake/file-list:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
- else :; fi
+ @if test ! -f $@; then rm -f stamp-h1; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
[
case "$enableval" in
"" | y | ye | yes)
- AMANDA_SWIG_PERL_CFLAGS=-Werror
+ AMANDA_SWIG_PERL_CFLAGS=-Werror -Wno-deprecated-declarations
;;
*n | no)
AMANDA_SWIG_PERL_CFLAGS=
fi
fi
+ # remove deprecated warning for newer version
+ if $PKG_CONFIG --atleast-version 2.30.0 glib-2.0; then
+ AMANDA_DISABLE_GCC_WARNING(deprecated-declarations)
+ fi
+
# GLIB_CPPFLAGS is not set by autoconf, yet GLIB_CFLAGS contains what GLIB_CPPFLAGS should contain.
AMANDA_ADD_CPPFLAGS($GLIB_CFLAGS)
AMANDA_ADD_LIBS($GLIB_LIBS)
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for amanda 3.3.2.
+# Generated by GNU Autoconf 2.68 for amanda 3.3.3.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# Identity of this package.
PACKAGE_NAME='amanda'
PACKAGE_TARNAME='amanda'
-PACKAGE_VERSION='3.3.2'
-PACKAGE_STRING='amanda 3.3.2'
+PACKAGE_VERSION='3.3.3'
+PACKAGE_STRING='amanda 3.3.3'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
+am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures amanda 3.3.2 to adapt to many kinds of systems.
+\`configure' configures amanda 3.3.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of amanda 3.3.2:";;
+ short | recursive ) echo "Configuration of amanda 3.3.3:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-amanda configure 3.3.2
+amanda configure 3.3.3
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by amanda $as_me 3.3.2, which was
+It was created by amanda $as_me 3.3.3, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='amanda'
- VERSION='3.3.2'
+ VERSION='3.3.3'
cat >>confdefs.h <<_ACEOF
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
enableval=$enable_swig_error;
case "$enableval" in
"" | y | ye | yes)
- AMANDA_SWIG_PERL_CFLAGS=-Werror
+ AMANDA_SWIG_PERL_CFLAGS=-Werror -Wno-deprecated-declarations
;;
*n | no)
AMANDA_SWIG_PERL_CFLAGS=
fi
fi
+ # remove deprecated warning for newer version
+ if $PKG_CONFIG --atleast-version 2.30.0 glib-2.0; then
+
+ # test for -W'warning', then add the 'no-' version.
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc flag -Wdeprecated-declarations" >&5
+$as_echo_n "checking for gcc flag -Wdeprecated-declarations... " >&6; }
+ if test "x$GCC" = "xyes"; then
+ (gcc --help={target,optimizers,warnings,undocumented,params,c} 2>&1 ||
+ $CC -v --help 2>&1) |
+ $EGREP -- '[^[:alnum:]]-Wdeprecated-declarations[^[:alnum:]-]' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ found_warning=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ found_warning=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ else
+ found_warning=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (not using gcc)" >&5
+$as_echo "no (not using gcc)" >&6; }
+ fi
+
+ if test x"$found_warning" = x"yes"; then
+ AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wno-deprecated-declarations"
+
+
+ else
+ :
+ fi
+
+
+ fi
+
# GLIB_CPPFLAGS is not set by autoconf, yet GLIB_CFLAGS contains what GLIB_CPPFLAGS should contain.
CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by amanda $as_me 3.3.2, which was
+This file was extended by amanda $as_me 3.3.3, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-amanda config.status 3.3.2
+amanda config.status 3.3.3
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(sbindir)" \
"$(DESTDIR)$(sbindir)" "$(DESTDIR)$(amincludedir)"
LTLIBRARIES = $(amlib_LTLIBRARIES)
SOURCES = $(libamdevice_la_SOURCES) $(activate_devpay_SOURCES)
DIST_SOURCES = $(am__libamdevice_la_SOURCES_DIST) \
$(am__activate_devpay_SOURCES_DIST)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(aminclude_HEADERS) $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
@list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \
}
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libamdevice.la: $(libamdevice_la_OBJECTS) $(libamdevice_la_DEPENDENCIES)
+libamdevice.la: $(libamdevice_la_OBJECTS) $(libamdevice_la_DEPENDENCIES) $(EXTRA_libamdevice_la_DEPENDENCIES)
$(libamdevice_la_LINK) -rpath $(amlibdir) $(libamdevice_la_OBJECTS) $(libamdevice_la_LIBADD) $(LIBS)
clean-noinstPROGRAMS:
rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-activate-devpay$(EXEEXT): $(activate_devpay_OBJECTS) $(activate_devpay_DEPENDENCIES)
+activate-devpay$(EXEEXT): $(activate_devpay_OBJECTS) $(activate_devpay_DEPENDENCIES) $(EXTRA_activate_devpay_DEPENDENCIES)
@rm -f activate-devpay$(EXEEXT)
$(LINK) $(activate_devpay_OBJECTS) $(activate_devpay_LDADD) $(LIBS)
install-sbinSCRIPTS: $(sbin_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+ dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -rf .libs _libs
install-amincludeHEADERS: $(aminclude_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(amincludedir)" || $(MKDIR_P) "$(DESTDIR)$(amincludedir)"
@list='$(aminclude_HEADERS)'; test -n "$(amincludedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amincludedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amincludedir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(aminclude_HEADERS)'; test -n "$(amincludedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(amincludedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(amincludedir)" && rm -f $$files
+ dir='$(DESTDIR)$(amincludedir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
if test "$$failed" -eq 0; then \
- echo "$$grn$$dashes"; \
+ col="$$grn"; \
else \
- echo "$$red$$dashes"; \
+ col="$$red"; \
fi; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes$$std"; \
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
test "$$failed" -eq 0; \
else :; fi
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
#! @PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#! @PERL@
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
} else {
self->volume_time = g_strdup(timestamp);
}
- strncpy(rval->datestamp, self->volume_time, sizeof(rval->datestamp));
- strncpy(rval->name, label, sizeof(rval->name));
+ g_strlcpy(rval->datestamp, self->volume_time, sizeof(rval->datestamp));
+ g_strlcpy(rval->name, label, sizeof(rval->name));
return rval;
}
rval = malloc(sizeof(*rval));
rval->type = F_TAPEEND;
timestamp = get_timestamp_from_time(time(NULL));
- strncpy(rval->datestamp, timestamp, sizeof(rval->datestamp));
+ g_strlcpy(rval->datestamp, timestamp, sizeof(rval->datestamp));
amfree(timestamp);
return rval;
}
}
}
-gboolean
+int
device_accept(
Device *self,
DirectTCPConnection **conn,
- ProlongProc prolong,
- gpointer prolong_data)
-{
- DeviceClass *klass;
-
- klass = DEVICE_GET_CLASS(self);
- if(klass->accept) {
- return (klass->accept)(self, conn, prolong, prolong_data);
- } else {
- device_set_error(self,
- stralloc(_("Unimplemented method")),
- DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
- }
-}
-
-gboolean
-device_accept_with_cond(
- Device *self,
- DirectTCPConnection **conn,
+ int *cancelled,
GMutex *abort_mutex,
- GCond *abort_cond)
+ GCond *abort_cond)
{
DeviceClass *klass;
klass = DEVICE_GET_CLASS(self);
- if(klass->accept_with_cond) {
- return (klass->accept_with_cond)(self, conn, abort_mutex, abort_cond);
+ if(klass->accept) {
+ return (klass->accept)(self, conn, cancelled, abort_mutex, abort_cond);
} else {
device_set_error(self,
g_strdup(_("Unimplemented method")),
DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
+ return 1;
}
}
-gboolean
-device_connect(
- Device *self,
- gboolean for_writing,
- DirectTCPAddr *addrs,
- DirectTCPConnection **conn,
- ProlongProc prolong,
- gpointer prolong_data)
-{
- DeviceClass *klass;
-
- klass = DEVICE_GET_CLASS(self);
- if(klass->connect) {
- return (klass->connect)(self, for_writing, addrs, conn, prolong, prolong_data);
- } else {
- device_set_error(self,
- stralloc(_("Unimplemented method")),
- DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
- }
-}
-gboolean
-device_connect_with_cond(
+int
+device_connect(
Device *self,
gboolean for_writing,
DirectTCPAddr *addrs,
DirectTCPConnection **conn,
+ int *cancelled,
GMutex *abort_mutex,
- GCond *abort_cond)
+ GCond *abort_cond)
{
DeviceClass *klass;
klass = DEVICE_GET_CLASS(self);
if(klass->connect) {
- return (klass->connect_with_cond)(self, for_writing, addrs, conn, abort_mutex, abort_cond);
+ return (klass->connect)(self, for_writing, addrs, conn, cancelled,
+ abort_mutex, abort_cond);
} else {
device_set_error(self,
g_strdup(_("Unimplemented method")),
DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
+ return 1;
}
}
-gboolean
+int
device_write_from_connection(
Device *self,
guint64 size,
- guint64 *actual_size)
+ guint64 *actual_size,
+ int *cancelled,
+ GMutex *abort_mutex,
+ GCond *abort_cond)
{
DeviceClass *klass;
g_assert(IS_WRITABLE_ACCESS_MODE(self->access_mode));
if(klass->write_from_connection) {
- return (klass->write_from_connection)(self, size, actual_size);
+ return (klass->write_from_connection)(self, size, actual_size,
+ cancelled,
+ abort_mutex, abort_cond);
} else {
device_set_error(self,
stralloc(_("Unimplemented method")),
DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
+ return 1;
}
}
-gboolean
+int
device_read_to_connection(
Device *self,
guint64 size,
- guint64 *actual_size)
+ guint64 *actual_size,
+ int *cancelled,
+ GMutex *abort_mutex,
+ GCond *abort_cond)
{
DeviceClass *klass;
klass = DEVICE_GET_CLASS(self);
if(klass->read_to_connection) {
- return (klass->read_to_connection)(self, size, actual_size);
+ return (klass->read_to_connection)(self, size, actual_size,
+ cancelled, abort_mutex, abort_cond);
} else {
device_set_error(self,
stralloc(_("Unimplemented method")),
DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
+ return 1;
}
}
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
guint64 (* get_bytes_written) (Device * self);
gboolean (* listen)(Device *self, gboolean for_writing, DirectTCPAddr **addrs);
- gboolean (* accept)(Device *self, DirectTCPConnection **conn,
- ProlongProc prolong, gpointer prolong_data);
- int (* accept_with_cond)(Device *self, DirectTCPConnection **conn,
- GMutex *abort_mutex, GCond *abort_cond);
- gboolean (* connect)(Device *self, gboolean for_writing, DirectTCPAddr *addrs,
- DirectTCPConnection **conn, ProlongProc prolong,
- gpointer prolong_data);
- gboolean (* connect_with_cond)(Device *self, gboolean for_writing,
+ /* The MainLoop must be running, but the following 4 methods must not be
+ * called from an event. they must be called from a different thread.
+ * They return:
+ * 0 - success
+ * 1 - failed
+ * 2 - interupted
+ */
+ int (* accept)(Device *self, DirectTCPConnection **conn,
+ int *cancelled, GMutex *abort_mutex, GCond *abort_cond);
+ int (* connect)(Device *self, gboolean for_writing,
DirectTCPAddr *addrs, DirectTCPConnection **conn,
+ int *cancelled,
GMutex *abort_mutex, GCond *abort_cond);
- gboolean (* write_from_connection)(Device *self, guint64 size, guint64 *actual_size);
- gboolean (* read_to_connection)(Device *self, guint64 size, guint64 *actual_size);
+ int (* write_from_connection)(Device *self, guint64 size,
+ guint64 *actual_size, int *cancelled,
+ GMutex *abort_mutex, GCond *abort_cond);
+ int (* read_to_connection)(Device *self, guint64 size,
+ guint64 *actual_size, int *cancelled,
+ GMutex *abort_mutex, GCond *abort_cond);
+
gboolean (* use_connection)(Device *self, DirectTCPConnection *conn);
/* array of DeviceProperty objects for this class, keyed by ID */
#define device_directtcp_supported(self) (DEVICE_GET_CLASS((self))->directtcp_supported)
gboolean device_listen(Device *self, gboolean for_writing, DirectTCPAddr **addrs);
-gboolean device_accept(Device *self, DirectTCPConnection **conn,
- ProlongProc prolong, gpointer prolong_data);
-int device_accept_with_cond(Device *self, DirectTCPConnection **conn,
- GMutex *abort_mutex, GCond *abort_cond);
-gboolean device_connect(Device *self, gboolean for_writing, DirectTCPAddr *addrs,
- DirectTCPConnection **conn, ProlongProc prolong,
- gpointer prolong_data);
-gboolean device_connect_with_cond(Device *self, gboolean for_writing,
+int device_accept(Device *self, DirectTCPConnection **conn,
+ int *cancelled, GMutex *abort_mutex, GCond *abort_cond);
+int device_connect(Device *self, gboolean for_writing,
DirectTCPAddr *addrs, DirectTCPConnection **conn,
+ int *cancelled,
+ GMutex *abort_mutex, GCond *abort_cond);
+int device_write_from_connection(Device *self, guint64 size,
+ guint64 *actual_size, int *cancelled,
+ GMutex *abort_mutex, GCond *abort_cond);
+int device_read_to_connection(Device *self, guint64 size,
+ guint64 *actual_size, int *cancelled,
GMutex *abort_mutex, GCond *abort_cond);
-gboolean device_write_from_connection(Device *self, guint64 size, guint64 *actual_size);
-gboolean device_read_to_connection(Device *self, guint64 size, guint64 *actual_size);
gboolean device_use_connection(Device *self, DirectTCPConnection *conn);
/* Protected methods. Don't call these except in subclass implementations. */
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Parent class for connections
*/
-typedef struct DirectTCPConnection_ {
+typedef struct DirectTCPConnection {
GObject __parent__;
gboolean closed;
* @returns: error message on error, NULL for no error (caller should
* free the error message)
*/
- char *(* close)(struct DirectTCPConnection_ *self);
+ char *(* close)(struct DirectTCPConnection *self);
} DirectTCPConnectionClass;
/* Method Stubs */
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
gchar *ndmp_auth;
gboolean verbose;
gsize read_block_size;
+
+ GMutex *abort_mutex;
+ GCond *abort_cond;
+ gboolean cancel;
+ int *cancelled;
};
/*
dumpfile_t *header;
char *header_buf;
- self = NDMP_DEVICE(dself);
-
if (device_in_error(self)) return FALSE;
if (!open_tape_agent(self)) {
return TRUE;
}
-static gboolean
-accept_impl(
- Device *dself,
- DirectTCPConnection **dtcpconn,
- ProlongProc prolong,
- gpointer prolong_data)
+static gpointer
+accept_wait_cond(
+ gpointer data)
{
- NdmpDevice *self = NDMP_DEVICE(dself);
+ NdmpDevice *self = NDMP_DEVICE(data);
+
ndmp9_mover_state state;
guint64 bytes_moved;
- ndmp9_mover_mode mode;
- ndmp9_mover_pause_reason reason;
- guint64 seek_position;
-
- if (device_in_error(self)) return FALSE;
-
- g_assert(self->listen_addrs);
-
- *dtcpconn = NULL;
-
- /* TODO: support aborting this operation - maybe just always poll? */
- prolong = prolong;
- prolong_data = prolong_data;
- if (!self->for_writing) {
- /* when reading, we don't get any kind of notification that the
- * connection has been established, but we can't call NDMP_MOVER_READ
- * until the mover is active. So we have to poll, waiting for ACTIVE.
- * This is ugly. */
- gulong backoff = G_USEC_PER_SEC/20; /* 5 msec */
- while (1) {
- if (!ndmp_connection_mover_get_state(self->ndmp,
+ gulong backoff = G_USEC_PER_SEC/20; /* 5 msec */
+ g_mutex_lock(self->abort_mutex);
+ while (1) {
+ g_mutex_unlock(self->abort_mutex);
+ if (!ndmp_connection_mover_get_state(self->ndmp,
&state, &bytes_moved, NULL, NULL)) {
- set_error_from_ndmp(self);
- return FALSE;
- }
-
- if (state != NDMP9_MOVER_STATE_LISTEN)
- break;
-
- /* back off a little bit to give the other side time to breathe,
- * but not more than one second */
- g_usleep(backoff);
- backoff *= 2;
- if (backoff > G_USEC_PER_SEC)
- backoff = G_USEC_PER_SEC;
- }
-
- /* double-check state */
- if (state != NDMP9_MOVER_STATE_ACTIVE) {
- device_set_error(DEVICE(self),
- g_strdup("mover did not enter the ACTIVE state as expected"),
- DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
- }
-
- /* now, we need to get this into the PAUSED state, since right now we
- * aren't allowed to perform any tape movement commands. So we issue a
- * MOVER_READ request for the whole darn image stream after setting the
- * usual empty window. Note that this means the whole dump will be read
- * in one MOVER_READ operation, even if it does not begin at the
- * beginning of a part. */
- if (!ndmp_connection_mover_read(self->ndmp, 0, G_MAXUINT64)) {
+ g_mutex_lock(self->abort_mutex);
set_error_from_ndmp(self);
- return FALSE;
- }
-
- /* now we should expect a notice that the mover has paused */
- } else {
- /* when writing, the mover will pause as soon as the first byte comes
- * in, so there's no need to do anything to trigger the pause.
- *
- * Well, sometimes it won't - specifically, when it does not allow a
- * zero-byte mover window, which means we've set up IndirectTCP. But in
- * that case, there's nothing interesting to do here.*/
- }
-
- if (self->indirecttcp_sock == -1) {
- /* NDMJOB sends NDMP9_MOVER_PAUSE_SEEK to indicate that it wants to write
- * outside the window, while the standard specifies .._EOW, instead. When
- * reading to a connection, we get the appropriate .._SEEK. It's easy
- * enough to handle both. */
-
- if (!ndmp_connection_wait_for_notify(self->ndmp,
- NULL,
- NULL,
- &reason, &seek_position)) {
- set_error_from_ndmp(self);
- return FALSE;
- }
-
- if (reason != NDMP9_MOVER_PAUSE_SEEK && reason != NDMP9_MOVER_PAUSE_EOW) {
- device_set_error(DEVICE(self),
- g_strdup_printf("got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"),
- DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
+ state = 0;
+ break;
}
- }
+ g_mutex_lock(self->abort_mutex);
- /* at this point, if we're doing directtcp, the mover is paused and ready
- * to go, and the listen addrs are no longer required; if we're doing
- * indirecttcp, then the other end may not even know of our listen_addrs
- * yet, so we can't free them.
- */
+ if (state != NDMP9_MOVER_STATE_LISTEN)
+ break;
- if (self->indirecttcp_sock == -1) {
- g_free(self->listen_addrs);
- self->listen_addrs = NULL;
+ /* back off a little bit to give the other side time to breathe,
+ * but not more than one second */
+ g_mutex_unlock(self->abort_mutex);
+ g_usleep(backoff);
+ g_mutex_lock(self->abort_mutex);
+ if (self->cancel)
+ break;
+ backoff *= 2;
+ if (backoff > G_USEC_PER_SEC)
+ backoff = G_USEC_PER_SEC;
}
- if (self->for_writing)
- mode = NDMP9_MOVER_MODE_READ;
- else
- mode = NDMP9_MOVER_MODE_WRITE;
-
- /* set up the new directtcp connection */
- if (self->directtcp_conn)
- g_object_unref(self->directtcp_conn);
- self->directtcp_conn =
- directtcp_connection_ndmp_new(self->ndmp, mode);
- *dtcpconn = DIRECTTCP_CONNECTION(self->directtcp_conn);
-
- /* reference it for the caller */
- g_object_ref(*dtcpconn);
-
- return TRUE;
+ self->cancel = TRUE;
+ g_cond_broadcast(self->abort_cond);
+ g_mutex_unlock(self->abort_mutex);
+ return GINT_TO_POINTER(state);
}
static int
-accept_with_cond_impl(
+accept_impl(
Device *dself,
DirectTCPConnection **dtcpconn,
+ gboolean *cancelled,
GMutex *abort_mutex,
GCond *abort_cond)
{
NdmpDevice *self = NDMP_DEVICE(dself);
ndmp9_mover_state state;
- guint64 bytes_moved;
ndmp9_mover_mode mode;
- ndmp9_mover_pause_reason reason;
+ ndmp9_mover_halt_reason mover_halt_reason = NDMP9_MOVER_HALT_NA;
+ ndmp9_mover_pause_reason mover_pause_reason = NDMP9_MOVER_PAUSE_NA;
guint64 seek_position;
- int result;
+ GThread *wait_thread;
+ int result;
+ char *err;
if (device_in_error(self)) return 1;
+ self->abort_mutex = abort_mutex;
+ self->abort_cond = abort_cond;
+ self->cancelled = cancelled;
+ self->cancel = FALSE;
+
g_assert(self->listen_addrs);
*dtcpconn = NULL;
* connection has been established, but we can't call NDMP_MOVER_READ
* until the mover is active. So we have to poll, waiting for ACTIVE.
* This is ugly. */
- gulong backoff = G_USEC_PER_SEC/20; /* 5 msec */
- while (1) {
- if (!ndmp_connection_mover_get_state(self->ndmp,
- &state, &bytes_moved, NULL, NULL)) {
- set_error_from_ndmp(self);
- return 1;
- }
- if (state != NDMP9_MOVER_STATE_LISTEN)
- break;
+ wait_thread = g_thread_create(accept_wait_cond, (gpointer)self, TRUE,
+ NULL);
+ while (!*cancelled && !self->cancel) {
+ g_cond_wait(self->abort_cond, self->abort_mutex);
+ }
+ self->cancel = TRUE;
+ state = GPOINTER_TO_INT(g_thread_join(wait_thread));
- /* back off a little bit to give the other side time to breathe,
- * but not more than one second */
- g_usleep(backoff);
- backoff *= 2;
- if (backoff > G_USEC_PER_SEC)
- backoff = G_USEC_PER_SEC;
+ if (*cancelled) {
+ result = 2;
+ goto accept_failed;
}
/* double-check state */
device_set_error(DEVICE(self),
g_strdup("mover did not enter the ACTIVE state as expected"),
DEVICE_STATUS_DEVICE_ERROR);
- return 1;
+ result = 1;
+ goto accept_failed;
}
/* now, we need to get this into the PAUSED state, since right now we
* beginning of a part. */
if (!ndmp_connection_mover_read(self->ndmp, 0, G_MAXUINT64)) {
set_error_from_ndmp(self);
- return 1;
+ result = 1;
+ goto accept_failed;
}
/* now we should expect a notice that the mover has paused */
* .._SEEK. It's easy enough to handle both. */
result = ndmp_connection_wait_for_notify_with_cond(self->ndmp,
NULL,
- NULL,
- &reason, &seek_position,
+ &mover_halt_reason,
+ &mover_pause_reason, &seek_position,
+ cancelled,
abort_mutex, abort_cond);
if (result == 1) {
set_error_from_ndmp(self);
- return 1;
+ goto accept_failed;
} else if (result == 2) {
- return 2;
+ goto accept_failed;
+ }
+
+ err = NULL;
+ if (mover_pause_reason) {
+ switch (mover_pause_reason) {
+ case NDMP9_MOVER_PAUSE_SEEK:
+ case NDMP9_MOVER_PAUSE_EOW:
+ break;
+ default:
+ err = "got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK";
+ break;
+ }
+ } else if (mover_halt_reason) {
+ err = "unexpected NOTIFY_MOVER_HALT";
}
- if (reason != NDMP9_MOVER_PAUSE_SEEK &&
- reason != NDMP9_MOVER_PAUSE_EOW) {
+ if (err) {
device_set_error(DEVICE(self),
- g_strdup_printf(
- "got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"),
+ g_strdup_printf("waiting NDMP_MOVER_PAUSE_SEEK: %s", err),
DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
+ result = 1;
+ goto accept_failed;
+
}
}
g_object_ref(*dtcpconn);
return 0;
-}
-
-static gboolean
-connect_impl(
- Device *dself,
- gboolean for_writing,
- DirectTCPAddr *addrs,
- DirectTCPConnection **dtcpconn,
- ProlongProc prolong,
- gpointer prolong_data)
-{
- NdmpDevice *self = NDMP_DEVICE(dself);
- ndmp9_mover_mode mode;
- ndmp9_mover_pause_reason reason;
- guint64 seek_position;
-
- g_assert(!self->listen_addrs);
-
- *dtcpconn = NULL;
- self->for_writing = for_writing;
-
- /* TODO: support aborting this operation - maybe just always poll? */
- prolong = prolong;
- prolong_data = prolong_data;
-
- if (!open_tape_agent(self)) {
- /* error message was set by open_tape_agent */
- return FALSE;
- }
-
- /* first, set the window to an empty span so that the mover doesn't start
- * reading or writing data immediately. NDMJOB tends to reset the record
- * size periodically (in direct contradiction to the spec), so we reset it
- * here as well. */
- if (!ndmp_connection_mover_set_record_size(self->ndmp,
- DEVICE(self)->block_size)) {
- set_error_from_ndmp(self);
- return FALSE;
- }
-
- if (!ndmp_connection_mover_set_window(self->ndmp, 0, 0)) {
- set_error_from_ndmp(self);
- return FALSE;
- }
-
- if (self->for_writing)
- mode = NDMP9_MOVER_MODE_READ;
- else
- mode = NDMP9_MOVER_MODE_WRITE;
- if (!ndmp_connection_mover_connect(self->ndmp, mode, addrs)) {
- set_error_from_ndmp(self);
- return FALSE;
- }
-
- if (!self->for_writing) {
- /* The agent is in the ACTIVE state, and will remain so until we tell
- * it to do something else. The thing we want to is for it to start
- * reading data from the tape, which will immediately trigger an EOW or
- * SEEK pause. */
- if (!ndmp_connection_mover_read(self->ndmp, 0, G_MAXUINT64)) {
- set_error_from_ndmp(self);
- return FALSE;
- }
-
- /* now we should expect a notice that the mover has paused */
- } else {
- /* when writing, the mover will pause as soon as the first byte comes
- * in, so there's no need to do anything to trigger the pause. */
- }
-
- /* NDMJOB sends NDMP9_MOVER_PAUSE_SEEK to indicate that it wants to write
- * outside the window, while the standard specifies .._EOW, instead. When
- * reading to a connection, we get the appropriate .._SEEK. It's easy
- * enough to handle both. */
-
- if (!ndmp_connection_wait_for_notify(self->ndmp,
- NULL,
- NULL,
- &reason, &seek_position)) {
- set_error_from_ndmp(self);
- return FALSE;
- }
-
- if (reason != NDMP9_MOVER_PAUSE_SEEK && reason != NDMP9_MOVER_PAUSE_EOW) {
- device_set_error(DEVICE(self),
- g_strdup_printf("got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"),
- DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
- }
-
- if (self->listen_addrs) {
- g_free(self->listen_addrs);
- self->listen_addrs = NULL;
+accept_failed:
+ if (self->indirecttcp_sock == -1) {
+ g_free(self->listen_addrs);
+ self->listen_addrs = NULL;
}
-
- /* set up the new directtcp connection */
- if (self->directtcp_conn)
- g_object_unref(self->directtcp_conn);
- self->directtcp_conn =
- directtcp_connection_ndmp_new(self->ndmp, mode);
- *dtcpconn = DIRECTTCP_CONNECTION(self->directtcp_conn);
-
- /* reference it for the caller */
- g_object_ref(*dtcpconn);
-
- return TRUE;
+ return result;
}
-static gboolean
-connect_with_cond_impl(
+
+static int
+connect_impl(
Device *dself,
gboolean for_writing,
DirectTCPAddr *addrs,
DirectTCPConnection **dtcpconn,
+ int *cancelled,
GMutex *abort_mutex,
- GCond *abort_cond)
+ GCond *abort_cond)
{
NdmpDevice *self = NDMP_DEVICE(dself);
ndmp9_mover_mode mode;
- ndmp9_mover_pause_reason reason;
+ ndmp9_mover_halt_reason mover_halt_reason = NDMP9_MOVER_HALT_NA;
+ ndmp9_mover_pause_reason mover_pause_reason = NDMP9_MOVER_PAUSE_NA;
guint64 seek_position;
int result;
result = ndmp_connection_wait_for_notify_with_cond(self->ndmp,
NULL,
- NULL,
- &reason, &seek_position,
+ &mover_halt_reason,
+ &mover_pause_reason, &seek_position,
+ cancelled,
abort_mutex, abort_cond);
if (result == 1) {
return 2;
}
- if (reason != NDMP9_MOVER_PAUSE_SEEK && reason != NDMP9_MOVER_PAUSE_EOW) {
+ if (mover_halt_reason != NDMP9_MOVER_HALT_NA) {
+ device_set_error(DEVICE(self),
+ g_strdup_printf("got NDMP9_MOVER_HALT"),
+ DEVICE_STATUS_DEVICE_ERROR);
+ return 1;
+ }
+ if (mover_pause_reason != NDMP9_MOVER_PAUSE_SEEK &&
+ mover_pause_reason != NDMP9_MOVER_PAUSE_EOW) {
device_set_error(DEVICE(self),
g_strdup_printf("got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK"),
DEVICE_STATUS_DEVICE_ERROR);
const char *addr;
char *addrspec;
- addr = inet_ntop(AF_INET, &iter->sin.sin_addr.s_addr, inet, 40);
+ addr = inet_ntop(AF_INET, &iter->sin.sin_addr.s_addr, inet, INET_ADDRSTRLEN);
addrspec = g_strdup_printf("%s:%d%s", addr, SU_GET_PORT(iter),
SU_GET_FAMILY(iter+1) !=0? " ":"");
- g_debug("indirecttcp_start_writing, send %s", addrspec);
+ g_debug("indirecttcp_start_writing, send %s", addrspec);
if (full_write(conn_sock, addrspec, strlen(addrspec)) < strlen(addrspec)) {
device_set_error(DEVICE(self),
g_strdup_printf("writing to indirecttcp socket: %s", strerror(errno)),
return TRUE;
}
-static gboolean
+static int
write_from_connection_impl(
- Device *dself,
- guint64 size,
- guint64 *actual_size)
+ Device *dself,
+ guint64 size,
+ guint64 *actual_size,
+ int *cancelled,
+ GMutex *abort_mutex,
+ GCond *abort_cond)
{
NdmpDevice *self = NDMP_DEVICE(dself);
DirectTCPConnectionNDMP *nconn = self->directtcp_conn;
gboolean eom = FALSE, eof = FALSE, eow = FALSE;
ndmp9_mover_state mover_state;
- ndmp9_mover_halt_reason halt_reason;
- ndmp9_mover_pause_reason pause_reason;
+ ndmp9_mover_halt_reason mover_halt_reason = NDMP9_MOVER_HALT_NA;
+ ndmp9_mover_pause_reason mover_pause_reason = NDMP9_MOVER_PAUSE_NA;
guint64 bytes_moved_before, bytes_moved_after;
gchar *err;
+ int result;
if (device_in_error(self)) return FALSE;
if (!ndmp_connection_mover_get_state(self->ndmp,
&mover_state, &bytes_moved_before, NULL, NULL)) {
set_error_from_ndmp(self);
- return FALSE;
+ return 1;
}
if (self->indirecttcp_sock != -1) {
nconn->offset,
size? size : G_MAXUINT64 - nconn->offset)) {
set_error_from_ndmp(self);
- return FALSE;
+ return 1;
}
/* for DirectTCP, we just tell the mover to continue; IndirectTCP is more complicated. */
if (self->indirecttcp_sock != -1) {
if (!indirecttcp_start_writing(self)) {
- return FALSE;
+ return 1;
}
} else {
if (!ndmp_connection_mover_continue(self->ndmp)) {
set_error_from_ndmp(self);
- return FALSE;
+ return 1;
}
}
/* now wait for the mover to pause itself again, or halt on EOF or an error */
- if (!ndmp_connection_wait_for_notify(self->ndmp,
- NULL,
- &halt_reason,
- &pause_reason, NULL)) {
+ result = ndmp_connection_wait_for_notify_with_cond(self->ndmp,
+ NULL,
+ &mover_halt_reason,
+ &mover_pause_reason, NULL,
+ cancelled, abort_mutex, abort_cond);
+ if (result == 1) {
set_error_from_ndmp(self);
- return FALSE;
+ return 1;
+ } else if (result == 2) {
+ return 2;
}
err = NULL;
- if (pause_reason) {
- switch (pause_reason) {
+ if (mover_pause_reason) {
+ switch (mover_pause_reason) {
case NDMP9_MOVER_PAUSE_EOM:
eom = TRUE;
break;
err = "got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK";
break;
}
- } else if (halt_reason) {
- switch (halt_reason) {
+ } else if (mover_halt_reason) {
+ switch (mover_halt_reason) {
case NDMP9_MOVER_HALT_CONNECT_CLOSED:
eof = TRUE;
break;
device_set_error(DEVICE(self),
g_strdup_printf("waiting for accept: %s", err),
DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
+ return 1;
}
/* no error, so the mover stopped due to one of EOM (volume out of space),
if (!ndmp_connection_mover_get_state(self->ndmp,
&mover_state, &bytes_moved_after, NULL, NULL)) {
set_error_from_ndmp(self);
- return FALSE;
+ return 1;
}
size = bytes_moved_after - bytes_moved_before;
nconn->offset += size;
* we do need to figure out the actual size */
DEVICE(self)->is_eom = TRUE;
} else {
+ g_assert_not_reached();
error("not reached");
}
- return TRUE;
+ return 0;
}
-static gboolean
+static int
read_to_connection_impl(
Device *dself,
guint64 size,
- guint64 *actual_size)
+ guint64 *actual_size,
+ int *cancelled,
+ GMutex *abort_mutex,
+ GCond *abort_cond)
{
NdmpDevice *self = NDMP_DEVICE(dself);
DirectTCPConnectionNDMP *nconn = self->directtcp_conn;
gboolean eom = FALSE, eof = FALSE, eow = FALSE;
ndmp9_mover_state mover_state;
- ndmp9_mover_halt_reason halt_reason;
- ndmp9_mover_pause_reason pause_reason;
+ ndmp9_mover_halt_reason mover_halt_reason = NDMP9_MOVER_HALT_NA;
+ ndmp9_mover_pause_reason mover_pause_reason = NDMP9_MOVER_PAUSE_NA;
guint64 bytes_moved_before, bytes_moved_after;
gchar *err;
+ int result;
if (actual_size)
*actual_size = 0;
- if (device_in_error(self)) return FALSE;
+ if (device_in_error(self)) return 1;
/* read_to_connection does not support IndirectTCP */
g_assert(self->indirecttcp_sock == -1);
if (!ndmp_connection_mover_get_state(self->ndmp,
&mover_state, &bytes_moved_before, NULL, NULL)) {
set_error_from_ndmp(self);
- return FALSE;
+ return 1;
}
/* the mover had best be PAUSED right now */
nconn->offset,
size? size : G_MAXUINT64 - nconn->offset)) {
set_error_from_ndmp(self);
- return FALSE;
+ return 1;
}
if (!ndmp_connection_mover_continue(self->ndmp)) {
set_error_from_ndmp(self);
- return FALSE;
+ return 1;
}
/* now wait for the mover to pause itself again, or halt on EOF or an error */
- if (!ndmp_connection_wait_for_notify(self->ndmp,
- NULL,
- &halt_reason,
- &pause_reason, NULL)) {
+ result = ndmp_connection_wait_for_notify_with_cond(self->ndmp,
+ NULL,
+ &mover_halt_reason,
+ &mover_pause_reason, NULL,
+ cancelled, abort_mutex, abort_cond);
+ if (result == 1) {
set_error_from_ndmp(self);
- return FALSE;
+ return 1;
+ } else if (result == 2) {
+ return 2;
}
err = NULL;
- if (pause_reason) {
- switch (pause_reason) {
+ if (mover_pause_reason) {
+ switch (mover_pause_reason) {
case NDMP9_MOVER_PAUSE_EOF:
eof = TRUE;
break;
err = "got NOTIFY_MOVER_PAUSED, but not because of EOW or SEEK";
break;
}
- } else if (halt_reason) {
- switch (halt_reason) {
+ } else if (mover_halt_reason) {
+ switch (mover_halt_reason) {
case NDMP9_MOVER_HALT_CONNECT_CLOSED:
eof = TRUE;
break;
device_set_error(DEVICE(self),
g_strdup_printf("waiting for accept: %s", err),
DEVICE_STATUS_DEVICE_ERROR);
- return FALSE;
+ return 1;
}
/* no error, so the mover stopped due to one of EOM (volume out of space),
if (!ndmp_connection_mover_get_state(self->ndmp,
&mover_state, &bytes_moved_after, NULL, NULL)) {
set_error_from_ndmp(self);
- return FALSE;
+ return 1;
}
size = bytes_moved_after - bytes_moved_before;
nconn->offset += size;
* we do need to figure out the actual size */
DEVICE(self)->is_eom = TRUE;
} else {
+ g_assert_not_reached();
error("not reached");
}
- return TRUE;
+ return 0;
}
static gboolean
device_class->directtcp_supported = TRUE;
device_class->listen = listen_impl;
- device_class->accept = accept_impl;
- device_class->accept_with_cond = accept_with_cond_impl;
- device_class->connect = connect_impl;
- device_class->connect_with_cond = connect_with_cond_impl;
+ device_class->accept= accept_impl;
+ device_class->connect= connect_impl;
device_class->write_from_connection = write_from_connection_impl;
device_class->read_to_connection = read_to_connection_impl;
device_class->use_connection = use_connection_impl;
char *rv = NULL;
ndmp9_mover_state state;
guint64 bytes_moved;
- ndmp9_mover_halt_reason reason;
+ ndmp9_mover_halt_reason mover_halt_reason;
gboolean expect_notif = FALSE;
/* based on the current state, we may need to abort or stop the
if (expect_notif) {
if (!ndmp_connection_wait_for_notify(self->ndmp,
NULL,
- &reason, /* value is ignored.. */
+ &mover_halt_reason, /* value is ignored.. */
NULL, NULL)) {
goto error;
}
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
device_set_error(dself,
stralloc(_("Can't open NULL device for reading or appending.")),
- DEVICE_STATUS_DEVICE_ERROR);
+ DEVICE_STATUS_VOLUME_UNLABELED | DEVICE_STATUS_VOLUME_ERROR);
return FALSE;
}
} else {
device_set_error(pself,
stralloc(_("Can't open NULL device for reading or appending.")),
- DEVICE_STATUS_DEVICE_ERROR);
+ DEVICE_STATUS_VOLUME_UNLABELED | DEVICE_STATUS_VOLUME_ERROR);
return FALSE;
}
}
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
char *project_id;
gboolean reuse_connection;
+
+ /* CAStor */
+ char *reps;
+ char *reps_bucket;
};
/*
static DevicePropertyBase device_property_create_bucket;
#define PROPERTY_CREATE_BUCKET (device_property_create_bucket.ID)
+/* CAStor replication values for objects and buckets */
+static DevicePropertyBase device_property_s3_reps;
+#define PROPERTY_S3_REPS (device_property_s3_reps.ID)
+#define S3_DEVICE_REPS_DEFAULT "2"
+static DevicePropertyBase device_property_s3_reps_bucket;
+#define PROPERTY_S3_REPS_BUCKET (device_property_s3_reps_bucket.ID)
+#define S3_DEVICE_REPS_BUCKET_DEFAULT "4"
+
/*
* prototypes
*/
DevicePropertyBase *base, GValue *val,
PropertySurety surety, PropertySource source);
+static gboolean s3_device_set_reps_fn(Device *self,
+ DevicePropertyBase *base, GValue *val,
+ PropertySurety surety, PropertySource source);
+
+static gboolean s3_device_set_reps_bucket_fn(Device *self,
+ DevicePropertyBase *base, GValue *val,
+ PropertySurety surety, PropertySource source);
+
static void s3_thread_read_block(gpointer thread_data,
gpointer data);
static void s3_thread_write_block(gpointer thread_data,
device_property_fill_and_register(&device_property_s3_multi_delete,
G_TYPE_BOOLEAN, "s3_multi_delete",
"Whether to use multi-delete");
+ device_property_fill_and_register(&device_property_s3_reps,
+ G_TYPE_STRING, "reps",
+ "Number of replicas for data objects in CAStor");
+ device_property_fill_and_register(&device_property_s3_reps_bucket,
+ G_TYPE_STRING, "reps_bucket",
+ "Number of replicas for automatically created buckets in CAStor");
/* register the device itself */
register_device(s3_device_factory, device_prefix_list);
self->thread_idle_cond = NULL;
self->thread_idle_mutex = NULL;
self->use_s3_multi_delete = 1;
+ self->reps = NULL;
+ self->reps_bucket = NULL;
/* Register property values
* Note: Some aren't added until s3_device_open_device()
PROPERTY_ACCESS_GET_MASK | PROPERTY_ACCESS_SET_BEFORE_START,
device_simple_property_get_fn,
s3_device_set_project_id_fn);
+
+ device_class_register_property(device_class, PROPERTY_S3_REPS,
+ PROPERTY_ACCESS_GET_MASK | PROPERTY_ACCESS_SET_BEFORE_START,
+ device_simple_property_get_fn,
+ s3_device_set_reps_fn);
+
+ device_class_register_property(device_class, PROPERTY_S3_REPS_BUCKET,
+ PROPERTY_ACCESS_GET_MASK | PROPERTY_ACCESS_SET_BEFORE_START,
+ device_simple_property_get_fn,
+ s3_device_set_reps_bucket_fn);
}
static gboolean
self->s3_api = S3_API_SWIFT_2;
} else if (g_str_equal(storage_api, "OAUTH2")) {
self->s3_api = S3_API_OAUTH2;
+ } else if (g_str_equal(storage_api, "CASTOR")) {
+#if LIBCURL_VERSION_NUM >= 0x071301
+ curl_version_info_data *info;
+ /* check the runtime version too */
+ info = curl_version_info(CURLVERSION_NOW);
+ if (info->version_num >= 0x071301) {
+ self->s3_api = S3_API_CASTOR;
+ } else {
+ device_set_error(p_self, g_strdup_printf(_(
+ "Error setting STORAGE-API to castor "
+ "(You must install libcurl 7.19.1 or newer)")),
+ DEVICE_STATUS_DEVICE_ERROR);
+ return FALSE;
+ }
+#else
+ device_set_error(p_self, g_strdup_printf(_(
+ "Error setting STORAGE-API to castor "
+ "This amanda is compiled with a too old libcurl, you must compile with libcurl 7.19.1 or newer")),
+ DEVICE_STATUS_DEVICE_ERROR);
+ return FALSE;
+#endif
} else {
g_debug("Invalid STORAGE_API, using \"S3\".");
self->s3_api = S3_API_S3;
return device_simple_property_set_fn(p_self, base, val, surety, source);
}
+static gboolean
+s3_device_set_reps_fn(Device *p_self, DevicePropertyBase *base,
+ GValue *val, PropertySurety surety, PropertySource source)
+{
+ S3Device *self = S3_DEVICE(p_self);
+
+ amfree(self->reps);
+ self->reps = g_value_dup_string(val);
+ device_clear_volume_details(p_self);
+
+ return device_simple_property_set_fn(p_self, base, val, surety, source);
+}
+
+static gboolean
+s3_device_set_reps_bucket_fn(Device *p_self, DevicePropertyBase *base,
+ GValue *val, PropertySurety surety, PropertySource source)
+{
+ S3Device *self = S3_DEVICE(p_self);
+
+ amfree(self->reps_bucket);
+ self->reps_bucket = g_value_dup_string(val);
+ device_clear_volume_details(p_self);
+
+ return device_simple_property_set_fn(p_self, base, val, surety, source);
+}
+
static Device*
s3_device_factory(char * device_name, char * device_type, char * device_node)
{
return;
}
+ if (self->reps == NULL) {
+ self->reps = g_strdup(S3_DEVICE_REPS_DEFAULT);
+ }
+
+ if (self->reps_bucket == NULL) {
+ self->reps_bucket = g_strdup(S3_DEVICE_REPS_BUCKET_DEFAULT);
+ }
+
g_debug(_("S3 driver using bucket '%s', prefix '%s'"), self->bucket, self->prefix);
/* default values */
if(self->server_side_encryption) g_free(self->server_side_encryption);
if(self->proxy) g_free(self->proxy);
if(self->ca_info) g_free(self->ca_info);
+ if(self->reps) g_free(self->reps);
+ if(self->reps_bucket) g_free(self->reps_bucket);
}
static gboolean setup_handle(S3Device * self) {
DEVICE_STATUS_DEVICE_ERROR);
return FALSE;
}
- }
+ } else if (self->s3_api == S3_API_CASTOR) {
+ self->use_s3_multi_delete = 0;
+ self->use_subdomain = FALSE;
+ if(self->service_path) {
+ g_free(self->service_path);
+ self->service_path = NULL;
+ }
+ }
self->s3t = g_new0(S3_by_thread, self->nb_threads);
if (self->s3t == NULL) {
self->client_id,
self->client_secret,
self->refresh_token,
- self->reuse_connection);
+ self->reuse_connection,
+ self->reps, self->reps_bucket);
if (self->s3t[thread].s3 == NULL) {
device_set_error(d_self,
stralloc(_("Internal error creating S3 handle")),
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
char *content_type;
gboolean reuse_connection;
+
+ /* CAStor */
+ char *reps;
+ char *reps_bucket;
};
typedef struct {
}
/* query string */
- if (subresource || query)
+ if (subresource || query || (hdl->s3_api == S3_API_CASTOR && hdl->tenant_name))
g_string_append(url, "?");
if (subresource)
if (query)
g_string_append(url, query);
+ /* add CAStor tenant domain override query arg */
+ if (hdl->s3_api == S3_API_CASTOR && hdl->tenant_name) {
+ if (subresource || query) {
+ g_string_append(url, "&");
+ }
+ g_string_append_printf(url, "domain=%s", hdl->tenant_name);
+ }
+
cleanup:
return g_string_free(url, FALSE);
struct curl_slist *headers = NULL;
char *esc_bucket = NULL, *esc_key = NULL;
GString *auth_string = NULL;
+ char *reps = NULL;
/* From RFC 2616 */
static const char *wkday[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
headers = curl_slist_append(headers, buf);
g_free(buf);
}
+ } else if (hdl->s3_api == S3_API_CASTOR) {
+ if (g_str_equal(verb, "PUT") || g_str_equal(verb, "POST")) {
+ if (key) {
+ buf = g_strdup("CAStor-Application: Amanda");
+ headers = curl_slist_append(headers, buf);
+ g_free(buf);
+ reps = g_strdup(hdl->reps); /* object replication level */
+ } else {
+ reps = g_strdup(hdl->reps_bucket); /* bucket replication level */
+ }
+
+ /* set object replicas in lifepoint */
+ buf = g_strdup_printf("lifepoint: [] reps=%s", reps);
+ headers = curl_slist_append(headers, buf);
+ g_free(buf);
+ g_free(reps);
+ }
} else {
/* Build the string to sign, per the S3 spec.
* See: "Authenticating REST Requests" - API Version 2006-03-01 pg 58
curl_easy_getinfo(hdl->curl, CURLINFO_RESPONSE_CODE, &response_code);
hdl->last_response_code = response_code;
- /* check ETag, if present */
- if (etag && content_md5 && 200 == response_code) {
+ /* check ETag, if present and not CAStor */
+ if (etag && content_md5 && 200 == response_code &&
+ hdl->s3_api != S3_API_CASTOR) {
if (etag && g_ascii_strcasecmp(etag, content_md5))
hdl->last_message = g_strdup("S3 Error: Possible data corruption (ETag returned by Amazon did not match the MD5 hash of the data sent)");
else
g_free(details);
g_free(body_copy);
return FALSE;
+ } else if (hdl->s3_api == S3_API_CASTOR) {
+ /* The error mesage is the body */
+ hdl->last_message = g_strndup(body, body_len);
+ return FALSE;
} else if (!hdl->content_type ||
!g_str_equal(hdl->content_type, "application/xml")) {
return FALSE;
/* Set S3Internal Data */
S3InternalData int_writedata = {{NULL, 0, 0, MAX_ERROR_RESPONSE_LEN}, NULL, NULL, NULL, FALSE, FALSE, NULL, hdl};
gboolean should_retry;
- guint retries = 0;
+ gint retries = 0;
+ gint retry_after_close = 0;
gulong backoff = EXPONENTIAL_BACKOFF_START_USEC;
/* corresponds to PUT, HEAD, GET, and POST */
int curlopt_upload = 0, curlopt_nobody = 0, curlopt_httpget = 0, curlopt_post = 0;
}
if ((curl_code = curl_easy_setopt(hdl->curl, CURLOPT_FRESH_CONNECT,
- (long)(hdl->reuse_connection? 0 : 1)))) {
+ (long)(hdl->reuse_connection && retry_after_close == 0 ? 0 : 1)))) {
goto curl_error;
}
if ((curl_code = curl_easy_setopt(hdl->curl, CURLOPT_FORBID_REUSE,
break;
}
+ if (retries >= EXPONENTIAL_BACKOFF_MAX_RETRIES &&
+ retry_after_close < 3 &&
+ hdl->last_s3_error_code == S3_ERROR_RequestTimeout) {
+ retries = -1;
+ retry_after_close++;
+ g_debug("Retry on a new connection");
+ }
if (retries >= EXPONENTIAL_BACKOFF_MAX_RETRIES) {
/* we're out of retries, so annotate hdl->last_message appropriately and bail
* out. */
{"<Message>[[:space:]]*([^<]*)[[:space:]]*</Message>", REG_EXTENDED | REG_ICASE, &message_regex},
{"^[a-z0-9](-*[a-z0-9]){2,62}$", REG_EXTENDED | REG_NOSUB, &subdomain_regex},
{"(/>)|(>([^<]*)</LocationConstraint>)", REG_EXTENDED | REG_ICASE, &location_con_regex},
- {"^Date:(.*)\r",REG_EXTENDED | REG_ICASE | REG_NEWLINE, &date_sync_regex},
+ {"^Date:(.*)$",REG_EXTENDED | REG_ICASE | REG_NEWLINE, &date_sync_regex},
{"\"access_token\" : \"([^\"]*)\",", REG_EXTENDED | REG_ICASE | REG_NEWLINE, &access_token_regex},
{"\"expires_in\" : (.*)", REG_EXTENDED | REG_ICASE | REG_NEWLINE, &expires_in_regex},
{"\"details\": \"([^\"]*)\",", REG_EXTENDED | REG_ICASE | REG_NEWLINE, &details_regex},
{"(/>)|(>([^<]*)</LocationConstraint>)",
G_REGEX_CASELESS,
&location_con_regex},
- {"^Date:(.*)\\r",
+ {"^Date:(.*)$",
G_REGEX_OPTIMIZE | G_REGEX_CASELESS,
&date_sync_regex},
{"\"access_token\" : \"([^\"]*)\"",
const char *client_id,
const char *client_secret,
const char *refresh_token,
- const gboolean reuse_connection)
+ const gboolean reuse_connection,
+ const char *reps,
+ const char *reps_bucket)
{
S3Handle *hdl;
hdl->client_id = g_strdup(client_id);
hdl->client_secret = g_strdup(client_secret);
hdl->refresh_token = g_strdup(refresh_token);
+ } else if (s3_api == S3_API_CASTOR) {
+ hdl->username = g_strdup(username);
+ hdl->password = g_strdup(password);
+ hdl->tenant_name = g_strdup(tenant_name);
+ hdl->reps = g_strdup(reps);
+ hdl->reps_bucket = g_strdup(reps_bucket);
}
/* NULL is okay */
hdl->curl = curl_easy_init();
if (!hdl->curl) goto error;
+ /* Set HTTP handling options for CAStor */
+ if (s3_api == S3_API_CASTOR) {
+#if LIBCURL_VERSION_NUM >= 0x071301
+ curl_version_info_data *info;
+ /* check the runtime version too */
+ info = curl_version_info(CURLVERSION_NOW);
+ if (info->version_num >= 0x071301) {
+ curl_easy_setopt(hdl->curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt(hdl->curl, CURLOPT_UNRESTRICTED_AUTH, 1);
+ curl_easy_setopt(hdl->curl, CURLOPT_MAXREDIRS, 5);
+ curl_easy_setopt(hdl->curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
+ curl_easy_setopt(hdl->curl, CURLOPT_HTTP_VERSION,
+ CURL_HTTP_VERSION_1_1);
+ if (hdl->username)
+ curl_easy_setopt(hdl->curl, CURLOPT_USERNAME, hdl->username);
+ if (hdl->password)
+ curl_easy_setopt(hdl->curl, CURLOPT_PASSWORD, hdl->password);
+ curl_easy_setopt(hdl->curl, CURLOPT_HTTPAUTH,
+ (CURLAUTH_BASIC | CURLAUTH_DIGEST));
+ }
+#endif
+ }
+
return hdl;
error:
RESULT_HANDLING_ALWAYS_RETRY,
{ 0, 0, 0, /* default: */ S3_RESULT_FAIL }
};
+ char *verb = "PUT";
+ char *content_type = NULL;
g_assert(hdl != NULL);
- result = perform_request(hdl, "PUT", bucket, key, NULL, NULL, NULL, NULL,
+ if (hdl->s3_api == S3_API_CASTOR) {
+ verb = "POST";
+ content_type = "application/x-amanda-backup-data";
+ }
+
+ result = perform_request(hdl, verb, bucket, key, NULL, NULL, content_type, NULL,
read_func, reset_func, size_func, md5_func, read_data,
NULL, NULL, NULL, progress_func, progress_data,
result_handling);
hdl->s3_api == S3_API_SWIFT_2) &&
strcmp(keyword, "max-keys") == 0) {
keyword = "limit";
- }
+ } else if ((hdl->s3_api == S3_API_CASTOR) &&
+ strcmp(keyword, "max-keys") == 0) {
+ keyword = "size";
+ }
g_string_append_printf(query, "%s=%s", keyword, esc_value);
curl_free(esc_value);
}
}
- if (hdl->s3_api == S3_API_SWIFT_1 || hdl->s3_api == S3_API_SWIFT_2) {
+ if (hdl->s3_api == S3_API_SWIFT_1 ||
+ hdl->s3_api == S3_API_SWIFT_2 ||
+ hdl->s3_api == S3_API_CASTOR) {
if (have_prev_part)
g_string_append(query, "&");
g_string_append(query, "format=xml");
{
s3_result_t result = S3_RESULT_FAIL;
static result_handling_t result_handling[] = {
+ { 200, 0, 0, S3_RESULT_OK },
{ 204, 0, 0, S3_RESULT_OK },
{ 404, 0, 0, S3_RESULT_OK },
{ 404, S3_ERROR_NoSuchBucket, 0, S3_RESULT_OK },
const char *project_id)
{
char *body = NULL;
+ char *verb = "PUT";
+ char *content_type = NULL;
s3_result_t result = S3_RESULT_FAIL;
static result_handling_t result_handling[] = {
{ 200, 0, 0, S3_RESULT_OK },
}
}
- result = perform_request(hdl, "PUT", bucket, NULL, NULL, NULL, NULL,
+ if (hdl->s3_api == S3_API_CASTOR) {
+ verb = "POST";
+ content_type = "application/castorcontext";
+ }
+
+ result = perform_request(hdl, verb, bucket, NULL, NULL, NULL, content_type,
project_id,
read_func, reset_func, size_func, md5_func, ptr,
NULL, NULL, NULL, NULL, NULL, result_handling);
/* return to the default state of failure */
result = S3_RESULT_FAIL;
- if (body) g_free(body);
/* use strndup to get a null-terminated string */
body = g_strndup(hdl->last_response_body, hdl->last_response_body_size);
if (!body) {
if (hdl->s3_api == S3_API_SWIFT_1 ||
hdl->s3_api == S3_API_SWIFT_2) {
query = "limit=1";
+ } else if (hdl->s3_api == S3_API_CASTOR) {
+ query = "format=xml&size=0";
} else {
query = "max-keys=1";
}
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
S3_API_S3,
S3_API_SWIFT_1,
S3_API_SWIFT_2,
- S3_API_OAUTH2
+ S3_API_OAUTH2,
+ S3_API_CASTOR
} S3_api;
/* An opaque handle. S3Handles should only be accessed from a single
const char *client_id,
const char *client_secret,
const char *refresh_token,
- const gboolean reuse_connection);
+ const gboolean reuse_connection,
+ const char *reps,
+ const char *reps_bucket);
/* latest step of setting up the S3Handle.
*
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
if (read_block_size != 0 &&
((gsize)read_block_size < p_self->block_size ||
- (gsize)read_block_size > p_self->max_block_size))
+ (gsize)read_block_size > p_self->max_block_size)) {
device_set_error(p_self,
g_strdup_printf("Error setting READ-BLOCk-SIZE property to '%u', it must be between %zu and %zu", read_block_size, p_self->block_size, p_self->max_block_size),
DEVICE_STATUS_DEVICE_ERROR);
return FALSE;
+ }
self->private->read_block_size = read_block_size;
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2005-2012 Zmanda Inc. All Rights Reserved.
*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License version 2.1 as
- * published by the Free Software Foundation.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* corresponding condition variable. */
volatile gboolean paused;
GCond *paused_cond;
- GCond *abort_accept_cond; /* condition to trigger to abort an accept */
+ GCond *abort_cond; /* condition to trigger to abort an NDMP command */
} XferDestTaperDirectTCP;
/* first, accept a new connection from the device */
DBG(2, "accepting DirectTCP connection on device %s", self->device->device_name);
- result = device_accept_with_cond(self->device, &self->conn,
- self->state_mutex,
- self->abort_accept_cond);
- if (result == 2) {
+ result = device_accept(self->device, &self->conn, &elt->cancelled,
+ self->state_mutex, self->abort_cond);
+ if (result == 1 && !elt->cancelled) {
xfer_cancel_with_error(XFER_ELEMENT(self),
"accepting DirectTCP connection: %s",
device_error_or_status(self->device));
g_mutex_unlock(self->state_mutex);
- return NULL;
- } else if (result == 1) {
+ wait_until_xfer_cancelled(elt->xfer);
+ goto send_xmsg_done;
+ } else if (result == 2 || elt->cancelled) {
g_mutex_unlock(self->state_mutex);
- return NULL;
+ wait_until_xfer_cancelled(elt->xfer);
+ goto send_xmsg_done;
}
DBG(2, "connection accepted; sending XMSG_READY");
/* write the part */
g_timer_start(timer);
- if (!device_write_from_connection(self->device,
- self->part_size, &size)) {
+ result = device_write_from_connection(self->device,
+ self->part_size, &size, &elt->cancelled,
+ self->state_mutex, self->abort_cond);
+ if (result == 1 && !elt->cancelled) {
/* even if this is just a physical EOM, we may have lost data, so
* the whole transfer is dead. */
xfer_cancel_with_error(XFER_ELEMENT(self),
"Error writing from DirectTCP connection: %s",
device_error_or_status(self->device));
goto cancelled;
+ } else if (result == 2 || elt->cancelled) {
+ goto cancelled;
}
g_timer_stop(timer);
* longer paused */
g_mutex_lock(self->state_mutex);
g_cond_broadcast(self->paused_cond);
- g_cond_broadcast(self->abort_accept_cond);
+ g_cond_broadcast(self->abort_cond);
g_mutex_unlock(self->state_mutex);
return rv;
self->conn = NULL;
self->state_mutex = g_mutex_new();
self->paused_cond = g_cond_new();
- self->abort_accept_cond = g_cond_new();
+ self->abort_cond = g_cond_new();
}
static void
g_mutex_free(self->state_mutex);
g_cond_free(self->paused_cond);
- g_cond_free(self->abort_accept_cond);
+ g_cond_free(self->abort_cond);
if (self->part_header)
dumpfile_free(self->part_header);
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/* time runs backward on some test boxes, so make sure this is positive */
if (msg->duration < 0) msg->duration = 0;
- if (msg->successful)
+ if (msg->successful && msg->size > 0)
self->partnum++;
self->no_more_parts = msg->eof || (!msg->successful && !self->expect_cache_inform);
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
GThread *thread;
/* this mutex in this condition variable governs all variables below */
- GCond *start_part_cond;
+ GCond *start_part_cond;
GMutex *start_part_mutex;
/* is this device currently paused and awaiting a new part? */
GTimer *part_timer;
gint64 size;
+
+ GCond *abort_cond; /* condition to trigger to abort ndmp command */
} XferSourceRecovery;
/*
{
XferElement *elt = XFER_ELEMENT(self);
char *errmsg = NULL;
+ int result;
/* send XMSG_READY to indicate it's OK to call start_part now */
DBG(2, "sending XMSG_READY");
while (1) {
DBG(2, "reading part from %s", self->device->device_name);
- if (!device_read_to_connection(self->device, G_MAXUINT64, &actual_size)) {
+ result = device_read_to_connection(self->device, G_MAXUINT64,
+ &actual_size, &elt->cancelled,
+ self->start_part_mutex, self->abort_cond);
+ if (result == 1 && !elt->cancelled) {
xfer_cancel_with_error(elt, _("error reading from device: %s"),
device_error_or_status(self->device));
g_mutex_unlock(self->start_part_mutex);
goto close_conn_and_send_done;
+ } else if (result == 2 || elt->cancelled) {
+ g_mutex_unlock(self->start_part_mutex);
+ goto close_conn_and_send_done;
}
/* break on EOF; otherwise do another read_to_connection */
{
XferSourceRecovery *self = XFER_SOURCE_RECOVERY(data);
XferElement *elt = XFER_ELEMENT(self);
+ int result;
DBG(1, "(this is directtcp_connect_thread)")
g_assert(self->listen_ok);
DBG(2, "accepting DirectTCP connection on device %s", self->device->device_name);
- if (!device_accept(self->device, &self->conn, NULL, NULL)) {
+ result = device_accept(self->device, &self->conn, &elt->cancelled,
+ self->start_part_mutex, self->abort_cond);
+ if (result == 1 && !elt->cancelled) {
xfer_cancel_with_error(elt,
_("error accepting DirectTCP connection: %s"),
device_error_or_status(self->device));
g_mutex_unlock(self->start_part_mutex);
wait_until_xfer_cancelled(elt->xfer);
goto send_done;
+ } else if (result == 2 || elt->cancelled) {
+ g_mutex_unlock(self->start_part_mutex);
+ goto send_done;
}
DBG(2, "DirectTCP connection accepted");
{
XferSourceRecovery *self = XFER_SOURCE_RECOVERY(data);
XferElement *elt = XFER_ELEMENT(self);
+ int result;
DBG(1, "(this is directtcp_listen_thread)");
g_assert(elt->downstream->input_listen_addrs != NULL); /* downstream listening */
DBG(2, "making DirectTCP connection on device %s", self->device->device_name);
- if (!device_connect(self->device, FALSE, elt->downstream->input_listen_addrs,
- &self->conn, NULL, NULL)) {
+ result = device_connect(self->device, FALSE,
+ elt->downstream->input_listen_addrs,
+ &self->conn, &elt->cancelled,
+ self->start_part_mutex, self->abort_cond);
+ if (result == 1 && !elt->cancelled) {
xfer_cancel_with_error(elt,
_("error making DirectTCP connection: %s"),
device_error_or_status(self->device));
g_mutex_unlock(self->start_part_mutex);
wait_until_xfer_cancelled(elt->xfer);
goto send_done;
+ } else if (result == 2 || elt->cancelled) {
+ g_mutex_unlock(self->start_part_mutex);
+ wait_until_xfer_cancelled(elt->xfer);
+ goto send_done;
}
DBG(2, "DirectTCP connect succeeded");
/* trigger the condition variable, in case the thread is waiting on it */
g_mutex_lock(self->start_part_mutex);
g_cond_broadcast(self->start_part_cond);
+ g_cond_broadcast(self->abort_cond);
g_mutex_unlock(self->start_part_mutex);
return TRUE;
g_object_unref(self->device);
g_cond_free(self->start_part_cond);
+ g_cond_free(self->abort_cond);
g_mutex_free(self->start_part_mutex);
}
self->paused = TRUE;
self->start_part_cond = g_cond_new();
+ self->abort_cond = g_cond_new();
self->start_part_mutex = g_mutex_new();
}
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# in this file at all, due to limitations of Automake.
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(client_exampledir)" \
"$(DESTDIR)$(lbltempldir)" "$(DESTDIR)$(server_exampledir)" \
"$(DESTDIR)$(templatedir)"
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-rm -rf .libs _libs
install-client_exampleDATA: $(client_example_DATA)
@$(NORMAL_INSTALL)
- test -z "$(client_exampledir)" || $(MKDIR_P) "$(DESTDIR)$(client_exampledir)"
@list='$(client_example_DATA)'; test -n "$(client_exampledir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(client_exampledir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(client_exampledir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(client_example_DATA)'; test -n "$(client_exampledir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(client_exampledir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(client_exampledir)" && rm -f $$files
+ dir='$(DESTDIR)$(client_exampledir)'; $(am__uninstall_files_from_dir)
install-lbltemplDATA: $(lbltempl_DATA)
@$(NORMAL_INSTALL)
- test -z "$(lbltempldir)" || $(MKDIR_P) "$(DESTDIR)$(lbltempldir)"
@list='$(lbltempl_DATA)'; test -n "$(lbltempldir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(lbltempldir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(lbltempldir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(lbltempl_DATA)'; test -n "$(lbltempldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(lbltempldir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(lbltempldir)" && rm -f $$files
+ dir='$(DESTDIR)$(lbltempldir)'; $(am__uninstall_files_from_dir)
install-server_exampleDATA: $(server_example_DATA)
@$(NORMAL_INSTALL)
- test -z "$(server_exampledir)" || $(MKDIR_P) "$(DESTDIR)$(server_exampledir)"
@list='$(server_example_DATA)'; test -n "$(server_exampledir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(server_exampledir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(server_exampledir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(server_example_DATA)'; test -n "$(server_exampledir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(server_exampledir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(server_exampledir)" && rm -f $$files
+ dir='$(DESTDIR)$(server_exampledir)'; $(am__uninstall_files_from_dir)
install-templateDATA: $(template_DATA)
@$(NORMAL_INSTALL)
- test -z "$(templatedir)" || $(MKDIR_P) "$(DESTDIR)$(templatedir)"
@list='$(template_DATA)'; test -n "$(templatedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(templatedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(templatedir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(template_DATA)'; test -n "$(templatedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(templatedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(templatedir)" && rm -f $$files
+ dir='$(DESTDIR)$(templatedir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(noinst_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
glthread/$(DEPDIR)/$(am__dirstamp)
glthread/threadlib.lo: glthread/$(am__dirstamp) \
glthread/$(DEPDIR)/$(am__dirstamp)
-libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES)
+libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES) $(EXTRA_libgnu_la_DEPENDENCIES)
$(libgnu_la_LINK) $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS)
mostlyclean-compile:
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
installcheck: installcheck-recursive
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
barcode => 'PTAG00XX', reserved => 1, loaded_in => 0,
current => 1,
device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
- device_error => undef,
- f_type => undef, label => undef },
+ device_error => 'no tape label found',
+ f_type => $Amanda::Header::F_EMPTY, label => undef },
{ slot => 4, state => Amanda::Changer::SLOT_FULL,
barcode => 'PTAG01XX', reserved => 1, loaded_in => 1,
device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
- device_error => undef,
- f_type => undef, label => undef },
+ device_error => 'no tape label found',
+ f_type => $Amanda::Header::F_EMPTY, label => undef },
{ slot => 5, state => Amanda::Changer::SLOT_FULL,
barcode => 'PTAG02XX',
device_status => undef, device_error => undef,
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
{ slot => 1, state => Amanda::Changer::SLOT_FULL,
barcode => '11111', reserved => 1, loaded_in => 0, current => 1,
device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
- device_error => undef,
- f_type => undef, label => undef },
+ device_error => "File 0 not found",
+ f_type => $Amanda::Header::F_EMPTY, label => undef },
{ slot => 2, state => Amanda::Changer::SLOT_FULL,
barcode => '22222', reserved => 1, loaded_in => 1,
device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
- device_error => undef,
- f_type => undef, label => undef },
+ device_error => "File 0 not found",
+ f_type => $Amanda::Header::F_EMPTY, label => undef },
{ slot => 3, state => Amanda::Changer::SLOT_FULL,
barcode => '33333',
device_status => undef, device_error => undef,
barcode => '33333', loaded_in => 1,
device_status => $DEVICE_STATUS_SUCCESS,
device_error => undef,
- f_type => undef, label => 'TAPE-3' },
+ f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-3' },
{ slot => 4, state => Amanda::Changer::SLOT_FULL,
barcode => '44444', loaded_in => 0, current => 1,
device_status => $DEVICE_STATUS_SUCCESS,
barcode => '33333', loaded_in => 1,
device_status => $DEVICE_STATUS_SUCCESS,
device_error => undef,
- f_type => undef, label => 'TAPE-3' },
+ f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-3' },
{ slot => 4, state => Amanda::Changer::SLOT_FULL,
barcode => '22222', current => 1,
device_status => $DEVICE_STATUS_SUCCESS,
barcode => '33333', loaded_in => 0,
device_status => $DEVICE_STATUS_SUCCESS,
device_error => undef,
- f_type => undef, label => 'TAPE-3' },
+ f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-3' },
{ slot => 4, state => Amanda::Changer::SLOT_FULL,
barcode => '22222', current => 1,
device_status => $DEVICE_STATUS_SUCCESS,
barcode => '33333', loaded_in => 0,
device_status => $DEVICE_STATUS_SUCCESS,
device_error => undef,
- f_type => undef, label => 'TAPE-3' },
+ f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-3' },
{ slot => 4, state => Amanda::Changer::SLOT_FULL,
barcode => '22222', current => 1,
device_status => $DEVICE_STATUS_SUCCESS,
device_status => $DEVICE_STATUS_SUCCESS,
device_error => undef,
f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-4' },
- ], "$pfx: inventory reflects updates with unknown state with barcodes");
+ ], "$pfx: inventory reflects updates wrcodesith unknown state with barcodes");
} else {
check_inventory($chg, $mtx_config->{'barcodes'} > 0, $steps->{'quit'}, [
{ slot => 1, state => Amanda::Changer::SLOT_FULL,
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
-use Test::More tests => 43;
+use Test::More tests => 54;
use strict;
use warnings;
is_deeply([ ds2av($specs[0]) ], [ "h1", "d1", undef, undef, undef ], "..first spec is correct");
is_deeply([ ds2av($specs[1]) ], [ "h2", "d2", undef, undef, undef ], "..second spec is correct");
+@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "h2", "d2"], $Amanda::Cmdline::CMDLINE_EXACT_MATCH);
+is(@specs, 2, "parse of four elements with CMDLINE_EXACT_MATCH yields 2 specs");
+is_deeply([ ds2av($specs[0]) ], [ "=h1", "=d1", undef, undef, undef ], "..first spec is correct");
+is_deeply([ ds2av($specs[1]) ], [ "=h2", "=d2", undef, undef, undef ], "..second spec is correct");
+
@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "h2", "d2", "ds2" ], $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP);
is(@specs, 2, "parse of six elements with CMDLINE_PARSE_DATESTAMP yields 2 specs");
is_deeply([ ds2av($specs[0]) ], [ "h1", "d1", "ds1", undef, undef ], "..first spec is correct");
is_deeply([ ds2av($specs[1]) ], [ "h2", "d2", "ds2", undef, undef ], "..second spec is correct");
+@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "h2", "d2", "ds2" ], $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_EXACT_MATCH);
+is(@specs, 2, "parse of six elements with CMDLINE_PARSE_DATESTAMP and CMDLINE_EXACT_MATCH yields 2 specs");
+is_deeply([ ds2av($specs[0]) ], [ "=h1", "=d1", "=ds1", undef, undef ], "..first spec is correct");
+is_deeply([ ds2av($specs[1]) ], [ "=h2", "=d2", "=ds2", undef, undef ], "..second spec is correct");
+
@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "lv1", "h2", "d2", "ds2", "lv2" ],
$Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL);
is(@specs, 2, "parse of eight elements with CMDLINE_PARSE_DATESTAMP and CMDLINE_PARSE_LEVEL yields 2 specs");
is_deeply([ ds2av($specs[0]) ], [ "h1", "d1", "ds1", "lv1", undef ], "..first spec is correct");
is_deeply([ ds2av($specs[1]) ], [ "h2", "d2", "ds2", "lv2", undef ], "..second spec is correct");
+@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "lv1", "h2", "d2", "ds2", "lv2" ],
+ $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL | $Amanda::Cmdline::CMDLINE_EXACT_MATCH);
+is(@specs, 2, "parse of eight elements with CMDLINE_PARSE_DATESTAMP, CMDLINE_PARSE_LEVEL and CMDLINE_EXACT_MATCH yields 2 specs");
+is_deeply([ ds2av($specs[0]) ], [ "=h1", "=d1", "=ds1", "=lv1", undef ], "..first spec is correct");
+is_deeply([ ds2av($specs[1]) ], [ "=h2", "=d2", "=ds2", "=lv2", undef ], "..second spec is correct");
+
@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "lv1" ],
$Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL);
is(@specs, 1, "parse of four elements with CMDLINE_PARSE_DATESTAMP and CMDLINE_PARSE_LEVEL yields one spec");
is_deeply([ ds2av($specs[0]) ], [ "h1", "d1", "ds1", "lv1", undef ], "..which is correct");
+@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1", "lv1" ],
+ $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL | $Amanda::Cmdline::CMDLINE_EXACT_MATCH);
+is(@specs, 1, "parse of four elements with CMDLINE_PARSE_DATESTAMP, CMDLINE_PARSE_LEVEL and CMDLINE_EXACT_MATCH yields one spec");
+is_deeply([ ds2av($specs[0]) ], [ "=h1", "=d1", "=ds1", "=lv1", undef ], "..which is correct");
+
@specs = Amanda::Cmdline::parse_dumpspecs(["h1", "d1", "ds1" ],
$Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL);
is(@specs, 1, "parse of three elements with CMDLINE_PARSE_DATESTAMP and CMDLINE_PARSE_LEVEL yields one spec");
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
);
for my $pn (@prop_names) {
- is_deeply($properties->{$pn->{'val'}}->{values}, [ "VALUE" ]);
+ is_deeply($properties->{$pn->{'val'}}->{values}, [ "VALUE" ], "property $pn->{'val'}");
}
$testconf = Installcheck::Config->new();
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
map {
# convert bigints to strings and on to integers so is_deeply doesn't get confused
$_->{'dump'}->{'level'} = "$_->{dump}->{level}" + 0;
- $_->{'dump'}->{'bytes'} = "$_->{dump}->{bytes}" + 0;
+ $_->{'dump'}->{'bytes'} = 0;
+ $_->{'dump'}->{'bytes'} = "$_->{dump}->{bytes}" + 0 if defined $_->{dump}->{bytes};
$_->{'dump'}->{'kb'} = "$_->{dump}->{kb}" + 0;
$_->{'dump'}->{'orig_kb'} = "$_->{dump}->{orig_kb}" + 0;
if (!defined $_->{filenum}) {
map {
# convert bigints to strings and on to integers so is_deeply doesn't get confused
$_->{'level'} = "$_->{level}" + 0;
- $_->{'bytes'} = "$_->{bytes}" + 0;
+ $_->{'bytes'} = 0;
+ $_->{'bytes'} = "$_->{bytes}" + 0 if defined $_->{bytes};
$_->{'kb'} = "$_->{kb}" + 0;
- $_->{'orig_kb'} = "$_->{orig_kb}" + 0;
+ $_->{'orig_kb'} = 0;
+ $_->{'orig_kb'} = "$_->{orig_kb}" + 0 if defined $_->{orig_kb};
$_->{'nparts'} = "$_->{nparts}" + 0;
$_;
} sort {
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
-use Test::More tests => 609;
+use Test::More tests => 541;
use File::Path qw( mkpath rmtree );
use Sys::Hostname;
use Carp;
}
SKIP: {
- skip "not built with ndmp and server", 94 unless
+ skip "not built with ndmp and server", 26 unless
Amanda::Util::built_with_component("ndmp") and
Amanda::Util::built_with_component("server");
"finish device")
or diag $dev->error_or_status();
- #
- # test the directtcp-target implementation
- #
-
- ok($dev->directtcp_supported(), "is a directtcp target");
- for my $dev_use ('initiator', 'listener') {
- my ($xfer, $addrs, $dest_elt);
- if ($dev_use eq 'listener') {
- $addrs = $dev->listen(1);
- ok($addrs, "listen returns successfully") or die($dev->error_or_status());
-
- # set up an xfer to write to the device
- $dest_elt = Amanda::Xfer::Dest::DirectTCPConnect->new($addrs);
- } else {
- # set up an xfer to write to the device
- $dest_elt = Amanda::Xfer::Dest::DirectTCPListen->new();
- }
- $xfer = Amanda::Xfer->new([
- Amanda::Xfer::Source::Random->new(32768*34, 0xB00),
- $dest_elt,
- ]);
-
- my @messages;
- $xfer->start(make_cb(xmsg_cb => sub {
- my ($src, $msg, $xfer) = @_;
- if ($msg->{'type'} == $XMSG_ERROR) {
- die $msg->{'elt'} . " failed: " . $msg->{'message'};
- } elsif ($msg->{'type'} == $XMSG_DONE) {
- Amanda::MainLoop::quit();
- }
- }));
-
- # write files from the connection until EOF
- my $num_files;
- my $conn;
- my ($finish_connection, $start_device, $write_file_cb);
-
-
- $finish_connection = make_cb(finish_connection => sub {
- if ($dev_use eq 'listener') {
- $conn = $dev->accept();
- } else {
- $addrs = $dest_elt->get_addrs();
- $conn = $dev->connect(1, $addrs);
- }
- Amanda::MainLoop::call_later($start_device);
- });
-
-
- $start_device = make_cb(start_device => sub {
- ok($dev->start($ACCESS_WRITE, "TEST2", "20090915000000"),
- "start device in write mode")
- or diag $dev->error_or_status();
-
- Amanda::MainLoop::call_later($write_file_cb);
- });
-
- $write_file_cb = make_cb(write_file_cb => sub {
- ++$num_files < 20 or die "I seem to be in a loop!";
-
- ok($dev->start_file($hdr), "start file $num_files for writing");
- is($dev->file, $num_files, "..file number is correct");
-
- my ($ok, $size) = $dev->write_from_connection(32768*15);
- push @messages, sprintf("WRITE-%s-%d-%s-%s",
- $ok?"OK":"ERR", $size,
- $dev->is_eof()? "EOF":"!eof",
- $dev->is_eom()? "EOM":"!eom");
- ok($ok, "..write from connection succeeds");
- my $eof = $dev->is_eof();
-
- ok($dev->finish_file(), "..finish file after writing");
-
- if (!$eof) {
- Amanda::MainLoop::call_later($write_file_cb);
- }
- });
-
- Amanda::MainLoop::call_later($finish_connection);
- Amanda::MainLoop::run();
- is_deeply([@messages], [
- 'WRITE-OK-491520-!eof-!eom',
- 'WRITE-OK-491520-!eof-!eom',
- 'WRITE-OK-131072-EOF-!eom',
- ],
- "a sequence of write_from_connection calls works correctly");
-
- $dev->finish();
-
- if (my $err = $conn->close()) {
- die $err;
- }
- }
-
- #
- # Test indirecttcp
- #
-
- {
- ok($dev->directtcp_supported(), "is a directtcp target");
-
- $dev->property_set("indirect", 1);
-
- my $addrs = $dev->listen(1);
- ok($addrs, "listen returns successfully") or die($dev->error_or_status());
-
- # fork off to evaluate the indirecttcp addresses and then set up an
- # xfer to write to the device
- if (POSIX::fork() == 0) {
- # allow other process to start listening.
- sleep 1;
- my $nc = $Amanda::Constants::NC;
- $nc = $Amanda::Constants::NC6 if !$nc;
- $nc = $Amanda::Constants::NETCAT if !$nc;
- my $sockresult = `$nc localhost $addrs->[0][1] < /dev/null`;
-
- my @sockresult = map { [ split(/:/, $_) ] } split(/ /, $sockresult);
- $addrs = [ map { $_->[1] = 0 + $_->[1]; $_ } @sockresult ];
-
- my $xfer = Amanda::Xfer->new([
- Amanda::Xfer::Source::Random->new(32768*34, 0xB00),
- Amanda::Xfer::Dest::DirectTCPConnect->new($addrs) ]);
-
- $xfer->start(make_cb(xmsg_cb => sub {
- my ($src, $msg, $xfer) = @_;
- if ($msg->{'type'} == $XMSG_ERROR) {
- die $msg->{'elt'} . " failed: " . $msg->{'message'};
- } elsif ($msg->{'type'} == $XMSG_DONE) {
- Amanda::MainLoop::quit();
- }
- }));
-
- Amanda::MainLoop::run();
- exit(0);
- }
-
- # write files from the connection until EOF
- my @messages;
- my $num_files;
- my $conn;
- my ($call_accept, $start_device, $write_file_cb);
-
- $call_accept = make_cb(call_accept => sub {
- $conn = $dev->accept();
- Amanda::MainLoop::call_later($start_device);
- });
-
- $start_device = make_cb(start_device => sub {
- ok($dev->start($ACCESS_WRITE, "TEST2", "20090915000000"),
- "start device in write mode")
- or diag $dev->error_or_status();
-
- Amanda::MainLoop::call_later($write_file_cb);
- });
-
- $write_file_cb = make_cb(write_file_cb => sub {
- ++$num_files < 20 or die "I seem to be in a loop!";
-
- ok($dev->start_file($hdr), "start file $num_files for writing");
- is($dev->file, $num_files, "..file number is correct");
-
- my ($ok, $size) = $dev->write_from_connection(32768*15);
- push @messages, sprintf("WRITE-%s-%d-%s-%s",
- $ok?"OK":"ERR", $size,
- $dev->is_eof()? "EOF":"!eof",
- $dev->is_eom()? "EOM":"!eom");
- ok($ok, "..write from connection succeeds");
- my $eof = $dev->is_eof();
-
- ok($dev->finish_file(), "..finish file after writing");
-
- if (!$eof) {
- Amanda::MainLoop::call_later($write_file_cb);
- } else {
- Amanda::MainLoop::quit();
- }
- });
-
- Amanda::MainLoop::call_later($call_accept);
- Amanda::MainLoop::run();
- is_deeply([@messages], [
- 'WRITE-OK-491520-!eof-!eom',
- 'WRITE-OK-491520-!eof-!eom',
- 'WRITE-OK-131072-EOF-!eom',
- ],
- "a sequence of write_from_connection calls works correctly");
-
- $dev->finish();
-
- if (my $err = $conn->close()) {
- die $err;
- }
- }
-
- # now try reading that back piece by piece
-
- {
- my $filename = "$Installcheck::TMP/Amanda_Device_ndmp.tmp";
- open(my $dest_fh, ">", $filename);
-
- ok($dev->start($ACCESS_READ, undef, undef),
- "start device in read mode")
- or diag $dev->error_or_status();
-
- my $file;
- for ($file = 1; $file <= 3; $file++) {
- ok($dev->seek_file($file),
- "seek_file $file");
- is($dev->file, $file, "..file num is correct");
- is($dev->block, 0, "..block num is correct");
-
- # read the file, writing to our temp file. We'll check that the byte
- # sequence is correct later
- my $xfer = Amanda::Xfer->new([
- Amanda::Xfer::Source::Device->new($dev),
- Amanda::Xfer::Dest::Fd->new($dest_fh) ]);
-
- $xfer->start(make_cb(xmsg_cb => sub {
- my ($src, $msg, $xfer) = @_;
- if ($msg->{'type'} == $XMSG_ERROR) {
- die $msg->{'elt'} . " failed: " . $msg->{'message'};
- } elsif ($msg->{'type'} == $XMSG_DONE) {
- Amanda::MainLoop::quit();
- }
- }));
- Amanda::MainLoop::run();
-
- pass("read back file " . $file);
- }
-
- $dev->finish();
- close $dest_fh;
-
- # now read back and verify that file
- open(my $src_fh, "<", $filename);
- my $xfer = Amanda::Xfer->new([
- Amanda::Xfer::Source::Fd->new($src_fh),
- Amanda::Xfer::Dest::Null->new(0xB00) ]);
-
- $xfer->start(make_cb(xmsg_cb => sub {
- my ($src, $msg, $xfer) = @_;
- if ($msg->{'type'} == $XMSG_ERROR) {
- die $msg->{'elt'} . " failed: " . $msg->{'message'};
- } elsif ($msg->{'type'} == $XMSG_DONE) {
- Amanda::MainLoop::quit();
- }
- }));
- Amanda::MainLoop::run();
-
- pass("data in the three parts is correct");
- unlink $filename;
- }
-
- ####
- # Test read_to_connection
- #
- # This requires something that can connect to a device and read from
- # it; the XFA does not have an XFER_MECH_DIRECTTCP_CONNECT, so we fake
- # it by manually connecting and then setting up an xfer with a regular
- # XferSourceFd. This works because the NDMP server will accept an
- # incoming connection before the Device API accept() method is called;
- # this trick may not work with other DirectTCP-capable devices. Also,
- # this doesn't work so well if there's an error in the xfer (e.g., a
- # random value mismatch). But tests are supposed to succeed!
-
- sub test_read2conn {
- my ($finished_cb) = @_;
- my @events;
- my $file = 1;
- my ($conn, $sock);
-
- my $steps = define_steps
- cb_ref => \$finished_cb;
-
- step setup => sub {
- my $addrs = $dev->listen(0);
-
- # now connect to that
- $sock = IO::Socket::INET->new(
- Proto => "tcp",
- PeerHost => $addrs->[0][0],
- PeerPort => $addrs->[0][1],
- Blocking => 1,
- );
-
- # and set up a transfer to read from that socket
- my $xfer = Amanda::Xfer->new([
- Amanda::Xfer::Source::Fd->new($sock),
- Amanda::Xfer::Dest::Null->new(0xB00) ]);
-
- $xfer->start(make_cb(xmsg_cb => sub {
- my ($src, $msg, $xfer) = @_;
- if ($msg->{'type'} == $XMSG_ERROR) {
- die $msg->{'elt'} . " failed: " . $msg->{'message'};
- }
- if ($msg->{'type'} == $XMSG_DONE) {
- push @events, "DONE";
- $steps->{'quit'}->();
- }
- }));
-
- $steps->{'accept'}->();
- };
-
- step accept => sub {
- $conn = $dev->accept();
- die $dev->error_or_status() unless ($conn);
-
- Amanda::MainLoop::call_later($steps->{'start_dev'});
- };
-
- step start_dev => sub {
- ok($dev->start($ACCESS_READ, undef, undef),
- "start device in read mode")
- or diag $dev->error_or_status();
-
- Amanda::MainLoop::call_later($steps->{'read_part_cb'});
- };
-
- step read_part_cb => sub {
- my $hdr = $dev->seek_file($file);
- die $dev->error_or_status() unless ($hdr);
- my $size = $dev->read_to_connection(0);
- push @events, "READ-$size";
-
- if (++$file <= 3) {
- Amanda::MainLoop::call_later($steps->{'read_part_cb'});
- } else {
- # close the connection, which will end the xfer, which will
- # result in a call to finished_cb. So there.
- push @events, "CLOSE";
- $conn->close();
- }
- };
-
- step quit => sub {
- close $sock or die "close: $!";
-
- is_deeply([@events],
- [ "READ-491520", "READ-491520", "READ-131072", "CLOSE", "DONE" ],
- "sequential read_to_connection operations read the right amounts " .
- "and bytestream matches");
-
- $finished_cb->();
- };
- }
- test_read2conn(\&Amanda::MainLoop::quit);
- Amanda::MainLoop::run();
-
- # try two seek_file's in a row
- $hdr = $dev->seek_file(2);
- is($hdr? $hdr->{'type'} : -1, $Amanda::Header::F_DUMPFILE, "seek_file the first time");
- $hdr = $dev->seek_file(2);
- is($hdr? $hdr->{'type'} : -1, $Amanda::Header::F_DUMPFILE, "seek_file the second time");
-
- ## test seek_file's handling of EOM
-
- $hdr = $dev->seek_file(3);
- is($hdr->{type}, $Amanda::Header::F_DUMPFILE, "file 3 is a dumpfile");
- $hdr = $dev->seek_file(4);
- is($hdr->{type}, $Amanda::Header::F_TAPEEND, "file 4 is tapeend");
- $hdr = $dev->seek_file(5);
- is($hdr, undef, "file 5 is an error");
- $hdr = $dev->seek_file(6);
- is($hdr, undef, "file 6 is an error");
$ndmp->cleanup();
}
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
"20071110010002 TESTCONF003 reuse BARCODE:BAR-003 BLOCKSIZE:32\n",
"20071109010002 TESTCONF002 reuse BARCODE:BAR-002 META:META2 BLOCKSIZE:64 #comment 2\n",
"20071108010001 TESTCONF001 no-reuse #comment 1\n",
+ "20071107110002 TESTCONF015\n",
+ "20071107010002 TESTCONF006 no-reuse\n",
+ "20071106010002 TESTCONF005 reuse\n",
);
mktapelist($tapelist, @lines);
{ 'datestamp' => '20071108010001', 'label' => 'TESTCONF001',
'reuse' => '', 'position' => 4, 'blocksize' => undef,
'barcode' => undef, 'meta' => undef, 'comment' => 'comment 1' },
+ { 'datestamp' => '20071107110002', 'label' => 'TESTCONF015',
+ 'reuse' => 1, 'position' => 5, 'blocksize' => undef,
+ 'barcode' => undef, 'meta' => undef, 'comment' => undef },
+ { 'datestamp' => '20071107010002', 'label' => 'TESTCONF006',
+ 'reuse' => '', 'position' => 6, 'blocksize' => undef,
+ 'barcode' => undef, 'meta' => undef, 'comment' => undef },
+ { 'datestamp' => '20071106010002', 'label' => 'TESTCONF005',
+ 'reuse' => 1, 'position' => 7, 'blocksize' => undef,
+ 'barcode' => undef, 'meta' => undef, 'comment' => undef },
] }, "A simple tapelist is parsed correctly");
SKIP: {
# now try writing it out and check that the results are the same
$tl->write("$tapelist-new");
my @reread_lines = readtapelist("$tapelist-new");
+ chomp($lines[4]);
+ $lines[4] .= " reuse\n"; #'reuse' is automatically written
is_deeply(\@reread_lines, \@lines, "Lines of freshly written tapelist match the original");
is_deeply($tl->lookup_tapelabel('TESTCONF002'),
# try some edits
$tl->add_tapelabel("20080112010203", "TESTCONF007", "seven", 1, 'META3', 'BAR-007');
- is(scalar @{$tl->{'tles'}}, 5, "add_tapelabel adds a new element to the tapelist");
+ is(scalar @{$tl->{'tles'}}, 8, "add_tapelabel adds a new element to the tapelist");
is_deeply($tl->lookup_tapepos(1),
{ 'datestamp' => '20080112010203', 'label' => 'TESTCONF007',
# try some edits
$tl->add_tapelabel("20080112010204", "TESTCONF008", "eight", 0, undef, undef, 128);
- is(scalar @{$tl->{'tles'}}, 6, "add_tapelabel adds a new element to the tapelist no-reuse");
+ is(scalar @{$tl->{'tles'}}, 9, "add_tapelabel adds a new element to the tapelist no-reuse");
is_deeply($tl->lookup_tapelabel("TESTCONF008"),
{ 'datestamp' => '20080112010204', 'label' => 'TESTCONF008',
".. lookup_tapelabel finds it no-reuse");
$tl->remove_tapelabel("TESTCONF008");
- is(scalar @{$tl->{'tles'}}, 5, "remove_tapelabel removes an element from the tapelist, no-reuse");
+ is(scalar @{$tl->{'tles'}}, 8, "remove_tapelabel removes an element from the tapelist, no-reuse");
$tl->remove_tapelabel("TESTCONF002");
- is(scalar @{$tl->{'tles'}}, 4, "remove_tapelabel removes an element from the tapelist");
+ is(scalar @{$tl->{'tles'}}, 7, "remove_tapelabel removes an element from the tapelist");
is_deeply($tl->lookup_tapepos(4), # used to be in position 5
{ 'datestamp' => '20071108010001', 'label' => 'TESTCONF001',
or die("config_init failed");
is( Amanda::Tapelist::get_last_reusable_tape_label(0),
- 'TESTCONF002', ".. get_last_reusable_tape_labe for skip=0" );
+ 'TESTCONF005', ".. get_last_reusable_tape_labe for skip=0" );
is( Amanda::Tapelist::get_last_reusable_tape_label(2),
- 'TESTCONF004', ".. get_last_reusable_tape_labe for skip=2" );
+ 'TESTCONF002', ".. get_last_reusable_tape_labe for skip=2" );
}
# try parsing various invalid lines
@lines = (
"2006123456 FOO reuse\n", # valid
- "TESTCONF003 290385098 reuse\n", # invalid
- "20071109010002 TESTCONF002 re-use\n", # invalid
- "20071108010001 TESTCONF001\n", # invalid
- "20071108010001 TESTCONF001 #comment\n", # invalid
- "#comment\n", # invalid
+# "TESTCONF003 290385098 reuse\n", # invalid
+# "20071109010002 TESTCONF002 re-use\n", # invalid
+# "20071108010001 TESTCONF001\n", # invalid
+# "20071108010001 TESTCONF001 #comment\n", # invalid
+# "#comment\n", # invalid
);
mktapelist($tapelist, @lines);
# Copyright (c) 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20090424173002 TEST-2 reuse
20090424173003 TEST-3 reuse
20090424173004 TEST-4 reuse
+20090424172000 CONF-4 reuse
EOF
$taperscan->read_tapelist();
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
2368*1024, 0);
},
[ "PART-1-OK", "PART-2-OK", "EOM",
- "PART-3-OK",
+ "PART-2-OK",
"DONE" ],
"Amanda::Xfer::Dest::Taper::Splitter - LEOM hits in file 2 header");
test_recovery_source(
# vim:ft=perl
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=perl
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=perl
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=perl
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
$value = shift @values;
if ($param eq "inherit") {
print $amanda_conf "$value\n";
- } else {
+ } elsif (defined $value) {
print $amanda_conf "$param $value\n";
+ } else {
+ print $amanda_conf "$param\n";
}
}
print $amanda_conf "}\n";
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=perl
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=perl
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
catalogs/skipped.cat \
catalogs/spanned.cat \
catalogs/strontium.cat \
- catalogs/taperr.cat
+ catalogs/taperr.cat \
+ catalogs/taper-parallel-write.cat
EXTRA_DIST += $(catalogs)
echo "'make installcheck' is a dangerous tool. It will overwrite your"; \
echo "amanda-client.conf and amandates, and (if it triggers an as-yet undetected"; \
echo "bug) may do other unexpected things. You are strongly encouraged"; \
- echo " - not to run installchecks on a production install"; \
- echo " - not to run installchecks as root"; \
+ echo " - not to run installchecks on a production install"; \
+ echo " - not to run installchecks as root"; \
echo "See http://wiki.zmanda.com/index.php/Testing for instructions on setting up a"; \
echo "test environment in which potential damage is limited by your filesystem's"; \
echo "permissions. To actually run the installchecks, invoke make as follows:"; \
- echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \
+ echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \
exit 1; \
fi
$(mkdir_p) "$(AMANDA_TMPDIR)/installchecks"
@if test -f "$(CONFIG_DIR)/amanda-client.conf" -a ! -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \
cp "$(CONFIG_DIR)/amanda-client.conf" "$(CONFIG_DIR)/amanda-client.conf.install-backup"; \
- fi
+ fi
for f in $(tests); do chmod a-x $$f; done
srcdir="$(srcdir)" $(PERL) -I$(srcdir) -I. -e 'use Test::Harness qw(&runtests); runtests(sort @ARGV);' $(tests)
rm -rf "$(CONFIG_DIR)/TESTCONF"
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# configure.in
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
SCRIPTS = $(noinst_SCRIPTS)
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX_BACKUP = @AIX_BACKUP@
catalogs/skipped.cat \
catalogs/spanned.cat \
catalogs/strontium.cat \
- catalogs/taperr.cat
+ catalogs/taperr.cat \
+ catalogs/taper-parallel-write.cat
# and finally some development utilities
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
echo "'make installcheck' is a dangerous tool. It will overwrite your"; \
echo "amanda-client.conf and amandates, and (if it triggers an as-yet undetected"; \
echo "bug) may do other unexpected things. You are strongly encouraged"; \
- echo " - not to run installchecks on a production install"; \
- echo " - not to run installchecks as root"; \
+ echo " - not to run installchecks on a production install"; \
+ echo " - not to run installchecks as root"; \
echo "See http://wiki.zmanda.com/index.php/Testing for instructions on setting up a"; \
echo "test environment in which potential damage is limited by your filesystem's"; \
echo "permissions. To actually run the installchecks, invoke make as follows:"; \
- echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \
+ echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \
exit 1; \
fi
$(mkdir_p) "$(AMANDA_TMPDIR)/installchecks"
@if test -f "$(CONFIG_DIR)/amanda-client.conf" -a ! -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \
cp "$(CONFIG_DIR)/amanda-client.conf" "$(CONFIG_DIR)/amanda-client.conf.install-backup"; \
- fi
+ fi
for f in $(tests); do chmod a-x $$f; done
srcdir="$(srcdir)" $(PERL) -I$(srcdir) -I. -e 'use Test::Harness qw(&runtests); runtests(sort @ARGV);' $(tests)
rm -rf "$(CONFIG_DIR)/TESTCONF"
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Contact information: Zmanda Inc, 465 S Mathilda Ave, Suite 300
# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
-use Test::More tests => 18;
+use Test::More tests => 23;
use strict;
use warnings;
like(run_get('amadmin TESTCONF balance --days 12'),
qr/No data to report on yet.$/,
- "shell 13");
+ "shell 14");
+
+like(run_get('amadmin TESTCONF force =localhost share-a'),
+ qr/^amadmin: localhost:\\\\windows\\share-a is set to a forced level 0 at next run.$/,
+ "shell 15");
+
+like(run_get('amadmin TESTCONF force =localhost =share-a'),
+ qr/^Argument '=share-a' matches neither a host nor a disk.$/,
+ "shell 16");
+
+like(run_get('amadmin --exact-match TESTCONF force localhost share-a'),
+ qr/^Argument '=share-a' matches neither a host nor a disk.$/,
+ "shell 17");
+
+like(run_get('amadmin TESTCONF force =localhost \'=\\\\windows\\share-a\''),
+ qr/^amadmin: localhost:\\\\windows\\share-a is set to a forced level 0 at next run.$/,
+ "shell 18");
+
+like(run_get('amadmin --exact-match TESTCONF force localhost \'\\\\windows\\share-a\''),
+ qr/^amadmin: localhost:\\\\windows\\share-a is set to a forced level 0 at next run.$/,
+ "shell 19");
+
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# test some defaults
ok(run('amdevcheck', 'TESTCONF'), "run succeeds with a null tapedev");
is_deeply([ sort split "\n", $Installcheck::Run::stdout],
- [ sort "MESSAGE Can't open NULL device for reading or appending.", "DEVICE_ERROR"],
+ [ sort "MESSAGE Can't open NULL device for reading or appending.", "VOLUME_UNLABELED", "VOLUME_ERROR"],
"Fail with correct message for a null tapedev");
##
ok(run('amdevcheck', 'TESTCONF', 'null:null'),
"can override device on the command line");
is_deeply([ sort split "\n", $Installcheck::Run::stdout],
- [ sort "MESSAGE Can't open NULL device for reading or appending.", "DEVICE_ERROR"],
+ [ sort "MESSAGE Can't open NULL device for reading or appending.", "VOLUME_UNLABELED", "VOLUME_ERROR"],
".. and produce a corresponding error message");
Installcheck::Dumpcache::load("basic");
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
-use Test::More tests => 10;
+use Test::More tests => 12;
use strict;
use warnings;
is($Installcheck::Run::exit_code, 4,
"correct exit code for chunker partial");
like($Installcheck::Run::stdout,
- qr{localhost:/etc 0 backup failed: dumper: \[/usr/sbin/tar returned error\] \(7:49:23\)},
+ qr{localhost:/etc 0\s*80917k dump failed: dumper: \[/usr/sbin/tar returned error\], finished \(7:49:53\)},
+ "output is correct");
+
+## now test a taper-parallel-write > 1
+
+$cat = Installcheck::Catalogs::load('taper-parallel-write');
+$cat->install();
+
+ok(run('amstatus', 'TESTCONF'),
+ "amstatus with taper-parallel-write runs without error");
+like($Installcheck::Run::stdout,
+ qr{\s*tape 3\s*:\s*1\s*142336k\s*142336k \( 5.82\%\) amstatus_test_3-AA-003 \(1 chunks\)},
"output is correct");
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
DUMPER STATS TAPER STATS
HOSTNAME DISK L ORIG-kB OUT-kB COMP% MMM:SS KB/s MMM:SS KB/s
-------------------------- ------------------------------------- --------------
-localhost /home NO FILE TO FLUSH -----------------------------------
-localhost /opt NO FILE TO FLUSH -----------------------------------
+localhost /home NOT FLUSHED
+localhost /opt NOT FLUSHED
localhost /usr/lib 1 309 -- FLUSH 0:02 184.6
-localhost /usr/local NO FILE TO FLUSH -----------------------------------
+localhost /usr/local NOT FLUSHED
localhost /var/mysql 1 36980 -- FLUSH 0:03 14766.5
(brought to you by Amanda version x.y.z)
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
--- /dev/null
+# an amdump logfile to check amstatus's display of taper-parallel-write > 1
+
+%F log/amdump
+amdump: start at Wed Sep 19 14:35:30 PDT 2012
+amdump: datestamp 20120919
+amdump: starttime 20120919143530
+amdump: starttime-locale-independent 2012-09-19 14:35:30 PDT
+planner: pid 5286 executable /usr/lib/amanda/planner version 3.3.2
+planner: build: VERSION="Amanda-3.3.2"
+planner: BUILT_DATE="Tue Jul 24 13:28:42 PDT 2012" BUILT_MACH=""
+planner: BUILT_REV="4847" BUILT_BRANCH="zmanda_3_3_2"
+planner: CC="i486-linux-gnu-gcc"
+planner: paths: bindir="/usr/bin" sbindir="/usr/sbin"
+planner: libexecdir="/usr/lib" amlibexecdir="/usr/lib/amanda"
+planner: mandir="/usr/share/man" AMANDA_TMPDIR="/tmp/amanda"
+planner: AMANDA_DBGDIR="/var/log/amanda" CONFIG_DIR="/etc/amanda"
+planner: DEV_PREFIX="/dev/" RDEV_PREFIX="/dev/" DUMP="/sbin/dump"
+planner: RESTORE="/sbin/restore" VDUMP=UNDEF VRESTORE=UNDEF
+planner: XFSDUMP="/sbin/xfsdump" XFSRESTORE="/sbin/xfsrestore"
+planner: VXDUMP=UNDEF VXRESTORE=UNDEF
+planner: SAMBA_CLIENT="/usr/bin/smbclient" GNUTAR="/bin/tar"
+planner: COMPRESS_PATH="/bin/gzip" UNCOMPRESS_PATH="/bin/gzip"
+planner: LPRCMD=UNDEF MAILER=UNDEF
+planner: listed_incr_dir="/var/lib/amanda/gnutar-lists"
+planner: defs: DEFAULT_SERVER="localhost" DEFAULT_CONFIG="DailySet1"
+planner: DEFAULT_TAPE_SERVER="localhost" DEFAULT_TAPE_DEVICE=""
+planner: NEED_STRSTR AMFLOCK_POSIX AMFLOCK_FLOCK AMFLOCK_LOCKF
+planner: AMFLOCK_LNLOCK SETPGRP_VOID ASSERTIONS AMANDA_DEBUG_DAYS=4
+planner: BSD_SECURITY USE_AMANDAHOSTS CLIENT_LOGIN="amandabackup"
+planner: CHECK_USERID HAVE_GZIP COMPRESS_SUFFIX=".gz"
+planner: COMPRESS_FAST_OPT="--fast" COMPRESS_BEST_OPT="--best"
+planner: UNCOMPRESS_OPT="-dc"
+READING CONF INFO...
+planner: timestamp 20120919143530
+planner: tape_length is set from tape length (2445312 KB) * runtapes (1000) == 2445312000 KB
+planner: time 0.000: startup took 0.000 secs
+
+SENDING FLUSHES...
+ENDFLUSH
+
+SETTING UP FOR ESTIMATES...
+planner: time 0.000: setting up estimates for localhost:/root/testfile/732mb
+localhost:/root/testfile/732mb overdue 15603 days for level 0
+setup_estimate: localhost:/root/testfile/732mb: command 0, options: none last_level -1 next_level0 -15603 level_days 0 getting estimates 0 (-3) -1 (-3) -1 (-3)
+planner: time 0.000: setting up estimates for centos6-43-client:/root/testfile/36mb
+centos6-43-client:/root/testfile/36mb overdue 15603 days for level 0
+setup_estimate: centos6-43-client:/root/testfile/36mb: command 0, options: none last_level -1 next_level0 -15603 level_days 0 getting estimates 0 (-3) -1 (-3) -1 (-3)
+planner: time 0.001: setting up estimates for qa-debian6-x64-anuj:/root/testfile/146mb
+qa-debian6-x64-anuj:/root/testfile/146mb overdue 15603 days for level 0
+setup_estimate: qa-debian6-x64-anuj:/root/testfile/146mb: command 0, options: none last_level -1 next_level0 -15603 level_days 0 getting estimates 0 (-3) -1 (-3) -1 (-3)
+planner: time 0.001: setting up estimates took 0.000 secs
+
+GETTING ESTIMATES...
+driver: pid 5287 executable /usr/lib/amanda/driver version 3.3.2
+driver: tape size 2445312
+reserving 0 out of 0 for degraded-mode dumps
+driver: started dumper0 pid 5290
+driver: send-cmd time 0.027 to dumper0: START 20120919143530
+driver: started dumper1 pid 5292
+driver: send-cmd time 0.048 to dumper1: START 20120919143530
+driver: send-cmd time 0.049 to taper: START-TAPER worker0 20120919143530
+driver: start time 0.049 inparallel 2 bandwidth 2000000 diskspace 0 dir OBSOLETE datestamp 20120919143530 driver: drain-ends tapeq LARGEST big-dumpers sS
+driver: state time 0.049 free kps: 2000000 space: 0 taper: idle idle-dumpers: 2 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: not-idle
+driver: interface-state time 0.049 if default: free 2000000
+driver: hdisk-state time 0.049
+dumper: pid 5292 executable dumper1 version 3.3.2
+dumper: pid 5290 executable dumper0 version 3.3.2
+planner time 1.062: got result for host qa-debian6-x64-anuj disk /root/testfile/146mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K
+planner time 1.079: got result for host centos6-43-client disk /root/testfile/36mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K
+planner: time 1.143: got partial result for host qa-debian6-x64-anuj disk /root/testfile/146mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K
+planner: time 1.163: got partial result for host centos6-43-client disk /root/testfile/36mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K
+planner time 1.175: got result for host localhost disk /root/testfile/732mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K
+planner: time 1.228: got partial result for host localhost disk /root/testfile/732mb: 0 -> 1000000K, -1 -> -3K, -1 -> -3K
+planner: time 1.266: got partial result for host qa-debian6-x64-anuj disk /root/testfile/146mb: 0 -> 142298K, -1 -> -3K, -1 -> -3K
+driver: state time 1.292 free kps: 2000000 space: 0 taper: idle idle-dumpers: 2 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: not-idle
+driver: interface-state time 1.292 if default: free 2000000
+driver: hdisk-state time 1.292
+driver: result time 1.292 from taper: TAPER-OK worker0
+planner: time 1.375: got partial result for host centos6-43-client disk /root/testfile/36mb: 0 -> 35576K, -1 -> -3K, -1 -> -3K
+planner: time 1.383: got partial result for host localhost disk /root/testfile/732mb: 0 -> 715055K, -1 -> -3K, -1 -> -3K
+planner: time 2.270: got result for host qa-debian6-x64-anuj disk /root/testfile/146mb: 0 -> 142298K, -1 -> -3K, -1 -> -3K
+planner: time 2.379: got result for host centos6-43-client disk /root/testfile/36mb: 0 -> 35576K, -1 -> -3K, -1 -> -3K
+planner: time 2.385: got result for host localhost disk /root/testfile/732mb: 0 -> 715055K, -1 -> -3K, -1 -> -3K
+planner: time 2.386: getting estimates took 2.384 secs
+FAILED QUEUE: empty
+DONE QUEUE:
+ 0: qa-debian6-x64-anuj /root/testfile/146mb
+ 1: centos6-43-client /root/testfile/36mb
+ 2: localhost /root/testfile/732mb
+
+ANALYZING ESTIMATES...
+pondering qa-debian6-x64-anuj:/root/testfile/146mb... next_level0 -15603 last_level -1 (due for level 0) (new disk, can't switch to degraded mode)
+ curr level 0 nsize 142298 csize 142298 total size 142397 total_lev0 142298 balanced-lev0size 28459
+pondering centos6-43-client:/root/testfile/36mb... next_level0 -15603 last_level -1 (due for level 0) (new disk, can't switch to degraded mode)
+ curr level 0 nsize 35576 csize 35576 total size 178006 total_lev0 177874 balanced-lev0size 35574
+pondering localhost:/root/testfile/732mb... next_level0 -15603 last_level -1 (due for level 0) (new disk, can't switch to degraded mode)
+ curr level 0 nsize 715055 csize 715055 total size 893094 total_lev0 892929 balanced-lev0size 178585
+INITIAL SCHEDULE (size 893094):
+ localhost /root/testfile/732mb pri 15604 lev 0 nsize 715055 csize 715055
+ qa-debian6-x64-anuj /root/testfile/146mb pri 15604 lev 0 nsize 142298 csize 142298
+ centos6-43-client /root/testfile/36mb pri 15604 lev 0 nsize 35576 csize 35576
+
+DELAYING DUMPS IF NEEDED, total_size 893094, tape length 2445312000 mark 1
+ delay: Total size now 893094.
+
+PROMOTING DUMPS IF NEEDED, total_lev0 892929, balanced_size 178585...
+planner: time 2.386: analysis took 0.000 secs
+
+GENERATING SCHEDULE:
+--------
+DUMP localhost ffffffff9efefbffffffffff1f /root/testfile/732mb 20120919143530 15604 0 1970:1:1:0:0:0 715055 715055 698 1024 "Skipping: new disk can't be dumped in degraded mode"
+DUMP qa-debian6-x64-anuj ffffffff9efefbffffffffff1f /root/testfile/146mb 20120919143530 15604 0 1970:1:1:0:0:0 142298 142298 138 1024 "Skipping: new disk can't be dumped in degraded mode"
+DUMP centos6-43-client ffffffff9efefbffffffffff1f /root/testfile/36mb 20120919143530 15604 0 1970:1:1:0:0:0 35576 35576 34 1024 "Skipping: new disk can't be dumped in degraded mode"
+--------
+driver: flush size 0
+find diskspace: not enough diskspace. Left with 715104 K
+find diskspace: not enough diskspace. Left with 142336 K
+find diskspace: not enough diskspace. Left with 35616 K
+driver: send-cmd time 2.399 to taper: PORT-WRITE worker0 00-00001 localhost /root/testfile/732mb 0 20120919143530 "" "" "" 0 "" "" "" "" AMANDA
+driver: state time 2.399 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-diskspace
+driver: interface-state time 2.399 if default: free 1998976
+driver: hdisk-state time 2.399
+driver: state time 2.412 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-diskspace
+driver: interface-state time 2.412 if default: free 1998976
+driver: hdisk-state time 2.412
+driver: result time 2.412 from taper: PORT worker0 00-00001 55940 "127.0.0.1:43682"
+driver: send-cmd time 2.413 to dumper1: PORT-DUMP 00-00001 55940 localhost ffffffff9efefbffffffffff1f /root/testfile/732mb /root/testfile/732mb 0 1970:1:1:0:0:0 amgtar "" "" "" "" bsdtcp AMANDA 127.0.0.1:43682 20 |" <auth>bsdtcp</auth>\n <record>YES</record>\n <index>YES</index>\n <datapath>AMANDA</datapath>\n <property>\n <name>zmc-show-advanced</name>\n <value>off</value>\n </property>\n <property>\n <name>zmc-amanda-app</name>\n <value>gtar</value>\n </property>\n <property>\n <name>zmc-amcheck-version</name>\n <value>3.3.2</value>\n </property>\n <property>\n <name>zmc-disklist</name>\n <value>amstatus_test_3</value>\n </property>\n <property>\n <name>zmc-amcheck-app</name>\n <value>1.23</value>\n </property>\n <property>\n <name>zmc-version</name>\n <value>3</value>\n </property>\n <property>\n <name>last-modified-time</name>\n <value encoding=\"raw\" raw=\"MjAxMi0wOS0xOSAxNDoyODo0OA==\">2012-09-19_14:28:48</value>\n </property>\n <property>\n <name>zmc-type</name>\n <value>unix</value>\n </property>\n <property>\n <name>last-modified-by</name>\n <value>admin</value>\n </property>\n <property>\n <name>zmc-amcheck-platform</name>\n <value>6.0.5</value>\n </property>\n <property>\n <name>creation-time</name>\n <value encoding=\"raw\" raw=\"MjAxMi0wOS0xOSAxNDoyODo0OA==\">2012-09-19_14:28:48</value>\n </property>\n <property>\n <name>zmc-amcheck-date</name>\n <value>20120919142848</value>\n </property>\n <property>\n <name>zmc-occ</name>\n <value>80901283870</value>\n </property>\n <backup-program>\n <plugin>amgtar</plugin>\n <property>\n <name>sparse</name>\n <value>yes</value>\n </property>\n <property>\n <name>one-file-system</name>\n <value>yes</value>\n </property>\n <property>\n <name>check-device</name>\n <value>no</value>\n </property>\n <property>\n <name>xattrs</name>\n <value>no</value>\n </property>\n <property>\n <name>acls</name>\n <value>no</value>\n </property>\n <property>\n <name>selinux</name>\n <value>no</value>\n </property>\n <property>\n <name>atime-preserve</name>\n <value>no</value>\n </property>\n <property>\n <name>tar-blocksize</name>\n <value>128</value>\n </property>\n </backup-program>\n"
+taper: status file localhost /root/testfile/732mb:/tmp/amanda/taper_status_file_T2sTK0
+driver: state time 2.577 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 2.577 if default: free 1998976
+driver: hdisk-state time 2.577
+driver: result time 2.577 from taper: REQUEST-NEW-TAPE 00-00001
+driver: send-cmd time 2.577 to taper: START-SCAN worker0 00-00001
+driver: send-cmd time 2.577 to taper: NEW-TAPE worker0 00-00001
+taper: wrote label 'amstatus_test_3-AA-001'
+driver: state time 2.605 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 2.605 if default: free 1998976
+driver: hdisk-state time 2.605
+driver: result time 2.605 from taper: NEW-TAPE 00-00001 amstatus_test_3-AA-001
+driver: send-cmd time 2.605 to taper: START-TAPER worker1 20120919143530
+driver: state time 2.638 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 2.638 if default: free 1998976
+driver: hdisk-state time 2.638
+driver: result time 2.638 from taper: TAPER-OK worker1
+driver: send-cmd time 2.638 to taper: PORT-WRITE worker1 01-00002 centos6-43-client /root/testfile/36mb 0 20120919143530 "" "" "" 0 "" "" "" "" AMANDA
+driver: state time 2.638 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 2.638 if default: free 1997952
+driver: hdisk-state time 2.638
+driver: state time 2.646 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 2.646 if default: free 1997952
+driver: hdisk-state time 2.646
+driver: result time 2.646 from taper: PORT worker1 01-00002 51317 "127.0.0.1:35712"
+driver: send-cmd time 2.646 to dumper0: PORT-DUMP 01-00002 51317 centos6-43-client ffffffff9efefbffffffffff1f /root/testfile/36mb /root/testfile/36mb 0 1970:1:1:0:0:0 amgtar "" "" "" "" bsdtcp AMANDA 127.0.0.1:35712 20 |" <auth>bsdtcp</auth>\n <record>YES</record>\n <index>YES</index>\n <datapath>AMANDA</datapath>\n <property>\n <name>zmc-show-advanced</name>\n <value>off</value>\n </property>\n <property>\n <name>zmc-amanda-app</name>\n <value>gtar</value>\n </property>\n <property>\n <name>zmc-amcheck-version</name>\n <value>3.3.2</value>\n </property>\n <property>\n <name>zmc-disklist</name>\n <value>amstatus_test_3</value>\n </property>\n <property>\n <name>zmc-amcheck-app</name>\n <value>1.23</value>\n </property>\n <property>\n <name>zmc-version</name>\n <value>3</value>\n </property>\n <property>\n <name>last-modified-time</name>\n <value encoding=\"raw\" raw=\"MjAxMi0wOS0xOSAxNDoyOToyMQ==\">2012-09-19_14:29:21</value>\n </property>\n <property>\n <name>zmc-type</name>\n <value>unix</value>\n </property>\n <property>\n <name>last-modified-by</name>\n <value>admin</value>\n </property>\n <property>\n <name>zmc-amcheck-platform</name>\n <value encoding=\"raw\" raw=\"Q2VudE9TICA2LjMgKEZpbmFsKQ==\">CentOS__6.3_(Final)</value>\n </property>\n <property>\n <name>creation-time</name>\n <value encoding=\"raw\" raw=\"MjAxMi0wOS0xOSAxNDoyOToyMQ==\">2012-09-19_14:29:21</value>\n </property>\n <property>\n <name>zmc-amcheck-date</name>\n <value>20120919142922</value>\n </property>\n <property>\n <name>zmc-occ</name>\n <value>80901619884</value>\n </property>\n <backup-program>\n <plugin>amgtar</plugin>\n <property>\n <name>sparse</name>\n <value>yes</value>\n </property>\n <property>\n <name>one-file-system</name>\n <value>yes</value>\n </property>\n <property>\n <name>check-device</name>\n <value>no</value>\n </property>\n <property>\n <name>xattrs</name>\n <value>no</value>\n </property>\n <property>\n <name>acls</name>\n <value>no</value>\n </property>\n <property>\n <name>selinux</name>\n <value>no</value>\n </property>\n <property>\n <name>atime-preserve</name>\n <value>no</value>\n </property>\n <property>\n <name>tar-blocksize</name>\n <value>128</value>\n </property>\n </backup-program>\n"
+taper: status file centos6-43-client /root/testfile/36mb:/tmp/amanda/taper_status_file_EIIMMc
+driver: state time 2.797 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 2.797 if default: free 1997952
+driver: hdisk-state time 2.797
+driver: result time 2.797 from taper: REQUEST-NEW-TAPE 01-00002
+driver: send-cmd time 2.797 to taper: START-SCAN worker1 01-00002
+driver: send-cmd time 2.797 to taper: NEW-TAPE worker1 01-00002
+taper: wrote label 'amstatus_test_3-AA-002'
+driver: state time 2.876 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 2.876 if default: free 1997952
+driver: hdisk-state time 2.876
+driver: result time 2.876 from taper: NEW-TAPE 01-00002 amstatus_test_3-AA-002
+driver: state time 6.224 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 6.224 if default: free 1997952
+driver: hdisk-state time 6.224
+driver: result time 6.224 from taper: PARTDONE 01-00002 amstatus_test_3-AA-002 1 35584 "[sec 3.338940 bytes 36438016 kps 10657.274046]"
+driver: state time 6.226 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 6.226 if default: free 1997952
+driver: hdisk-state time 6.226
+driver: result time 6.226 from dumper0: DONE 01-00002 35584 35584 4 "[sec 3.505 kb 35584 kps 10150.8 orig-kb 35584]"
+driver: finished-cmd time 6.226 dumper0 dumped centos6-43-client:/root/testfile/36mb
+driver: send-cmd time 6.226 to taper: DONE worker1 01-00002 35584
+driver: state time 6.240 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 6.240 if default: free 1997952
+driver: hdisk-state time 6.240
+driver: result time 6.240 from taper: DUMPER-STATUS 01-00002
+driver: send-cmd time 6.240 to taper: DONE worker1 01-00002 35584
+driver: state time 6.243 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 6.243 if default: free 1997952
+driver: hdisk-state time 6.243
+driver: result time 6.243 from taper: DONE 01-00002 INPUT-GOOD TAPE-GOOD "[sec 4.000000 bytes 36438016 kps 8896.000000 orig-kb 35584]" "" ""
+driver: finished-cmd time 6.243 taper wrote centos6-43-client:/root/testfile/36mb
+driver: send-cmd time 6.243 to taper: CLOSE-VOLUME worker1
+driver: send-cmd time 6.244 to taper: PORT-WRITE worker1 01-00003 qa-debian6-x64-anuj /root/testfile/146mb 0 20120919143530 "" "" "" 0 "" "" "" "" AMANDA
+driver: state time 6.244 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 6.244 if default: free 1997952
+driver: hdisk-state time 6.244
+driver: state time 6.263 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 6.263 if default: free 1997952
+driver: hdisk-state time 6.263
+driver: result time 6.263 from taper: PORT worker1 01-00003 35040 "127.0.0.1:54910"
+driver: send-cmd time 6.263 to dumper0: PORT-DUMP 01-00003 35040 qa-debian6-x64-anuj ffffffff9efefbffffffffff1f /root/testfile/146mb /root/testfile/146mb 0 1970:1:1:0:0:0 amgtar "" "" "" "" bsdtcp AMANDA 127.0.0.1:54910 20 |" <auth>bsdtcp</auth>\n <record>YES</record>\n <index>YES</index>\n <datapath>AMANDA</datapath>\n <property>\n <name>zmc-show-advanced</name>\n <value>off</value>\n </property>\n <property>\n <name>zmc-amanda-app</name>\n <value>gtar</value>\n </property>\n <property>\n <name>zmc-amcheck-version</name>\n <value>3.3.2</value>\n </property>\n <property>\n <name>zmc-disklist</name>\n <value>amstatus_test_3</value>\n </property>\n <property>\n <name>zmc-amcheck-app</name>\n <value>1.23</value>\n </property>\n <property>\n <name>zmc-version</name>\n <value>3</value>\n </property>\n <property>\n <name>last-modified-time</name>\n <value encoding=\"raw\" raw=\"MjAxMi0wOS0xOSAxNDoyOTo1Mg==\">2012-09-19_14:29:52</value>\n </property>\n <property>\n <name>zmc-type</name>\n <value>unix</value>\n </property>\n <property>\n <name>last-modified-by</name>\n <value>admin</value>\n </property>\n <property>\n <name>zmc-amcheck-platform</name>\n <value>6.0.5</value>\n </property>\n <property>\n <name>creation-time</name>\n <value encoding=\"raw\" raw=\"MjAxMi0wOS0xOSAxNDoyOTo1Mg==\">2012-09-19_14:29:52</value>\n </property>\n <property>\n <name>zmc-amcheck-date</name>\n <value>20120919143206</value>\n </property>\n <property>\n <name>zmc-occ</name>\n <value>80901928569</value>\n </property>\n <backup-program>\n <plugin>amgtar</plugin>\n <property>\n <name>sparse</name>\n <value>yes</value>\n </property>\n <property>\n <name>one-file-system</name>\n <value>yes</value>\n </property>\n <property>\n <name>check-device</name>\n <value>no</value>\n </property>\n <property>\n <name>xattrs</name>\n <value>no</value>\n </property>\n <property>\n <name>acls</name>\n <value>no</value>\n </property>\n <property>\n <name>selinux</name>\n <value>no</value>\n </property>\n <property>\n <name>atime-preserve</name>\n <value>no</value>\n </property>\n <property>\n <name>tar-blocksize</name>\n <value>128</value>\n </property>\n </backup-program>\n"
+taper: status file qa-debian6-x64-anuj /root/testfile/146mb:/tmp/amanda/taper_status_file_R4zzdU
+driver: state time 10.772 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 10.772 if default: free 1997952
+driver: hdisk-state time 10.772
+driver: result time 10.772 from taper: REQUEST-NEW-TAPE 01-00003
+driver: state time 42.899 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 42.899 if default: free 1997952
+driver: hdisk-state time 42.899
+driver: result time 42.900 from dumper1: DONE 00-00001 715072 715072 40 "[sec 40.387 kb 715072 kps 17705.5 orig-kb 715072]"
+driver: finished-cmd time 42.900 dumper1 dumped localhost:/root/testfile/732mb
+driver: send-cmd time 42.900 to taper: DONE worker0 00-00001 715072
+driver: state time 42.903 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 42.903 if default: free 1997952
+driver: hdisk-state time 42.903
+driver: result time 42.903 from taper: PARTDONE 00-00001 amstatus_test_3-AA-001 1 715072 "[sec 40.253966 bytes 732233728 kps 17764.013439]"
+driver: state time 42.928 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 42.928 if default: free 1997952
+driver: hdisk-state time 42.928
+driver: result time 42.928 from taper: DUMPER-STATUS 00-00001
+driver: send-cmd time 42.928 to taper: DONE worker0 00-00001 715072
+driver: state time 42.944 free kps: 1997952 space: 0 taper: writing idle-dumpers: 0 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 42.944 if default: free 1997952
+driver: hdisk-state time 42.944
+driver: result time 42.944 from taper: DONE 00-00001 INPUT-GOOD TAPE-GOOD "[sec 41.000000 bytes 732233728 kps 17440.780488 orig-kb 715072]" "" ""
+driver: finished-cmd time 42.944 taper wrote localhost:/root/testfile/732mb
+driver: send-cmd time 42.944 to taper: CLOSE-VOLUME worker0
+driver: send-cmd time 42.947 to taper: TAKE-SCRIBE-FROM worker1 01-00003 worker0
+driver: state time 42.947 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 42.947 if default: free 1998976
+driver: hdisk-state time 42.947
+driver: state time 42.966 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 42.966 if default: free 1998976
+driver: hdisk-state time 42.966
+driver: result time 42.966 from taper: REQUEST-NEW-TAPE 01-00003
+driver: send-cmd time 42.966 to taper: START-SCAN worker1 01-00003
+driver: send-cmd time 42.966 to taper: NEW-TAPE worker1 01-00003
+taper: wrote label 'amstatus_test_3-AA-003'
+driver: state time 43.011 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 43.011 if default: free 1998976
+driver: hdisk-state time 43.011
+driver: result time 43.011 from taper: NEW-TAPE 01-00003 amstatus_test_3-AA-003
+driver: send-cmd time 43.011 to taper: START-TAPER worker0 20120919143530
+driver: state time 43.064 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 43.064 if default: free 1998976
+driver: hdisk-state time 43.064
+driver: result time 43.064 from taper: TAPER-OK worker0
+driver: state time 82.686 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 82.686 if default: free 1998976
+driver: hdisk-state time 82.686
+driver: result time 82.686 from taper: PARTDONE 01-00003 amstatus_test_3-AA-003 1 142336 "[sec 39.671814 bytes 145752064 kps 3587.836922]"
+driver: state time 82.692 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 82.692 if default: free 1998976
+driver: hdisk-state time 82.692
+driver: result time 82.692 from dumper0: DONE 01-00003 142336 142336 73 "[sec 72.703 kb 142336 kps 1957.8 orig-kb 142336]"
+driver: finished-cmd time 82.692 dumper0 dumped qa-debian6-x64-anuj:/root/testfile/146mb
+driver: send-cmd time 82.692 to taper: DONE worker1 01-00003 142336
+driver: state time 82.694 free kps: 1998976 space: 0 taper: writing idle-dumpers: 1 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 82.694 if default: free 1998976
+driver: hdisk-state time 82.694
+driver: result time 82.694 from taper: DONE 01-00003 INPUT-GOOD TAPE-GOOD "[sec 72.000000 bytes 145752064 kps 1976.888889]" "" ""
+driver: finished-cmd time 82.694 taper wrote qa-debian6-x64-anuj:/root/testfile/146mb
+driver: send-cmd time 82.694 to taper: CLOSE-VOLUME worker1
+driver: state time 82.695 free kps: 2000000 space: 0 taper: idle idle-dumpers: 2 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: no-dumpers
+driver: interface-state time 82.695 if default: free 2000000
+driver: hdisk-state time 82.695
+driver: QUITTING time 82.695 telling children to quit
+driver: send-cmd time 82.695 to dumper0: QUIT ""
+driver: send-cmd time 82.695 to dumper1: QUIT ""
+driver: send-cmd time 82.698 to taper: QUIT
+driver: FINISHED time 83.698
+amdump: end at Wed Sep 19 14:36:53 PDT 2012
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
if ($uname =~ /\.fc16\./) { #like fc15
$fc15 = 1;
}
+ if ($uname =~ /\.fc17\./) { #like fc15
+ $fc15 = 1;
+ }
}
# see if the default for --wildcards during inclusion has been changed
#! @PERL@
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#! @PERL@
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#! @PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#! @PERL@
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
-use Test::More tests => 269;
+use Test::More tests => 277;
use strict;
use warnings;
# functions to create dumpfiles
sub write_dumpfile_header_to {
- my ($fh, $size, $hostname, $disk, $expect_failure) = @_;
+ my ($fh, $size, $hostname, $disk, $is_partial) = @_;
my $hdr = Amanda::Header->new();
$hdr->{'type'} = $Amanda::Header::F_DUMPFILE;
$hdr->{'comp_suffix'} = ".foo";
$hdr->{'name'} = $hostname;
$hdr->{'disk'} = $disk;
+ $hdr->{'is_partial'} = 1 if defined $is_partial;
$hdr->{'program'} = "INSTALLCHECK";
$hdr = $hdr->to_string(32768,32768);
# make a new holding-like file in test_filename
sub make_holding_file {
- my ($size, $hostname, $disk) = @_;
+ my ($size, $hostname, $disk, $is_partial) = @_;
open(my $fh, ">", $test_filename);
- write_dumpfile_header_to($fh, $size, $hostname, $disk);
+ write_dumpfile_header_to($fh, $size, $hostname, $disk, $is_partial);
write_dumpfile_data_to($fh, $size, $hostname, $disk);
}
ReuseAddr => 1,
);
- write_dumpfile_header_to($sock, $size, $hostname, $disk, $expect_error);
+ write_dumpfile_header_to($sock, $size, $hostname, $disk);
close $sock;
$sock = IO::Socket::INET->new(
}, "header on file 4 is correct");
}
+##
+# A multipart FILE-WRITE partial dump.
+
+$handle = '11-22223';
+$datestamp = "20070102030406";
+run_taper(4096, "multipart partial FILE-WRITE");
+like(taper_reply, qr/^TAPER-OK worker0$/,
+ "got TAPER-OK") or die;
+make_holding_file(1024*1024, "localhost", "/usr", 1);
+taper_cmd("FILE-WRITE worker0 $handle \"$test_filename\" localhost /usr 0 $datestamp 524288 \"\" \"\" 1 \"\" \"\" \"\" \"\" 512");
+like(taper_reply, qr/^REQUEST-NEW-TAPE $handle$/,
+ "got REQUEST-NEW-TAPE worker0 $handle") or die;
+taper_cmd("START-SCAN worker0 $handle");
+taper_cmd("NEW-TAPE worker0 $handle");
+like(taper_reply, qr/^NEW-TAPE $handle TESTCONF01$/,
+ "got proper NEW-TAPE worker0 $handle") or die;
+like(taper_reply, qr/^PARTDONE $handle TESTCONF01 1 512 "\[sec [\d.]+ bytes 524288 kps [\d.]+ orig-kb 512\]"$/,
+ "got PARTDONE for filenum 1") or die;
+like(taper_reply, qr/^PARTDONE $handle TESTCONF01 2 512 "\[sec [\d.]+ bytes 524288 kps [\d.]+ orig-kb 512\]"$/,
+ "got PARTDONE for filenum 2") or die;
+like(taper_reply, qr/^DONE $handle INPUT-GOOD TAPE-GOOD "\[sec [\d.]+ bytes 1048576 kps [\d.]+ orig-kb 512\]" "" ""$/,
+ "got DONE") or die;
+taper_cmd("QUIT");
+wait_for_exit();
+
+check_logs([
+ qr(^INFO taper Slot 1 without label can be labeled$),
+ qr(^START taper datestamp $datestamp label TESTCONF01 tape 1$),
+ qr(^PART taper TESTCONF01 1 localhost /usr $datestamp 1/-1 0 \[sec [\d.]+ bytes 524288 kps [\d.]+ orig-kb 512\]$),
+ qr(^PART taper TESTCONF01 2 localhost /usr $datestamp 2/-1 0 \[sec [\d.]+ bytes 524288 kps [\d.]+ orig-kb 512\]$),
+ qr(^PARTIAL taper localhost /usr $datestamp 2 0 \[sec [\d.]+ bytes 1048576 kps [\d.]+ orig-kb 512\]$),
+ qr(^INFO taper tape TESTCONF01 kb 1024 fm 3 \[OK\]$),
+], "multi-part partial dump logged correctly");
+
##
# A PORT-WRITE with no disk buffer
like(taper_reply, qr/^REQUEST-NEW-TAPE $handle$/,
"got REQUEST-NEW-TAPE worker0 $handle") or die;
taper_cmd("NO-NEW-TAPE worker0 $handle sorry");
-like(taper_reply, qr/^FAILED $handle INPUT-GOOD TAPE-ERROR "" "?sorry"?.*$/,
+like(taper_reply, qr/^FAILED $handle INPUT-GOOD TAPE-CONFIG "" "?sorry"?.*$/,
"got FAILED") or die;
taper_cmd("QUIT");
wait_for_exit();
like(taper_reply, qr/^REQUEST-NEW-TAPE $handle$/,
"got REQUEST-NEW-TAPE worker0 $handle") or die;
taper_cmd("NO-NEW-TAPE worker0 $handle \"that's enough\"");
-like(taper_reply, qr/^PARTIAL $handle INPUT-GOOD TAPE-ERROR "\[sec [\d.]+ bytes 262144 kps [\d.]+ orig-kb 1312\]" "" "that's enough"$/,
+like(taper_reply, qr/^PARTIAL $handle INPUT-GOOD TAPE-CONFIG "\[sec [\d.]+ bytes 262144 kps [\d.]+ orig-kb 1312\]" "" "that's enough"$/,
"got PARTIAL") or die;
taper_cmd("QUIT");
wait_for_exit();
like(taper_reply, qr/^REQUEST-NEW-TAPE $handle$/,
"got REQUEST-NEW-TAPE worker0 $handle") or die;
taper_cmd("NO-NEW-TAPE worker0 $handle \"sorry\"");
-like(taper_reply, qr/^FAILED $handle INPUT-GOOD TAPE-ERROR "" "?sorry"?.*$/,
+like(taper_reply, qr/^FAILED $handle INPUT-GOOD TAPE-CONFIG "" "?sorry"?.*$/,
"got FAILED") or die;
taper_cmd("QUIT");
wait_for_exit();
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Makefile for amanda man-pages
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
man5dir = $(mandir)/man5
am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" \
"$(DESTDIR)$(man8dir)"
-rm -rf .libs _libs
install-man5: $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
- @list=''; test -n "$(man5dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
- l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.5[a-z]*$$/p'; \
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man5dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.5[a-z]*$$/p'; \
+ fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
sed -n '/\.5[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
+ dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
install-man7: $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man7dir)" || $(MKDIR_P) "$(DESTDIR)$(man7dir)"
- @list=''; test -n "$(man7dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
- l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.7[a-z]*$$/p'; \
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man7dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man7dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man7dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.7[a-z]*$$/p'; \
+ fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
sed -n '/\.7[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man7dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man7dir)" && rm -f $$files; }
+ dir='$(DESTDIR)$(man7dir)'; $(am__uninstall_files_from_dir)
install-man8: $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
- @list=''; test -n "$(man8dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
- l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.8[a-z]*$$/p'; \
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man8dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.8[a-z]*$$/p'; \
+ fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
sed -n '/\.8[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+ dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
.\" Title: amaddclient
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMADDCLIENT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMADDCLIENT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amadmin
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMADMIN" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMADMIN" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
amadmin \- administrative interface to control Amanda backups
.SH "SYNOPSIS"
.HP \w'\fBamadmin\fR\ 'u
-\fBamadmin\fR [\-\-version] [\-\-no\-default] [\-\-print\-source] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIcommand\fR [\fIcommand_options\fR...]
+\fBamadmin\fR [\-\-version] [\-\-no\-default] [\-\-print\-source] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIcommand\fR [\fIcommand_options\fR...]
.SH "DESCRIPTION"
.PP
\fBAmadmin\fR
.PP
\fB\-\-print\-source\fR
.RS 4
-Print where a value is definedi for
+Print where a value is defined for
\fBconfig\fR
and
\fBdisklist\fR
commands\&.
.RE
+.PP
+\fB\-\-exact\-match\fR
+.RS 4
+The host and disk are parsed as exact values
+.RE
.SH "COMMANDS"
.PP
Commands that take a
.\" Title: amaespipe
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMAESPIPE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMAESPIPE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amanda-applications
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: Miscellanea
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-APPLICATIONS" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea"
+.TH "AMANDA\-APPLICATIONS" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amanda-archive-format
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: File formats and conventions
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-ARCHIVE\-FOR" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions"
+.TH "AMANDA\-ARCHIVE\-FOR" "5" "01/10/2013" "Amanda 3\&.3\&.3" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amanda-auth
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: Miscellanea
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-AUTH" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea"
+.TH "AMANDA\-AUTH" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amanda-changers
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: Miscellanea
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-CHANGERS" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea"
+.TH "AMANDA\-CHANGERS" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.fi
.PP
This changer driver allow to use two or more changers or standalone drive in sequence\&.
+.SS "Properties"
+.PP
+LOCK\-TIMEOUT
+.RS 4
+
+The time in seconds amanda wait to lock the statefile (default:1000)
+.RE
+.PP
+STATE_FILENAME
+.RS 4
+
+The name of the state file (default: "$CONFIG_DIR/$changer_name\&.state"\&.
+.RE
.SS "chg\-disk:VTAPEROOT (new)"
.nf
tpchanger "chg\-disk:/var/mnt/vtapes"
If a slotN directory in the range 1 to NUM\-SLOT does not already exist, and this property is true, then the changer will create the directory\&.
.RE
.PP
+LOCK\-TIMEOUT
+.RS 4
+
+The time in seconds amanda wait to lock the statefile (default:1000)
+.RE
+.PP
MOUNT
.RS 4
This property gives the number of the first slot\&. The default value is "1"\&.
.RE
+.PP
+LOCK\-TIMEOUT
+.RS 4
+
+The time in seconds amanda wait to lock the statefile (default:1000)
+.RE
.SS "Special Operations"
.PP
A number of special operations are available for
\fB"0s poll 3s until 2m"\fR\&.
.RE
.PP
+LOCK\-TIMEOUT
+.RS 4
+
+The time in seconds amanda wait to lock the statefile (default:1000)
+.RE
+.PP
MTX
.RS 4
.\" Title: amanda-client.conf
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: File formats and conventions
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-CLIENT\&.CON" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions"
+.TH "AMANDA\-CLIENT\&.CON" "5" "01/10/2013" "Amanda 3\&.3\&.3" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amanda-compatibility
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: Miscellanea
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-COMPATIBILIT" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea"
+.TH "AMANDA\-COMPATIBILIT" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amanda-devices
.\" Author: Ian Turner <ian@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: Miscellanea
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-DEVICES" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea"
+.TH "AMANDA\-DEVICES" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
(read\-write) Which API to use for the cloud:
.nf
S3 Amanzon S3 api
- SWITF\-1\&.0 Openstack swift v1\&.0
+ SWIFT\-1\&.0 Openstack swift v1\&.0
SWIFT\-2\&.0 Openstack swift v2\&.0
+ OAUTH2 Google
+ CASTOR Caringo CAStor
.fi
.RE
.PP
.\" Title: amanda-interactivity
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: Miscellanea
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-INTERACTIVIT" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea"
+.TH "AMANDA\-INTERACTIVIT" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amanda-match
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: Miscellanea
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-MATCH" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea"
+.TH "AMANDA\-MATCH" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Several Amanda commands allow the user to specify dumps using "match expressions"\&. This manual page describes the syntax of these expressions\&.
.PP
In some places, only certain match expressions are allowed\&. However, several commands take a dump specification ("dumpspec") consisting of a sequence of several expressions intended to match particular dumps in the catalog\&. Other applications take a DLE specification which indicates a set of DLEs to be operated on\&. These formats are described below\&.
+.PP
+An expression can be disabled be preceding it with the \*(Aq=\*(Aq character, in that case, an exact match is used\&.
+.PP
+Many program have an \*(Aq\-\-exact\-match\*(Aq argument that disable expression and exact match are used\&.
.SH "HOST & DISK EXPRESSIONS"
.PP
The hosts and disks match by word\&. Each word is a glob expression, and words are separated by the character \*(Aq\&.\*(Aq for host expressions and \*(Aq/\*(Aq for disk expressions\&. You can anchor the expression on the left with a \*(Aq^\*(Aq or on the right with a \*(Aq$\*(Aq\&. The matcher is case insensitive for hosts but case sensitive for disks\&. A match succeeds if all words in the expression match contiguous words in the host or disk\&.
.\" Title: amanda-scripts
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: Miscellanea
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-SCRIPTS" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea"
+.TH "AMANDA\-SCRIPTS" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amanda-taperscan
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: Miscellanea
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\-TAPERSCAN" "7" "07/25/2012" "Amanda 3\&.3\&.2" "Miscellanea"
+.TH "AMANDA\-TAPERSCAN" "7" "01/10/2013" "Amanda 3\&.3\&.3" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amanda
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMANDA" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amanda.conf
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: File formats and conventions
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMANDA\&.CONF" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions"
+.TH "AMANDA\&.CONF" "5" "01/10/2013" "Amanda 3\&.3\&.3" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RE
.RE
.PP
+\fBreport\-use\-media\fR \fIboolean\fR
+.RS 4
+Default:
+\fITrue\fR
+if
+\fBmax\-dle\-by\-volume\fR
+is not set,
+\fIFalse\fR
+if it is set\&. If the reporter must print the list of media used in the run\&.
+.RE
+.PP
+\fBreport\-next\-media\fR \fIboolean\fR
+.RS 4
+Default:
+\fITrue\fR
+if
+\fBmax\-dle\-by\-volume\fR
+is not set,
+\fIFalse\fR
+if it is set\&. If the reporter must print the list of media expected for the next run\&.
+.RE
+.PP
\fBmax\-dle\-by\-volume\fR \fIint\fR
.RS 4
Default:
.PP
\fBpart\-size\fR \fIint\fR
.RS 4
-Default: none\&. This is the size (in KB if no units are specified) of each split part written to the volume\&. It is reduced to
-\fBpart\-cache\-max\-size\fR
-when part caching is required\&. If this is set to zero, then no splitting will take place; in this case, some devices can span dumps from volume to volume, while others will cause the entire dump to fail if they encounter end\-of\-medium before the dump is complete\&. See "Dump Splitting Configuration" below\&.
+If this is set to zero (default), then no splitting will take place, and the entire dump will fail, if end\-of\-medium is encountered before the dump is complete, unless the device property LEOM is true, and the device can detect EOM\&. See "Dump Splitting Configuration" below\&.
.RE
.PP
\fBpart\-cache\-type\fR [ \fBnone\fR | \fBdisk\fR | \fBmemory\fR ]
.\" Title: amarchiver
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMARCHIVER" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMARCHIVER" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amcheck
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMCHECK" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMCHECK" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
amcheck \- run Amanda self\-checks
.SH "SYNOPSIS"
.HP \w'\fBamcheck\fR\ 'u
-\fBamcheck\fR [\-am] [\-w] [\-sclt] [\-M\ \fIaddress\fR] [\-\-client\-verbose] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
+\fBamcheck\fR [\-am] [\-w] [\-sclt] [\-M\ \fIaddress\fR] [\-\-client\-verbose] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
.SH "DESCRIPTION"
.PP
\fBAmcheck\fR
Print all client messages\&.
.RE
.PP
+\fB\-\-exact\-match\fR
+.RS 4
+The host and disk are parsed as exact values
+.RE
+.PP
\fIhost\fR [\fIdisk\fR]*
.RS 4
Specify the host and disk on which the command will work\&.
.\" Title: amcheckdb
.\" Author: Adrian T. Filipi-Martin <atf3r@cs.virginia.edu>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMCHECKDB" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMCHECKDB" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amcheckdump
.\" Author: Ian Turner <ian@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMCHECKDUMP" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMCHECKDUMP" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amcleanup
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMCLEANUP" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMCLEANUP" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amcleanupdisk
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMCLEANUPDISK" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMCLEANUPDISK" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amcrypt-ossl-asym
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMCRYPT\-OSSL\-ASYM" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMCRYPT\-OSSL\-ASYM" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amcrypt-ossl
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMCRYPT\-OSSL" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMCRYPT\-OSSL" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amcrypt
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMCRYPT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMCRYPT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amcryptsimple
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMCRYPTSIMPLE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMCRYPTSIMPLE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amdevcheck
.\" Author: Ian Turner <ian@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMDEVCHECK" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMDEVCHECK" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amdump
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMDUMP" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMDUMP" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
amdump \- back up all disks in an Amanda configuration
.SH "SYNOPSIS"
.HP \w'\fBamdump\fR\ 'u
-\fBamdump\fR [\fB\-\-no\-taper\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
+\fBamdump\fR [\-\-no\-taper] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
.SH "DESCRIPTION"
.PP
\fBAmdump\fR
\fBamanda-match\fR(7)\&.
.RE
.PP
+\fB\-\-exact\-match\fR
+.RS 4
+The host and disk are parsed as exact values
+.RE
+.PP
\fB\-o \fR\fB\fIconfigoption\fR\fR
.RS 4
See the "CONFIGURATION OVERRIDE" section in
.\" Title: amdump_client
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMDUMP_CLIENT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMDUMP_CLIENT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amfetchdump
.\" Author: John Stange <building@nap.edu>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMFETCHDUMP" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMFETCHDUMP" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
amfetchdump \- extract backup images from multiple Amanda tapes\&.
.SH "SYNOPSIS"
.HP \w'\fBamfetchdump\fR\ 'u
-\fBamfetchdump\fR [\-c | \-C | \-l] [\-p | \-n] [\-a] [\-O\ \fIdirectory\fR] [\-d\ \fIdevice\fR] [\-h | \-\-header\-file\ \fIfilename\fR | \-\-header\-fd\ \fIfd\fR] [\-\-decompress | \-\-no\-decompress | \-\-server\-decompress | \-\-client\-decompress] [\-\-decrypt | \-\-no\-decrypt | \-\-server\-decrypt | \-\-client\-decrypt] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIhostname\fR [\fIdisk\fR\ [\ \fIdate\fR\ [\ \fIlevel\fR\ [\ \fIhostname\fR\ [\&.\&.\&.]\ ]\ ]\ ]]
+\fBamfetchdump\fR [\-c | \-C | \-l] [\-p | \-n] [\-a] [\-O\ \fIdirectory\fR] [\-d\ \fIdevice\fR] [\-h | \-\-header\-file\ \fIfilename\fR | \-\-header\-fd\ \fIfd\fR] [\-\-decompress | \-\-no\-decompress | \-\-server\-decompress | \-\-client\-decompress] [\-\-extract\ \-\-directory\fI\ directory\fR\ [\-\-data\-path\fI\ amanda|directtcp\fR]\ [\-\-application\-property\ \fINAME=VALUE\fR]*] [\-\-decrypt | \-\-no\-decrypt | \-\-server\-decrypt | \-\-client\-decrypt] [\-\-exact_match] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR \fIhostname\fR [\fIdisk\fR\ [\ \fIdate\fR\ [\ \fIlevel\fR\ [\ \fIhostname\fR\ [\&.\&.\&.]\ ]\ ]\ ]]
.SH "DESCRIPTION"
.PP
\fBAmfetchdump\fR
Do the decryption only if the encryption was done on the client\&.
.RE
.PP
+\fB\-\-exact\-match\fR
+.RS 4
+The host and disk are parsed as exact values
+.RE
+.PP
+\fB\-\-extract\fR
+.RS 4
+Extract the backup on the server in the
+\fIdirectory\fR
+directory\&.
+.RE
+.PP
+\fB\-\-directory\fR \fIdirectory\fR
+.RS 4
+Where to extract the backup with the
+\fB\-\-extract\fR
+option\&.
+.sp
+Warning: All files in that directory can be removed\&.
+.RE
+.PP
+\fB\-\-data\-path\fR amanda|directtcp
+.RS 4
+The data path to use with
+\fB\-\-extract\fR, the default is to use the fatest data path\&.
+.RE
+.PP
+\fB\-\-application\-property\fR \fINAME=VALUE\fR
+.RS 4
+Application property to send to the application with
+\fB\-\-extract\&.\fR
+.RE
+.PP
\fB\-l\fR
.RS 4
Leave dumps in the compressed/uncompressed and encrypted/unencrypted state in which they were found on tape\&. It is a synonym for
.\" Title: amflush
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMFLUSH" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMFLUSH" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
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] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
+\fBamflush\fR [\-b] [\-f] [\-\-exact\-match] [\-s] [\-D\ \fIdatestamp\fR] [\fB\-o\fR\ \fIconfigoption\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
.SH "DESCRIPTION"
.PP
\fBAmflush\fR
will flush all dumps from 25 december 2000 to 27 december 2000\&.
.RE
.PP
+\fB\-\-exact\-match\fR
+.RS 4
+The host and disk are parsed as exact values
+.RE
+.PP
\fIhost\fR [\fIdisk\fR]*
.RS 4
Specify the host and disk on which the command will work \-\- see the description of DLE specifications in
.\" Title: amgetconf
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMGETCONF" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMGETCONF" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amgpgcrypt
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMGPGCRYPT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMGPGCRYPT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amgtar
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMGTAR" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMGTAR" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amlabel
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMLABEL" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMLABEL" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amoverview
.\" Author: Stefan G. Weichinger <sgw@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMOVERVIEW" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMOVERVIEW" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: ampgsql
.\" Author: Nikolas Coukouma <atrus@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMPGSQL" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMPGSQL" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amplot
.\" Author: Olafur Gudmundsson <ogud@tis.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMPLOT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMPLOT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amraw
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMRAW" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMRAW" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amrecover
.\" Author: Alan M. McIvor <alan@kauri.auck.irl.cri.nz>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMRECOVER" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMRECOVER" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amreport
.\" Author: Stefan G. Weichinger <sgw@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMREPORT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMREPORT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amrestore
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMRESTORE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMRESTORE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
amrestore \- low\-level data\-extraction from Amanda volumes
.SH "SYNOPSIS"
.HP \w'\fBamrestore\fR\ 'u
-\fBamrestore\fR [\-\-config\ \fIconfig\fR] [\-r | \-c | \-C] [\-b\ \fIblocksize\fR] [\-f\ \fIfilenum\fR] [\-l\ \fIlabel\fR] [\-p] [\-h] [\fB\-o\fR\ \fIconfigoption\fR...] [{\fIchangerspec\fR} | {[\-\-holding]\ \fIholdingfile\fR}] [\fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ [\ \fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ \&.\&.\&.\ ]\ ]\ ]\ ]\ ]]
+\fBamrestore\fR [\-\-config\ \fIconfig\fR] [\-r | \-c | \-C] [\-b\ \fIblocksize\fR] [\-f\ \fIfilenum\fR] [\-l\ \fIlabel\fR] [\-p] [\-h] [\-\-exact\-match] [\fB\-o\fR\ \fIconfigoption\fR...] [{\fIchangerspec\fR} | {[\-\-holding]\ \fIholdingfile\fR}] [\fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ [\ \fIhostname\fR\ [\ \fIdiskname\fR\ [\ \fIdatestamp\fR\ \&.\&.\&.\ ]\ ]\ ]\ ]\ ]]
.PP
Note that this is the only Amanda command which does not take a configuration name as its first argument\&.
.SH "DESCRIPTION"
extension\&.
.RE
.PP
+\fB\-\-exact\-match\fR
+.RS 4
+The host and disk are parsed as exact values
+.RE
+.PP
\fB\-o \fR\fB\fIconfigoption\fR\fR
.RS 4
See the "CONFIGURATION OVERRIDE" section in
.\" Title: amrmtape
.\" Author: Adrian T. Filipi-Martin <atf3r@cs.virginia.edu>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMRMTAPE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMRMTAPE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amsamba
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMSAMBA" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMSAMBA" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amserverconfig
.\" Author: Kevin Till <kevin.till@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMSERVERCONFIG" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMSERVERCONFIG" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amservice
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMSERVICE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMSERVICE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amstar
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMSTAR" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMSTAR" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amstatus
.\" Author: Stefan G. Weichinger <sgw@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMSTATUS" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMSTATUS" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amsuntar
.\" Author: Satya Ganga <gast@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMSUNTAR" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMSUNTAR" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amtape
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMTAPE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMTAPE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amtapetype
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMTAPETYPE" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMTAPETYPE" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amtoc
.\" Author: Nicolas Mayencourt <Nicolas.Mayencourt@cui.unige.ch>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMTOC" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMTOC" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amvault
.\" Author: Dustin J. Mitchell <dustin@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMVAULT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMVAULT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
amvault \- Copy Amanda dumps from one volume to another
.SH "SYNOPSIS"
.HP \w'\fBamvault\fR\ 'u
-\fBamvault\fR [\fB\-o\fR\ \fIconfigoption\fR...] [\-\-dry\-run | \-n] [\-\-quiet | \-q] [\-\-fulls\-only] [\-\-export] [\fB\-\-src\-timestamp\fR\ \fIsrc\-timestamp\fR]
+\fBamvault\fR [\fB\-o\fR\ \fIconfigoption\fR...] [\-\-dry\-run | \-n] [\-\-quiet | \-q] [\-\-fulls\-only] [\-\-exact\-match] [\-\-export] [\fB\-\-src\-timestamp\fR\ \fIsrc\-timestamp\fR]
.br
\fB\-\-label\-template\fR\ \fIlabel\-template\fR \fB\-\-dst\-changer\fR\ \fIdst\-changer\fR [\fB\-\-autolabel\fR\ \fIautolabel\-arg\fR...]
.br
Cause amvault to print the dumps it would vault, but not actually perform any vaulting operations\&.
.RE
.PP
+\fB\-\-exact\-match\fR
+.RS 4
+The host and disk are parsed as exact values
+.RE
+.PP
\fB\-\-export\fR
.RS 4
Cause amvault to attempt to move completed tertiary volumes to import/export slots, where they can be more easily removed by an operator\&.
.\" Title: amzfs-sendrecv
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMZFS\-SENDRECV" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMZFS\-SENDRECV" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: amzfs-snapshot
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "AMZFS\-SNAPSHOT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "AMZFS\-SNAPSHOT" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: disklist
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: File formats and conventions
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "DISKLIST" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions"
+.TH "DISKLIST" "5" "01/10/2013" "Amanda 3\&.3\&.3" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: script-email
.\" Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: System Administration Commands
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "SCRIPT\-EMAIL" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
+.TH "SCRIPT\-EMAIL" "8" "01/10/2013" "Amanda 3\&.3\&.3" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" Title: tapelist
.\" Author: James da Silva <jds@amanda.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2012
+.\" Date: 01/10/2013
.\" Manual: File formats and conventions
-.\" Source: Amanda 3.3.2
+.\" Source: Amanda 3.3.3
.\" Language: English
.\"
-.TH "TAPELIST" "5" "07/25/2012" "Amanda 3\&.3\&.2" "File formats and conventions"
+.TH "TAPELIST" "5" "01/10/2013" "Amanda 3\&.3\&.3" "File formats and conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
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 [BARCODE:barcode] [META:meta] [#comment]
+YYYYMMDD label flags [BARCODE:barcode] [META:meta] [BLOCKSIZE:blocksize] [#comment]
.fi
.PP
Where
dumps\&. See the
\fBreuse\fR
options of
-\fBamadmin\fR(8)\&. The optional barcode is prefixed with \*(AqBARCODE\*(Aq if the volume have a barcode\&. The optional meta label is prefixed with \*(AqMETA\*(Aq if the volume is on a meta volume\&. The optional comment is prefixed with a \*(Aq#\*(Aq 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 \*(AqBARCODE\*(Aq if the volume have a barcode\&. The optional meta label is prefixed with \*(AqMETA\*(Aq if the volume is on a meta volume\&. The optional blocksize is prefixed with \*(AqBLOCKSIZE\*(Aq\&. The optional comment is prefixed with a \*(Aq#\*(Aq 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
<arg choice='opt'>--version</arg>
<arg choice='opt'>--no-default</arg>
<arg choice='opt'>--print-source</arg>
+ <arg choice='opt'>--exact-match</arg>
&configoverride.synopsis;
<arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='plain'><replaceable>command</replaceable></arg>
</varlistentry>
<varlistentry>
<term><option>--print-source</option></term>
-<listitem><para>Print where a value is definedi for <emphasis remap='B'>config</emphasis>
+<listitem><para>Print where a value is defined for <emphasis remap='B'>config</emphasis>
and <emphasis remap='B'>disklist</emphasis> commands.</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--exact-match</option></term>
+<listitem><para>The host and disk are parsed as exact values</para></listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<para>This changer driver allow to use two or more changers or standalone
drive in sequence.</para>
+<refsect3><title>Properties</title>
+<!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
+
+<variablelist>
+<!-- ==== -->
+<varlistentry><term>LOCK-TIMEOUT</term><listitem>
+The time in seconds amanda wait to lock the statefile (default:1000)
+</listitem></varlistentry>
+<!-- ==== -->
+<varlistentry><term>STATE_FILENAME</term><listitem>
+The name of the state file (default: "$CONFIG_DIR/$changer_name.state".
+</listitem></varlistentry>
+</variablelist>
+</refsect3>
</refsect2>
<refsect2><title>chg-disk:VTAPEROOT (new)</title>
If a <computeroutput>slotN</computeroutput> directory in the range 1 to NUM-SLOT does not already exist, and this property is true, then the changer will create the directory.
</listitem></varlistentry>
<!-- ==== -->
+<varlistentry><term>LOCK-TIMEOUT</term><listitem>
+The time in seconds amanda wait to lock the statefile (default:1000)
+</listitem></varlistentry>
+<!-- ==== -->
<varlistentry><term>MOUNT</term><listitem>
If this property is true, the changer try to mount the removable disk if nothing is mounted. The system must be configured to allow the amanda user to mount it.
</listitem></varlistentry>
This property gives the number of the first slot. The default value is "1".
</listitem></varlistentry>
<!-- ==== -->
+<varlistentry><term>LOCK-TIMEOUT</term><listitem>
+The time in seconds amanda wait to lock the statefile (default:1000)
+</listitem></varlistentry>
+<!-- ==== -->
</variablelist>
</refsect3>
</para>
</listitem></varlistentry>
<!-- ==== -->
+<varlistentry><term>LOCK-TIMEOUT</term><listitem>
+The time in seconds amanda wait to lock the statefile (default:1000)
+</listitem></varlistentry>
+<!-- ==== -->
<varlistentry><term>MTX</term><listitem>
The path to the 'mtx' binary. The default value is defined at compile time.
</listitem></varlistentry>
(read-write) Which API to use for the cloud:
<programlisting>
S3 Amanzon S3 api
- SWITF-1.0 Openstack swift v1.0
+ SWIFT-1.0 Openstack swift v1.0
SWIFT-2.0 Openstack swift v2.0
+ OAUTH2 Google
+ CASTOR Caringo CAStor
</programlisting>
</listitem></varlistentry>
<!-- ==== -->
catalog. Other applications take a DLE specification which indicates a set
of DLEs to be operated on. These formats are described below.</para>
+<para>An expression can be disabled be preceding it with the '=' character,
+in that case, an exact match is used.</para>
+<para>Many program have an '--exact-match' argument that disable expression and exact match are used.</para>
</refsect1>
<refsect1><title>HOST & DISK EXPRESSIONS</title>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><amkeyword>report-use-media</amkeyword> <amtype>boolean</amtype></term>
+ <listitem>
+<para>Default:
+<amdefault>True</amdefault> if <amkeyword>max-dle-by-volume</amkeyword>
+is not set,
+<amdefault>False</amdefault> if it is set.
+If the reporter must print the list of media used in the run.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><amkeyword>report-next-media</amkeyword> <amtype>boolean</amtype></term>
+ <listitem>
+<para>Default:
+<amdefault>True</amdefault> if <amkeyword>max-dle-by-volume</amkeyword>
+is not set,
+<amdefault>False</amdefault> if it is set.
+If the reporter must print the list of media expected for the next run.</para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><amkeyword>max-dle-by-volume</amkeyword> <amtype>int</amtype></term>
<listitem>
<varlistentry>
<term><amkeyword>part-size</amkeyword> <amtype>int</amtype></term>
<listitem>
-<para>Default: none. This is the size (in KB if no units are specified) of
-each split part written to the volume. It is reduced to
-<amkeyword>part-cache-max-size</amkeyword> when part caching is required.
-If this is set to zero, then no splitting will take place; in this case,
-some devices can span dumps from volume to volume, while others will cause
-the entire dump to fail if they encounter end-of-medium before the dump is
-complete. See "Dump Splitting Configuration" below.</para>
+<para>If this is set to zero (default), then no splitting will take place,
+and the entire dump will fail, if end-of-medium is encountered before
+the dump is complete, unless the device property LEOM is true, and the
+device can detect EOM. See "Dump Splitting Configuration" below.</para>
</listitem>
</varlistentry>
<arg choice='opt'>-sclt</arg>
<arg choice='opt'>-M <replaceable>address</replaceable></arg>
<arg choice='opt'>--client-verbose</arg>
+ <arg choice='opt'>--exact-match</arg>
&configoverride.synopsis;
<arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='opt' rep='repeat'>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--exact-match</option></term>
+ <listitem>
+<para>The host and disk are parsed as exact values</para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><replaceable>host</replaceable> [<replaceable>disk</replaceable>]*</term>
<listitem>
<refsynopsisdiv>
<cmdsynopsis>
<command>amdump</command>
- <arg choice='opt'><option>--no-taper</option></arg>
+ <arg choice='opt'>--no-taper</arg>
+ <arg choice='opt'>--exact-match</arg>
&configoverride.synopsis;
<arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='opt' rep='repeat'>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--exact-match</option></term>
+ <listitem>
+<para>The host and disk are parsed as exact values</para>
+ </listitem>
+ </varlistentry>
+
&configoverride.varlistentry;
</variablelist>
<arg choice='plain'>--server-decompress</arg>
<arg choice='plain'>--client-decompress</arg>
</group>
+ <arg>
+ <arg choice='plain'>--extract</arg>
+ <arg choice='plain'>--directory<replaceable> directory</replaceable></arg>
+ <arg choice='opt'>--data-path<replaceable> amanda|directtcp</replaceable></arg>
+ <arg choice='opt'>--application-property <replaceable>NAME=VALUE</replaceable></arg>*
+ </arg>
<group choice='opt'>
<arg choice='plain'>--decrypt</arg>
<arg choice='plain'>--no-decrypt</arg>
<arg choice='plain'>--server-decrypt</arg>
<arg choice='plain'>--client-decrypt</arg>
</group>
+ <arg choice='opt'>--exact_match</arg>
&configoverride.synopsis;
<arg choice='plain'><replaceable>config</replaceable></arg>
<arg choice='plain'><replaceable>hostname</replaceable></arg>
<listitem><para>Do the decryption only if the encryption was done on
the client.</para></listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>--exact-match</option></term>
+ <listitem>
+<para>The host and disk are parsed as exact values</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--extract</option></term>
+ <listitem>
+<para>Extract the backup on the server in the
+<replaceable>directory</replaceable> directory.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--directory</option> <replaceable>directory</replaceable></term>
+ <listitem>
+<para>Where to extract the backup with the <option>--extract</option> option.</para>
+<para>Warning: All files in that directory can be removed.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--data-path</option> amanda|directtcp</term>
+ <listitem>
+<para>The data path to use with <option>--extract</option>, the default is
+ to use the fatest data path.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--application-property</option> <replaceable>NAME=VALUE</replaceable></term>
+ <listitem>
+<para>Application property to send to the application with
+<option>--extract.</option></para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>-l</option></term>
<listitem><para>Leave dumps in the compressed/uncompressed and
<command>amflush</command>
<arg choice='opt'>-b</arg>
<arg choice='opt'>-f</arg>
+ <arg choice='opt'>--exact-match</arg>
<arg choice='opt'>-s</arg>
<arg choice='opt'>-D <replaceable>datestamp</replaceable></arg>
&configoverride.synopsis;
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--exact-match</option></term>
+ <listitem>
+<para>The host and disk are parsed as exact values</para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><replaceable>host</replaceable> [<replaceable>disk</replaceable>]*</term>
<listitem>
<arg choice='opt'>-l <replaceable>label</replaceable></arg>
<arg choice='opt'>-p</arg>
<arg choice='opt'>-h</arg>
+ <arg choice='opt'>--exact-match</arg>
&configoverride.synopsis;
<group>
<arg choice='req'><replaceable>changerspec</replaceable></arg>
disables any automatic decompression. Output file names will have a
<filename>.RAW</filename> extension.</para>
</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><option>--exact-match</option></term>
+<listitem>
+<para>The host and disk are parsed as exact values</para>
+</listitem>
</varlistentry>
&configoverride.varlistentry;
<group choice='opt'><arg choice='plain'>--dry-run</arg><arg choice='plain'>-n</arg></group>
<group choice='opt'><arg choice='plain'>--quiet</arg><arg choice='plain'>-q</arg></group>
<arg choice='opt'>--fulls-only </arg>
+ <arg choice='opt'>--exact-match </arg>
<arg choice='opt'>--export </arg>
<arg choice='opt'><option>--src-timestamp</option>
<replaceable>src-timestamp</replaceable></arg>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--exact-match</option></term>
+ <listitem>
+<para>The host and disk are parsed as exact values</para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>--export</option></term>
<listitem>
versions of Amanda. It contains lines of the form:</para>
<para><programlisting>
-YYYYMMDD label flags [BARCODE:barcode] [META:meta] [#comment]
+YYYYMMDD label flags [BARCODE:barcode] [META:meta] [BLOCKSIZE:blocksize] [#comment]
</programlisting></para>
<para>Where
<manref name="amadmin" vol="8"/>.
The optional barcode is prefixed with 'BARCODE' if the volume have a barcode.
The optional meta label is prefixed with 'META' if the volume is on a meta volume.
+The optional blocksize is prefixed with 'BLOCKSIZE'.
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>
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)"
LTLIBRARIES = $(amlib_LTLIBRARIES)
libndmjob_la_DEPENDENCIES = libndmlib.la
$(amndmjob_SOURCES) $(ndmjob_SOURCES)
DIST_SOURCES = $(libndmjob_la_SOURCES) $(libndmlib_la_SOURCES) \
$(amndmjob_SOURCES) $(ndmjob_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
@list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \
}
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libndmjob.la: $(libndmjob_la_OBJECTS) $(libndmjob_la_DEPENDENCIES)
+libndmjob.la: $(libndmjob_la_OBJECTS) $(libndmjob_la_DEPENDENCIES) $(EXTRA_libndmjob_la_DEPENDENCIES)
$(libndmjob_la_LINK) -rpath $(amlibdir) $(libndmjob_la_OBJECTS) $(libndmjob_la_LIBADD) $(LIBS)
-libndmlib.la: $(libndmlib_la_OBJECTS) $(libndmlib_la_DEPENDENCIES)
+libndmlib.la: $(libndmlib_la_OBJECTS) $(libndmlib_la_DEPENDENCIES) $(EXTRA_libndmlib_la_DEPENDENCIES)
$(libndmlib_la_LINK) -rpath $(amlibdir) $(libndmlib_la_OBJECTS) $(libndmlib_la_LIBADD) $(LIBS)
install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_PROGRAMS)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-amndmjob$(EXEEXT): $(amndmjob_OBJECTS) $(amndmjob_DEPENDENCIES)
+amndmjob$(EXEEXT): $(amndmjob_OBJECTS) $(amndmjob_DEPENDENCIES) $(EXTRA_amndmjob_DEPENDENCIES)
@rm -f amndmjob$(EXEEXT)
$(LINK) $(amndmjob_OBJECTS) $(amndmjob_LDADD) $(LIBS)
-ndmjob$(EXEEXT): $(ndmjob_OBJECTS) $(ndmjob_DEPENDENCIES)
+ndmjob$(EXEEXT): $(ndmjob_OBJECTS) $(ndmjob_DEPENDENCIES) $(EXTRA_ndmjob_DEPENDENCIES)
@rm -f ndmjob$(EXEEXT)
$(LINK) $(ndmjob_OBJECTS) $(ndmjob_LDADD) $(LIBS)
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
char ** pp;
char * p;
char * op;
- char * av[1000];
+ char ** av;
int ac = 0;
progname = argv[0];
+ av = malloc((argc+1000) * sizeof(char *));
if (argc == 2 && strcmp (argv[1], "-help") == 0) {
help();
d_agent[size] = '\0';
if (size > 0 && d_agent[size-1] == '\n')
d_agent[size-1] = '\0';
+ close(fd);
if (ndmagent_from_str (&D_data_agent, d_agent)) {
error_byebye ("bad -D-agent-fd argument");
}
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
}
}
-typedef struct notify_data {
+typedef struct notify_data_s {
NDMPConnection *self;
ndmp9_data_halt_reason *data_halt_reason;
ndmp9_mover_halt_reason *mover_halt_reason;
GMutex *abort_mutex;
GCond *abort_cond;
int status;
+ int in_use;
event_handle_t *read_event;
-} notify_data;
+} notify_data_t;
static void handle_notify(void *cookie);
+static GStaticMutex notify_mutex = G_STATIC_MUTEX_INIT;
+static notify_data_t **notify_data = NULL;
+static int nb_notify_data = 0;
int
ndmp_connection_wait_for_notify_with_cond(
NDMPConnection *self,
ndmp9_mover_halt_reason *mover_halt_reason,
ndmp9_mover_pause_reason *mover_pause_reason,
guint64 *mover_pause_seek_position,
+ int *cancelled,
GMutex *abort_mutex,
GCond *abort_cond)
{
struct ndmp_msg_buf nmb;
- notify_data ndata;
+ notify_data_t *ndata;
gboolean found = FALSE;
-
- ndata.self = self;
- ndata.data_halt_reason= data_halt_reason;
- ndata.mover_halt_reason= mover_halt_reason;
- ndata.mover_pause_reason= mover_pause_reason;
- ndata.mover_pause_seek_position = mover_pause_seek_position;
- ndata.abort_mutex = abort_mutex;
- ndata.abort_cond = abort_cond;
- ndata.status = 2;
+ int status;
+ int i;
+
+ g_static_mutex_lock(¬ify_mutex);
+ if (notify_data == NULL) {
+ glib_init();
+ nb_notify_data = 10;
+ notify_data = g_new0(notify_data_t *, nb_notify_data);
+ for (i=0;i<nb_notify_data;i++) {
+ notify_data[i] = g_new0(notify_data_t, 1);
+ }
+ }
+ /* find a not used notify_data */
+ ndata = *notify_data;
+ i = 0;
+ while (i< nb_notify_data && notify_data[i]->in_use > 0) {
+ i++;
+ }
+ if (i == nb_notify_data) {
+ int new_nb_notify_data = nb_notify_data * 2;
+ int j;
+ notify_data = g_realloc(notify_data,
+ sizeof(notify_data_t *) * new_nb_notify_data);
+ for (j=nb_notify_data; j<new_nb_notify_data; j++) {
+ notify_data[j] = g_new0(notify_data_t, 1);
+ }
+ nb_notify_data = new_nb_notify_data;
+ ndata = notify_data[i];
+ }
+ ndata = notify_data[i];
+ ndata->self = self;
+ ndata->data_halt_reason= data_halt_reason;
+ ndata->mover_halt_reason= mover_halt_reason;
+ ndata->mover_pause_reason= mover_pause_reason;
+ ndata->mover_pause_seek_position = mover_pause_seek_position;
+ ndata->abort_mutex = abort_mutex;
+ ndata->abort_cond = abort_cond;
+ ndata->status = 2;
+ ndata->in_use = 1;
+ g_static_mutex_unlock(¬ify_mutex);
g_assert(!self->startup_err);
* outside of the ndmlib_mutex critical section. This will also be
* useful to allow the wait to be aborted. */
- ndata.read_event = event_register(self->conn->chan.fd,
- EV_READFD, handle_notify, &ndata);
+ /* handle_notify can be executed before the register exit */
+ ndata->read_event = event_create(self->conn->chan.fd,
+ EV_READFD, handle_notify, ndata);
+ event_activate(ndata->read_event);
- g_cond_wait(abort_cond, abort_mutex);
+ while (!*cancelled && ndata->status == 2) {
+ g_cond_wait(abort_cond, abort_mutex);
+ }
+ g_static_mutex_lock(¬ify_mutex);
- if (ndata.read_event) {
- event_release(ndata.read_event);
+ if (ndata->read_event) {
+ event_release(ndata->read_event);
+ ndata->read_event = NULL;
}
- if (ndata.status == 2) {
+ if (ndata->status == 2) {
ndmp_connection_mover_abort(self);
ndmp_connection_mover_stop(self);
}
- return ndata.status;
+ status = ndata->status;
+ ndata->in_use++;
+ if (ndata->in_use == 3)
+ ndata->in_use = 0;
+ g_static_mutex_unlock(¬ify_mutex);
+ return status;
}
static void
handle_notify(void *cookie)
{
- notify_data *ndata = cookie;
+ notify_data_t *ndata = cookie;
struct ndmp_msg_buf nmb;
gboolean found = FALSE;
+ GCond *abort_cond = ndata->abort_cond;
+ GMutex *abort_mutex = ndata->abort_mutex;
- g_mutex_lock(ndata->abort_mutex);
-
- event_release(ndata->read_event);
- ndata->read_event = NULL;
+ g_mutex_lock(abort_mutex);
g_static_mutex_lock(&ndmlib_mutex);
NDMOS_MACRO_ZEROFILL(&nmb);
}
if (!found) {
- ndata->read_event = event_register(ndata->self->conn->chan.fd,
- EV_READFD, handle_notify, ndata);
- g_mutex_unlock(ndata->abort_mutex);
+ g_static_mutex_lock(¬ify_mutex);
+ if (ndata->in_use == 2) {
+ goto notify_done_locked;
+ }
+ g_static_mutex_unlock(¬ify_mutex);
+
+ g_mutex_unlock(abort_mutex);
return;
}
ndata->status = 0;
notify_done:
- g_cond_broadcast(ndata->abort_cond);
- g_mutex_unlock(ndata->abort_mutex);
+ g_static_mutex_lock(¬ify_mutex);
+notify_done_locked:
+ if (ndata->read_event) {
+ event_release(ndata->read_event);
+ ndata->read_event = NULL;
+ }
+ ndata->in_use++;
+ if (ndata->in_use == 3)
+ ndata->in_use = 0;
+ g_static_mutex_unlock(¬ify_mutex);
+
+ g_cond_broadcast(abort_cond);
+ g_mutex_unlock(abort_mutex);
}
/*
* Class Mechanics
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Parent class for connections
*/
-typedef struct NDMPConnection_ {
+typedef struct NDMPConnection {
GObject __parent__;
/* the ndmconn - interface to ndmlib */
/* Synchronous notification interface. This handles all types of notification,
* returning the result in the appropriate output parameter. */
-gboolean ndmp_connection_wait_for_notify_with_cond(
+int ndmp_connection_wait_for_notify_with_cond(
NDMPConnection *self,
/* NDMP_NOTIFY_DATA_HALTED */
ndmp9_data_halt_reason *data_halt_reason,
/* NDMP_NOTIFY_MOVER_PAUSED */
ndmp9_mover_pause_reason *mover_pause_reason,
guint64 *mover_pause_seek_position,
+ int *cancelled,
GMutex *abort_mutex,
GCond *abort_cond);
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
+LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+ --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS)
YLWRAP = $(top_srcdir)/config/ylwrap
-YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
+ --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS)
SOURCES = $(amoldrecover_SOURCES)
DIST_SOURCES = $(amoldrecover_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
echo " rm -f" $$list; \
rm -f $$list
uparse.h: uparse.c
- @if test ! -f $@; then \
- rm -f uparse.c; \
- $(MAKE) $(AM_MAKEFLAGS) uparse.c; \
- else :; fi
-amoldrecover$(EXEEXT): $(amoldrecover_OBJECTS) $(amoldrecover_DEPENDENCIES)
+ @if test ! -f $@; then rm -f uparse.c; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) uparse.c; else :; fi
+amoldrecover$(EXEEXT): $(amoldrecover_OBJECTS) $(amoldrecover_DEPENDENCIES) $(EXTRA_amoldrecover_DEPENDENCIES)
@rm -f amoldrecover$(EXEEXT)
$(LINK) $(amoldrecover_OBJECTS) $(amoldrecover_LDADD) $(LIBS)
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
act.sa_handler = sigint_handler;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
+#ifdef SA_RESTORER
+ act.sa_restorer = NULL;
+#endif
if (sigaction(SIGINT, &act, &oact) != 0) {
error(_("error setting signal handler: %s"), strerror(errno));
/*NOTREACHED*/
service_name = stralloc2("amandaidx", SERVICE_SUFFIX);
g_printf(_("AMRECOVER Version %s. Contacting server on %s ...\n"),
- VERSION, server_name);
+ VERSION, server_name);
if ((sp = getservbyname(service_name, "tcp")) == NULL) {
error(_("%s/tcp unknown protocol"), service_name);
/*NOTREACHED*/
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/* Copy the first part of user declarations. */
/* Line 268 of yacc.c */
-#line 31 "uparse.y"
+#line 32 "uparse.y"
#include "amanda.h"
#include "amrecover.h"
{
/* Line 293 of yacc.c */
-#line 42 "uparse.y"
+#line 43 "uparse.y"
int intval;
double floatval;
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 65, 65, 66, 67, 68, 69, 70, 71, 72,
- 73, 74, 75, 84, 85, 86, 87, 88, 89, 90,
- 91, 92, 93, 94, 95, 100, 108, 109, 110, 111,
- 112, 113, 114, 118, 122, 126, 127, 131, 135, 136,
- 140, 144, 145, 149, 153, 154, 158, 159, 166, 170
+ 0, 66, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 101, 109, 110, 111, 112,
+ 113, 114, 115, 119, 123, 127, 128, 132, 136, 137,
+ 141, 145, 146, 150, 154, 155, 159, 160, 167, 171
};
#endif
case 12:
/* Line 1806 of yacc.c */
-#line 75 "uparse.y"
+#line 76 "uparse.y"
{
char * errstr = vstralloc("Invalid command: ", yytext, NULL);
yyerror(errstr);
case 13:
/* Line 1806 of yacc.c */
-#line 84 "uparse.y"
+#line 85 "uparse.y"
{ list_host(); }
break;
case 14:
/* Line 1806 of yacc.c */
-#line 85 "uparse.y"
+#line 86 "uparse.y"
{ list_disk((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 15:
/* Line 1806 of yacc.c */
-#line 86 "uparse.y"
+#line 87 "uparse.y"
{ list_disk(NULL); }
break;
case 16:
/* Line 1806 of yacc.c */
-#line 87 "uparse.y"
+#line 88 "uparse.y"
{ set_date((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 17:
/* Line 1806 of yacc.c */
-#line 88 "uparse.y"
+#line 89 "uparse.y"
{ set_host((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 18:
/* Line 1806 of yacc.c */
-#line 89 "uparse.y"
+#line 90 "uparse.y"
{ set_disk((yyvsp[(2) - (3)].strval), (yyvsp[(3) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(3) - (3)].strval)); }
break;
case 19:
/* Line 1806 of yacc.c */
-#line 90 "uparse.y"
+#line 91 "uparse.y"
{ set_disk((yyvsp[(2) - (2)].strval), NULL); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 20:
/* Line 1806 of yacc.c */
-#line 91 "uparse.y"
+#line 92 "uparse.y"
{ set_tape((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 21:
/* Line 1806 of yacc.c */
-#line 92 "uparse.y"
+#line 93 "uparse.y"
{ set_tape(""); }
break;
case 22:
/* Line 1806 of yacc.c */
-#line 93 "uparse.y"
+#line 94 "uparse.y"
{ cd_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 23:
/* Line 1806 of yacc.c */
-#line 94 "uparse.y"
+#line 95 "uparse.y"
{ cd_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 24:
/* Line 1806 of yacc.c */
-#line 95 "uparse.y"
+#line 96 "uparse.y"
{
#ifdef SAMBA_CLIENT
set_mode(SAMBA_SMBCLIENT);
case 25:
/* Line 1806 of yacc.c */
-#line 100 "uparse.y"
+#line 101 "uparse.y"
{
#ifdef SAMBA_CLIENT
set_mode(SAMBA_TAR);
case 26:
/* Line 1806 of yacc.c */
-#line 108 "uparse.y"
+#line 109 "uparse.y"
{ list_disk_history(); }
break;
case 27:
/* Line 1806 of yacc.c */
-#line 109 "uparse.y"
+#line 110 "uparse.y"
{ list_directory(); }
break;
case 28:
/* Line 1806 of yacc.c */
-#line 110 "uparse.y"
+#line 111 "uparse.y"
{ display_extract_list((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 29:
/* Line 1806 of yacc.c */
-#line 111 "uparse.y"
+#line 112 "uparse.y"
{ display_extract_list(NULL); }
break;
case 30:
/* Line 1806 of yacc.c */
-#line 112 "uparse.y"
+#line 113 "uparse.y"
{ show_directory(); }
break;
case 31:
/* Line 1806 of yacc.c */
-#line 113 "uparse.y"
+#line 114 "uparse.y"
{ clear_extract_list(); }
break;
case 32:
/* Line 1806 of yacc.c */
-#line 114 "uparse.y"
+#line 115 "uparse.y"
{ show_mode (); }
break;
case 33:
/* Line 1806 of yacc.c */
-#line 118 "uparse.y"
+#line 119 "uparse.y"
{ quit(); }
break;
case 35:
/* Line 1806 of yacc.c */
-#line 126 "uparse.y"
+#line 127 "uparse.y"
{ add_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 36:
/* Line 1806 of yacc.c */
-#line 127 "uparse.y"
+#line 128 "uparse.y"
{ add_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
break;
case 38:
/* Line 1806 of yacc.c */
-#line 135 "uparse.y"
+#line 136 "uparse.y"
{ add_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 39:
/* Line 1806 of yacc.c */
-#line 136 "uparse.y"
+#line 137 "uparse.y"
{ add_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
break;
case 41:
/* Line 1806 of yacc.c */
-#line 144 "uparse.y"
+#line 145 "uparse.y"
{ delete_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 42:
/* Line 1806 of yacc.c */
-#line 145 "uparse.y"
+#line 146 "uparse.y"
{ delete_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
break;
case 44:
/* Line 1806 of yacc.c */
-#line 153 "uparse.y"
+#line 154 "uparse.y"
{ delete_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 45:
/* Line 1806 of yacc.c */
-#line 154 "uparse.y"
+#line 155 "uparse.y"
{ delete_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
break;
case 46:
/* Line 1806 of yacc.c */
-#line 158 "uparse.y"
+#line 159 "uparse.y"
{ char buf[STR_SIZE]; puts(getcwd(buf, sizeof(buf))); }
break;
case 47:
/* Line 1806 of yacc.c */
-#line 159 "uparse.y"
+#line 160 "uparse.y"
{
local_cd((yyvsp[(2) - (2)].strval));
amfree((yyvsp[(2) - (2)].strval));
case 48:
/* Line 1806 of yacc.c */
-#line 166 "uparse.y"
+#line 167 "uparse.y"
{ help_list(); }
break;
case 49:
/* Line 1806 of yacc.c */
-#line 170 "uparse.y"
+#line 171 "uparse.y"
{ extract_files(); }
break;
/* Line 2067 of yacc.c */
-#line 174 "uparse.y"
+#line 175 "uparse.y"
void
{
/* Line 2068 of yacc.c */
-#line 42 "uparse.y"
+#line 43 "uparse.y"
int intval;
double floatval;
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* amanda, the advanced maryland automatic network disk archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
*
* lexer for amrecover interactive language
*/
-#line 32 "uscan.l"
+#line 33 "uscan.l"
#include "amanda.h"
#include "uparse.h"
static int ll_parse_date(int type, char *text);
int process_line(char *line);
-#line 62 "uscan.l"
+#line 63 "uscan.l"
static char *string_buf = NULL;
-#line 593 "uscan.c"
+#line 594 "uscan.c"
#define INITIAL 0
#define quotedpath 1
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 65 "uscan.l"
+#line 66 "uscan.l"
/* literal keyword tokens */
-#line 783 "uscan.c"
+#line 784 "uscan.c"
if ( !(yy_init) )
{
case 1:
YY_RULE_SETUP
-#line 71 "uscan.l"
+#line 72 "uscan.l"
{ return LISTHOST; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 72 "uscan.l"
+#line 73 "uscan.l"
{ return LISTDISK; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 73 "uscan.l"
+#line 74 "uscan.l"
{ return SETHOST; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 74 "uscan.l"
+#line 75 "uscan.l"
{ return SETDISK; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 75 "uscan.l"
+#line 76 "uscan.l"
{ return SETDATE; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 76 "uscan.l"
+#line 77 "uscan.l"
{ return SETMODE; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 77 "uscan.l"
+#line 78 "uscan.l"
{ return SETTAPE; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 78 "uscan.l"
+#line 79 "uscan.l"
{ return CD; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 79 "uscan.l"
+#line 80 "uscan.l"
{ return CDX; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 80 "uscan.l"
+#line 81 "uscan.l"
{ return QUIT; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 81 "uscan.l"
+#line 82 "uscan.l"
{ return QUIT; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 82 "uscan.l"
+#line 83 "uscan.l"
{ return DHIST; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 83 "uscan.l"
+#line 84 "uscan.l"
{ return LS; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 84 "uscan.l"
+#line 85 "uscan.l"
{ return ADD; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 85 "uscan.l"
+#line 86 "uscan.l"
{ return ADDX; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 86 "uscan.l"
+#line 87 "uscan.l"
{ return LIST; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 87 "uscan.l"
+#line 88 "uscan.l"
{ return DELETE; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 88 "uscan.l"
+#line 89 "uscan.l"
{ return DELETEX; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 89 "uscan.l"
+#line 90 "uscan.l"
{ return PWD; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 90 "uscan.l"
+#line 91 "uscan.l"
{ return CLEAR; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 91 "uscan.l"
+#line 92 "uscan.l"
{ return HELP; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 92 "uscan.l"
+#line 93 "uscan.l"
{ return HELP; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 93 "uscan.l"
+#line 94 "uscan.l"
{ return LCD; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 94 "uscan.l"
+#line 95 "uscan.l"
{ return LPWD; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 95 "uscan.l"
+#line 96 "uscan.l"
{ return EXTRACT; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 96 "uscan.l"
+#line 97 "uscan.l"
{ return SMB; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 97 "uscan.l"
+#line 98 "uscan.l"
{ return TAR; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 98 "uscan.l"
+#line 99 "uscan.l"
{ return MODE; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 104 "uscan.l"
+#line 105 "uscan.l"
{ return ll_parse_date(1, yytext); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 105 "uscan.l"
+#line 106 "uscan.l"
{ return ll_parse_date(2, yytext); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 106 "uscan.l"
+#line 107 "uscan.l"
{ return ll_parse_date(3, yytext); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 107 "uscan.l"
+#line 108 "uscan.l"
{ return ll_parse_date(4, yytext); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 108 "uscan.l"
+#line 109 "uscan.l"
{ return ll_parse_date(5, yytext); }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 114 "uscan.l"
+#line 115 "uscan.l"
{
if(string_buf != NULL) {
g_printf("ERROR:string_buf != NULL: %s\n",string_buf);
case 35:
/* rule 35 can match eol */
YY_RULE_SETUP
-#line 122 "uscan.l"
+#line 123 "uscan.l"
{
strappend(string_buf, yytext);
}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 126 "uscan.l"
+#line 127 "uscan.l"
{
/* escaped character (including quote) */
strappend(string_buf, yytext);
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 131 "uscan.l"
+#line 132 "uscan.l"
{ /* saw closing quote - all done */
strappend(string_buf, yytext);
yylval.strval = string_buf;
case 38:
YY_RULE_SETUP
-#line 143 "uscan.l"
+#line 144 "uscan.l"
{
yylval.strval = stralloc(yytext);
return PATH;
case 39:
/* rule 39 can match eol */
YY_RULE_SETUP
-#line 152 "uscan.l"
+#line 153 "uscan.l"
; /* whitespace */
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 165 "uscan.l"
+#line 166 "uscan.l"
ECHO;
YY_BREAK
-#line 1109 "uscan.c"
+#line 1110 "uscan.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(quotedpath):
yyterminate();
#define YYTABLES_NAME "yytables"
-#line 165 "uscan.l"
+#line 166 "uscan.l"
/*
* amanda, the advanced maryland automatic network disk archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX_BACKUP = @AIX_BACKUP@
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
# A non-annoying way to log stuff
# ${@} is all the parameters, also known as the message. Quoting the input
# preserves whitespace.
- msg="`date +'%b %e %Y %T'`: ${@}"
+ msg="`date +'%b %d %Y %T'`: ${@}"
echo "${msg}" >> ${LOGFILE}
}
reload_xinetd() {
# Default action is to try reload.
- if [ "x$1" = "x" ]; then
- action="reload"
- elif [ "$1" = "reload" ] || [ "$1" = "restart" ]; then
- action="$1"
- else
- logger "WARNING: bad argument to reload_xinetd: $1"
- return 1
- fi
+ case $1 in
+ reload|restart|start) action=$1 ;;
+ "") action=reload ;;
+ *) logger "WARNING: bad argument to reload_xinetd: $1"
+ return 1
+ ;;
+ esac
+
if [ "$action" = "reload" ] ; then
logger "Reloading xinetd configuration..."
log_output_of ${SYSCONFDIR}/init.d/xinetd $action # Don't exit!
if [ $? -ne 0 ] ; then
logger "xinetd reload failed. Attempting restart..."
- log_output_of ${SYSCONFDIR}/init.d/xinetd restart || \
- { logger "WARNING: restart failed." ; return 1; }
+ action=restart
fi
- else
- # Must be restart...
- logger "Restarting xinetd."
- log_output_of ${SYSCONFDIR}/init.d/xinetd $1 || \
- { logger "WARNING: ${1} failed." ; return 1; }
+ fi
+ if [ "$action" = "restart" ] || [ "$action" = "start" ]; then
+ logger "${action}ing xinetd."
+ log_output_of ${SYSCONFDIR}/init.d/xinetd $action || \
+ { logger "WARNING: $action failed." ; return 1; }
fi
}
# os: Linux, Mac, Solaris, etc...
# SYSCONFDIR: location of system config files (ie, /etc)
# LOGDIR: logging directory for amanda
+# encoder: either base64 or uuencode depending on the default for this platform
#TODO: gnutar-lists dir for solaris??
fi
}
+get_random_lines() {
+ # Print $1 lines of random strings to stdout.
+
+ [ "$1" ] && [ $1 -gt 0 ] || \
+ { logger "Error: '$1' not valid number of lines" ; return 1 ; }
+ lines=$1
+ [ -f "${encoder}" ] || \
+ { logger "Warning: Encoder '${encoder}' was not found. Random passwords cannot be generated." ; return 1; }
+ case ${encoder} in
+ # "foo" is a required parameter that we throw away.
+ *uuencode*) enc_cmd="${encoder} foo" ;;
+ *base64*) enc_cmd="${encoder}" ;;
+ esac
+ # Uuencode leaves a header (and footer) line, but base64 does not.
+ # So we pad output with an extra line, and strip any trailing lines over
+ # $lines
+ pad_lines=`expr $lines + 1`
+ # Increasing bs= is substantially faster than increasing count=.
+ # The number of bytes needed to start line wrapping is implementation
+ # specific. base64. 60b > 1 base64 encoded line for all versions tested.
+ block_size=`expr $pad_lines \* 60`
+ # Head -c is not portable.
+ dd bs=${block_size} count=1 if=/dev/urandom 2>/dev/null | \
+ ${enc_cmd} | \
+ head -$pad_lines | \
+ tail -$lines || \
+ { logger "Warning: Error generating random passphrase."; return 1; }
+}
+
+create_ampassphrase() {
+ # install am_passphrase file to server
+ logger "Checking '${AMANDAHOMEDIR}/.am_passphrase' file."
+ if [ ! -f ${AMANDAHOMEDIR}/.am_passphrase ] ; then
+ # Separate file creation from password creation to ease debugging.
+ logger "Creating '${AMANDAHOMEDIR}/.am_passphrase' file."
+ log_output_of touch ${AMANDAHOMEDIR}/.am_passphrase || \
+ { logger "WARNING: Could not create .am_passphrase." ; return 1; }
+ phrase=`get_random_lines 1` || return 1 # Error already logged
+ echo ${phrase} >>${AMANDAHOMEDIR}/.am_passphrase
+ else
+ logger "Info: ${AMANDAHOMEDIR}/.am_passphrase already exists."
+ fi
+ # Fix permissions for both new or existing installations.
+ log_output_of chown ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.am_passphrase || \
+ { logger "WARNING: Could not chown .am_passphrase" ; return 1; }
+ log_output_of chmod 0600 ${AMANDAHOMEDIR}/.am_passphrase || \
+ { logger "WARNING: Could not fix permissions on .am_passphrase" ; return 1; }
+}
+
+create_amkey() {
+ [ -f ${AMANDAHOMEDIR}/.am_passphrase ] || \
+ { logger "Error: ${AMANDAHOMEDIR}/.am_passphrase is missing, can't create amcrypt key."; return 1; }
+ logger "Creating encryption key for amcrypt"
+ if [ ! -f ${AMANDAHOMEDIR}/.gnupg/am_key.gpg ]; then
+ # TODO: don't write this stuff to disk!
+ get_random_lines 50 >${AMANDAHOMEDIR}/.gnupg/am_key || return 1
+ exec 3<${AMANDAHOMEDIR}/.am_passphrase
+ # setting homedir prevents some errors, but creates a permissions
+ # warning. perms are fixed in check_gnupg.
+ log_output_of gpg --homedir ${AMANDAHOMEDIR}/.gnupg \
+ --no-permission-warning \
+ --no-use-agent \
+ --armor \
+ --batch \
+ --symmetric \
+ --passphrase-fd 3 \
+ --output ${AMANDAHOMEDIR}/.gnupg/am_key.gpg \
+ ${AMANDAHOMEDIR}/.gnupg/am_key || \
+ { logger "WARNING: Error encrypting keys." ;
+ rm ${AMANDAHOMEDIR}/.gnupg/am_key;
+ return 1; }
+ # Be nice and clean up.
+ exec 3<&-
+ else
+ logger "Info: Encryption key '${AMANDAHOMEDIR}/.gnupg/am_key.gpg' already exists."
+ fi
+ # Always try to delete unencrypted keys
+ rm -f ${AMANDAHOMEDIR}/.gnupg/am_key
+}
+
check_gnupg() {
- logger "Ensuring correct permissions for '${AMANDAHOMEDIR}/.gnupg'."
- log_output_of chown ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.gnupg || \
- { logger "WARNING: Could not chown .gnupg dir." ; return 1; }
- log_output_of chmod 700 ${AMANDAHOMEDIR}/.gnupg || \
- { logger "WARNING: Could not set permissions on .gnupg dir." ; return 1; }
+ logger "Ensuring correct permissions for '${AMANDAHOMEDIR}/.gnupg'."
+ log_output_of chown -R ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.gnupg || \
+ { logger "WARNING: Could not chown .gnupg dir." ; return 1; }
+ log_output_of chmod -R u=rwX,go= ${AMANDAHOMEDIR}/.gnupg || \
+ { logger "WARNING: Could not set permissions on .gnupg dir." ; return 1; }
+ # If am_key.gpg and .am_passphrase already existed, we should check
+ # if they match!
+ if [ -f ${AMANDAHOMEDIR}/.gnupg/am_key.gpg ] && [ -f ${AMANDAHOMEDIR}/.am_passphrase ]; then
+ exec 3<${AMANDAHOMEDIR}/.am_passphrase
+ # Perms warning will persist because we are not running as ${amanda_user}
+ log_output_of gpg --homedir ${AMANDAHOMEDIR}/.gnupg \
+ --no-permission-warning \
+ --no-use-agent\
+ --batch \
+ --decrypt \
+ --passphrase-fd 3 \
+ --output /dev/null \
+ ${AMANDAHOMEDIR}/.gnupg/am_key.gpg || \
+ { logger "WARNING: .am_passphrase does not decrypt .gnupg/am_key.gpg.";
+ return 1;
+ }
+ # Be nice and clean up.
+ exec 3<&-
+ fi
}
create_amandahosts() {
fi
}
-create_ampassphrase() {
- # install am_passphrase file to server
- logger "Checking '${AMANDAHOMEDIR}/.am_passphrase' file."
- if [ ! -f ${AMANDAHOMEDIR}/.am_passphrase ] ; then
- logger "Create '${AMANDAHOMEDIR}/.am_passphrase' file."
- log_output_of touch ${AMANDAHOMEDIR}/.am_passphrase || \
- { logger "WARNING: Could not create .am_passphrase." ; return 1; }
- phrase=`echo $RANDOM | md5sum | awk '{print $1}'` || \
- { logger "WARNING: Error creating pseudo random passphrase." ; return 1; }
- echo ${phrase} >>${AMANDAHOMEDIR}/.am_passphrase
-
- log_output_of chown ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.am_passphrase || \
- { logger "WARNING: Could not chown .am_passphrase" ; return 1; }
- log_output_of chmod 0600 ${AMANDAHOMEDIR}/.am_passphrase || \
- { logger "WARNING: Could not fix permissions on .am_passphrase" ; return 1; }
- fi
-
-}
-
create_amtmp() {
# Check for existence of and permissions on ${AMTMP}
logger "Checking for '${AMTMP}' dir."
log_output_of sed -i "/^amanda .* amandad/d"
}
-remove_smf() {
+rm_smf() {
# Remove the amanda service from solaris style service framework.
ret=0; export ret
logger "Removing amanda's smf entry"
esac
}
+add_profiles() {
+ # Solaris only: Add a comma separated list of rights profiles to the
+ # $amanda_user. Replaces any existing profiles listed on the account.
+ log_output_of usermod -P "\"$*\"" ${amanda_user} || {
+ logger "Warning: Rights profiles were not added. Some types of backup may not work until these rights profiles are givent to ${amanda_backup}: '$*'"
+ return 1; }
+}
+
add_group() {
# First, try to add the group, detect via return code if it
# already exists. Then add ${amanda_user} to the group without
sub get_date {
my $date;
- # Set the date using date -r
- open(my $DATE_PIPE, "-|", "/bin/date '+%a, %d %b %Y %T %z'");
- [ $? == 0 ] or die "could not read output of date '+%a, %d %b %Y %T %z'";
+ # First parameter should be a date format string.
+ open(my $DATE_PIPE, "-|", "/bin/date $_[0]");
+ [ $? == 0 ] or die "could not read output of date $_[0]";
chomp($date = <$DATE_PIPE>);
close($DATE_PIPE);
return $date;
"%%DISTRO%%" => "",
# Used in changelog
"%%DEB_REL%%" => "",
- "%%DATE%%" => "",
- # Used in rules
+ "%%DATE%%" => "'+%a, %d %b %Y %T %z'",
+ # Used in server rules
"%%PERL%%" => "",
);
my %replacement_strings_rpm = (
+ "%%DATE%%" => "'+%a %b %d %Y'",
);
my %replacement_strings_sun = (
"%%ARCH%%" => "",
+ "%%DATE%%" => "'+%a, %d %b %Y %T %z'",
);
my %replacement_strings;
$replacement_strings{"%%PKG_REV%%"} =
fix_pkg_rev($replacement_strings{"%%PKG_REV%%"}, "deb");
# Let's determine the distro:
- # Ubuntu has /etc/lsb-release, debian does not
- open(my $LSB_RELEASE, "<", "/etc/lsb-release") or
- $replacement_strings{"%%DISTRO%%"} = "Debian";
- my $line;
- if ( $replacement_strings{"%%DISTRO%%"} ne "Debian" ) {
- $replacement_strings{"%%DISTRO%%"} = "Ubuntu";
- # We want the 2nd line
- <$LSB_RELEASE>;
- my @line = split /=/, <$LSB_RELEASE>;
- chomp($line[1]);
- $line[1] =~ s/\.//;
- $replacement_strings{"%%DEB_REL%%"} = $line[1];
- close($LSB_RELEASE);
- } else {
- open(my $DEB_RELEASE, "<", "/etc/debian_version") or die "could not read \"/etc/debian_version\": $!";
- chomp($line = <$DEB_RELEASE>);
- # Releases can have 3 fields. we want the first 2.
- $line =~ s/(\d+)\.(\d+).*/$1$2/;
- $replacement_strings{"%%DEB_REL%%"} = $line;
- close($DEB_RELEASE);
+ my $release;
+ if ( -e "/usr/bin/lsb_release" ) {
+ # Yay! it's easy.
+ my $distro_id = `/usr/bin/lsb_release --id --short` or die "Could not run lsb_release!";
+ chomp ($replacement_strings{"%%DISTRO%%"} = $distro_id);
+
+ chomp($release = `/usr/bin/lsb_release --release --short`);
+ }
+ if ( $replacement_strings{"%%DISTRO%%"} eq "" ) {
+ # Let's hope it's debian.
+ open(my $DEB_RELEASE, "<", "/etc/debian_version") or die "Could not read \"/etc/debian_version\": $!";
+ # Whew!
+ $replacement_strings{"%%DISTRO%%"} = "Debian";
+ chomp($release = <$DEB_RELEASE>);
+ close($DEB_RELEASE);
}
- $replacement_strings{"%%DATE%%"} = get_date();
- # 32bit should use bitrock perl, while 64bit should use builtin. we
+ # Fix the release version string.
+ if ( $replacement_strings{"%%DISTRO%%"} eq "Ubuntu" ) {
+ $release =~ s/\.//;
+ } else {
+ # Releases can have 3 fields on Debian. we want the first 2.
+ $release =~ s/(\d+)\.(\d+).*/$1$2/;
+ }
+ $replacement_strings{"%%DEB_REL%%"} = $release;
+ $replacement_strings{"%%DATE%%"} = get_date($replacement_strings{"%%DATE%%"});
+ # 32bit should use bitrock perl, while 64bit should use builtin. we
# live on the edge and assume it's there.
my $arch = get_arch();
if ( $arch eq "x86_64" ) {
%replacement_strings_common );
$replacement_strings{"%%PKG_REV%%"} =
fix_pkg_rev($replacement_strings{"%%PKG_REV%%"}, "rpm");
+ $replacement_strings{"%%DATE%%"} = get_date($replacement_strings{"%%DATE%%"});
}
else {
%replacement_strings = ( %replacement_strings_sun,
%replacement_strings_common );
$replacement_strings{"%%PKG_REV%%"} =
fix_pkg_rev($replacement_strings{"%%PKG_REV%%"}, "sun");
- $replacement_strings{"%%DATE%%"} = get_date();
+ $replacement_strings{"%%DATE%%"} = get_date($replacement_strings{"%%DATE%%"});
my $arch = get_arch();
if ( $arch eq "sun4u" ) {
$replacement_strings{"%%ARCH%%"} = "sparc";
# SHUNIT_* and SHU_* are shunit2 variables
# test_* should only be used by test functions.
# All other variables will probably be used by pre/post/common functions.
-
-# shunit2 assumes _inc is, but we might run from a separate builddir. So try to
-# use srcdir, as defined by automake, or otherwise `pwd`.
+case $1 in
+ DEBUG) DEBUG=True
+ shift
+ ;;
+ *) DEBUG= ;;
+esac
+export DEBUG
+
+ex_from=`dirname $0`
+
+# shunit2 assumes shunit_inc, but we might run from a separate
+# builddir. So try to use srcdir, as defined by automake, or
+# otherwise `pwd`.
SHUNIT_INC="${srcdir=`pwd`}/packaging/common"; export SHUNIT_INC
-
TMPDIR=`pwd`/shunit-test; export TMPDIR
amanda_user=test_amandabackup; export amanda_user
amanda_group=test_disk; export amanda_group
dist=Fedora; export dist
SYSCONFDIR=$TMPDIR/etc; export SYSCONFDIR
SBINDIR=$TMPDIR/sbin; export SBINDIR
+encoder=`{ command -v base64 2>/dev/null; } || { command -v uuencode 2>/dev/null; }`
# Don't potentially conflict with a real value...
deb_uid=63000; export deb_uid
# shunit2 is sourced.
mkdir -p ${TMPDIR} || exit 1
{
- LOGFILE=`
- (umask 077 && mktemp "$TMPDIR/test-log.XXXX") 2> /dev/null
- ` &&
- test -f "$LOGFILE"
+ LOGFILE="$TMPDIR/test_sh_libs.log"
+ (umask 077 && touch $LOGFILE)
} || {
- LOGFILE=$TMPDIR/test-log.$$.$RANDOM
- (umask 077 && touch "$LOGFILE")
-} || {
- echo "Unable to create log file!"
- exit 1
+ echo "Unable to create log file!"
+ exit 1
}
export LOGFILE
}
oneTimeTearDown() {
- if [ ${__shunit_assertsFailed} -eq 0 ]; then
+ if [ ${__shunit_assertsFailed} -eq 0 ] && [ ! "${DEBUG}" ]; then
rm -rf $test_cleanup_files
else
echo "Check ${test_cleanup_files} for logs and error info."
# Source our mock utils.
. ${SHUNIT_INC}/mock_utils.sh
+log_tail_no_stamp() {
+ # This strips the date off of a log line so only the message is
+ # compared.
+ LOG_TAIL=`tail -1 ${LOGFILE}|cut -d " " -f 5-`
+}
+
######################################
# Common functions
test___logger() {
# Write a line to the log, test that it got there.
TEST_MSG="test___logger message"
- LOG_LINE="`date +'%b %e %Y %T'`: ${TEST_MSG}"
+ LOG_LINE="`date +'%b %d %Y %T'`: ${TEST_MSG}"
# It's important for the log messages to be quoted, or funny stuff happens.
logger "${TEST_MSG}"
assertEquals "logger() return code" 0 $?
- LOG_TAIL=`tail -1 ${LOGFILE}`
+ log_tail_no_stamp
assertEquals "logger() did not write <${LOG_LINE}> " \
- "${LOG_LINE}" "${LOG_TAIL}"
+ "${TEST_MSG}" "${LOG_TAIL}"
# Leave this outside the unit test framework. if the logger is
# broken we must exit.
if [ ! `grep -c "${LOG_LINE}" ${LOGFILE}` = "1" ]; then
TEST_MSG="test__log_output_of message"
log_output_of echo "${TEST_MSG}"
assertEquals "log_output_of()" 0 $?
+ LOG_LINE="echo: ${TEST_MSG}"
+ log_tail_no_stamp
+ assertEquals "log_output_of() message should be: " \
+ "${LOG_LINE}" "${LOG_TAIL}"
COUNT=`grep -c "${TEST_MSG}" ${LOGFILE}`
assertEquals "log_output_of(): incorrect content in log" \
1 ${COUNT}
# Might need init script.
if [ "$IAmRoot" ]; then
startSkipping
- echo "test_install_smf: skipped"
+ echo "test_reload_xinetd: skipped"
return
elif [ ! -f "${SYSCONFDIR}/init.d/xinetd" ]; then
mv ${MOCKDIR}/xinetd ${SYSCONFDIR}/init.d
touch ${MOCKDIR}/success
reload_xinetd "reload"
assertEquals "reload_xinetd" 0 $?
+ # Test no argument
+ reload_xinetd
+ assertEquals "reload_xinetd should attempt to reload" 0 $?
+ flags=`cat ${mock_xinetd_flags}`
+ assertEquals "xinetd_flags should contain: " \
+ "xinetd args: reload" "${flags}"
# Test failure
rm ${MOCKDIR}/success
reload_xinetd "reload"
assertEquals "reload_xinetd should try to restart." 0 $?
reload_xinetd "restart"
assertEquals "restart should fail." 1 $?
- tail -3 ${LOGFILE}|grep "Restarting xinetd" >/dev/null
+ tail -3 ${LOGFILE}|grep "restarting xinetd" >/dev/null
assertEquals "Should log attempt to restart" 0 $?
}
echo $os > ${MOCKDIR}/id_os
check_user_group "abracadabra"
assertNotEquals "'check_user group abracadabra' should not be found:" 0 $?
- LOG_TAIL=`tail -1 ${LOGFILE}|cut -d " " -f 5-`
+ log_tail_no_stamp
assertEquals "check_user_group should write" \
"User's primary group 'abracadabra' does not exist" \
"${LOG_TAIL}"
assertEquals "create_user()" 0 $?
}
+test_add_profiles() {
+ # Solaris only, but testing using mock usermod will run if not root
+ # on any system.
+ logger "test_add_profiles"
+ [ "$IAmRoot" ] && startSkipping
+ add_profiles "Profile foo,Profile bar"
+ assertEquals "add_profiles should succeed" 0 $?
+ flags=`cat ${mock_usermod_flags}`
+ assertEquals "usermod_flags should contain:" \
+ "usermod args: -P \"Profile foo,Profile bar\" ${amanda_user}" \
+ "${flags}"
+
+}
+
test_add_group_check_parameters_logs() {
rm -f ${MOCKDIR}/groupadd_rc ${MOCKDIR}/num_groups
# Return codes are integers.
# Test that first parameter is required.
add_group
assertEquals "add_group without a group should fail." 1 $?
- LOG_TAIL=`tail -1 ${LOGFILE}|cut -d " " -f 5-`
+ log_tail_no_stamp
assertEquals "add_group should write" \
"Error: first argument was not a group to add." \
"${LOG_TAIL}"
"`cat $mock_chmod_flags`"
}
-test_create_gnupg() {
+test_a_create_gnupg() {
+ # We need to impose some order on a few tests because some functions
+ # rely on others. Tests are sorted alphabetically. Insert a letter after
+ # "test_" to impose order on particular tests
logger "test_create_gnupg"
create_gnupg
assertEquals "create_gnupg" 0 $?
assertTrue "[ -d ${AMANDAHOMEDIR}/.gnupg ]"
+ # Dir exists
+ create_gnupg
+ assertEquals "create_gnupg dir existing" 0 $?
+}
+
+test_a_get_random_lines() {
+ logger "test_get_random_lines"
+ get_random_lines > ${TMPDIR}/lines
+ assertEquals "get_random_lines" 1 $?
+ get_random_lines 1 > ${TMPDIR}/lines
+ assertEquals "get_random_lines 1" 0 $?
+ assertEquals "get_random_lines 1 output" 1 "`sed -n '$=' ${TMPDIR}/lines`"
+ get_random_lines 20 > ${TMPDIR}/lines
+ assertEquals "get_random_lines 20 output" 20 "`sed -n '$=' ${TMPDIR}/lines`"
+}
+
+test_b_create_ampassphrase() {
+ rm -f ${AMANDAHOMEDIR}/.am_passphrase
+ logger "test_create_ampassphrase"
+ create_ampassphrase
+ assertEquals "create_ampassphrase" 0 $?
+ assertSame \
+ "chown args: ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.am_passphrase" \
+ "`cat $mock_chown_flags`"
+ assertSame \
+ "chmod args: 0600 ${AMANDAHOMEDIR}/.am_passphrase" \
+ "`cat $mock_chmod_flags`"
+ # When .am_passphrase exists.
+ create_ampassphrase
+ log_tail_no_stamp
+ assertSame \
+ "Info: ${AMANDAHOMEDIR}/.am_passphrase already exists." \
+ "${LOG_TAIL}"
+ rm ${AMANDAHOMEDIR}/.am_passphrase
+}
+
+test_b_create_amkey() {
+ logger "test_create_amkey"
+ # Missing .am_passphrase
+ [ -f ${AMANDAHOMEDIR}/.am_passphrase ] && rm ${AMANDAHOMEDIR}/.am_passphrase
+ create_amkey
+ assertEquals "create_amkey" 1 $?
+ log_tail_no_stamp
+ assertSame \
+ "Error: ${AMANDAHOMEDIR}/.am_passphrase is missing, can't create amcrypt key." \
+ "${LOG_TAIL}"
+ # Need .am_passphrase. Ignore these test errors if get_random_lines or
+ # create_gnupg tests failed.
+ get_random_lines 1 > ${AMANDAHOMEDIR}/.am_passphrase
+ create_amkey
+ assertEquals "create_amkey" 0 $?
+ # Test with existing key
+ create_amkey
+ assertEquals "create_amkey" 0 $?
+ log_tail_no_stamp
+ assertSame \
+ "Info: Encryption key '${AMANDAHOMEDIR}/.gnupg/am_key.gpg' already exists." \
+ "${LOG_TAIL}"
+ # make sure unencrypted am_key is not hanging around
+ assertFalse "[ -f ${AMANDAHOMEDIR}/.gnupg/am_key ]"
+
}
test_check_gnupg() {
logger "test_check_gnupg"
check_gnupg
assertEquals "check_gnupg" 0 $?
- [ "$IAmRoot" ] && { startSkipping; echo "test_check_gnupg: skipped"; }
assertSame \
- "chown args: ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.gnupg" \
+ "chown args: -R ${amanda_user}:${amanda_group} ${AMANDAHOMEDIR}/.gnupg" \
"`cat $mock_chown_flags`"
assertSame \
- "chmod args: 700 ${AMANDAHOMEDIR}/.gnupg" \
+ "chmod args: -R u=rwX,go= ${AMANDAHOMEDIR}/.gnupg" \
"`cat $mock_chmod_flags`"
}
esac
}
-#TODO: create_ampassphrase, create_amtmp
+#TODO: create_amtmp
######################################
#TODO: post_rm_functions
Section: utils
Priority: optional
Maintainer: Zmanda Inc <support@zmanda.com>
-Build-Depends: debhelper, dump, fakeroot, flex, gnuplot-nox|gnuplot, libtool,
- mailx|bsd-mailx, mtx, perl (>=5.6.0), procps, smbclient, libcurl-dev,
- libglib2.0-dev, libncurses5-dev, libreadline5-dev|libreadline-dev,
- libssl-dev
+Build-Depends: debhelper, dump, fakeroot, flex, gettext, gnuplot-nox|gnuplot,
+ libtool, mailx|bsd-mailx, mtx, perl (>=5.6.0), procps,
+ smbclient, libcurl-dev, libglib2.0-dev, libncurses5-dev,
+ libreadline5-dev|libreadline-dev, libssl-dev
Standards-Version: 3.6.1
Package: amanda-backup-server
Architecture: any
-Depends: ca-certificates, xinetd, perl (>=5.6.0), mailx|bsd-mailx,
- tar (>=1.15), ${shlibs:Depends}, ${perl:Depends}
+Depends: ca-certificates, xinetd, perl (>=5.6.0), gettext, mailx|bsd-mailx,
+ ${shlibs:Depends}, ${perl:Depends}
Suggests: gnuplot-nox|gnuplot
Conflicts: amanda-client, amanda-common, amanda-server, amanda-backup-client
Description: Amanda Network Backup and Archiving software
Package: amanda-backup-client
Architecture: any
-Depends: ca-certificates, xinetd, perl (>=5.6.0), grep, ${shlibs:Depends},
+Depends: ca-certificates, xinetd, perl (>=5.6.0), gettext, ${shlibs:Depends},
${perl:Depends}
Conflicts: amanda-backup-server, amanda-client, amanda-common, amanda-server
Description: Amanda Network Backup and Archiving software
AMTMP="/tmp/amanda"
AMANDATES=${SYSCONFDIR}/amandates
+encoder=`{ command -v base64 2>/dev/null; } || { command -v uuencode 2>/dev/null; }`
# ---------- Common functions ------------
%%COMMON_FUNCTIONS%%
0) backup_xinetd "amanda${other_pkg_type}" ;;
esac
-reload_xinetd
+check_superserver_running "xinetd"
+[ "$?" = "0" ] && action=restart || action=start
+reload_xinetd $action
create_amandates
check_amandates
+create_ampassphrase || \
+ logger "Info: amcryptsimple and amcrpyt will not work until .am_passphrase is created"
create_gnupg
+create_amkey || \
+ logger "Info: amcrypt will not work until keys are created."
+# Checks permissions, but only tries decrypting if both .am_passphrase
+# and .gnupg/am_key.gpg exist.
check_gnupg
create_amandahosts
check_amandahosts_entry root amindexd amidxtaped
create_profile
check_profile
install_client_conf
-create_ampassphrase
create_amtmp
logger "Amanda ${pkg_type} installation complete."
AMANDAHOMEDIR=%%AMANDAHOMEDIR%%
os=Linux
dist=%%DISTRO%%
-
LOGDIR=%%LOGDIR%%
SYSCONFDIR=/etc
rm_xinetd "amanda${pkg_type}" || { \
logger "Warning: Did not successfully remove amanda${pkg_type} from xinetd.";
exit 1; }
- reload_xinetd
+ check_superserver_running "xinetd" && reload_xinetd
+ fi
+ # Check for and remove existing inetd configs
+ if check_inetd "amanda${pkg_type}"; then
+ rm_inetd "amanda${pkg_type}"
+ check_superserver_running "inetd" && reload_inetd
fi
-
}
purge() {
logger "Removing ${LOGDIR}..."
rm -rf ${LOGDIR}
fi
- if [ -d ${AMANDAHOMEDIR} ]; then
- logger "Removing ${AMANDAHOMEDIR}..."
- rm -rf ${AMANDAHOMEDIR}
+ if ! rmdir $AMANDAHOMEDIR; then
+ logger "Message: $AMANDAHOMEDIR was not empty, and was not deleted: Contents are often backupsets. "
fi
if [ -f ${SYSCONFDIR}/amandates ]; then
logger "Removing ${SYSCONFDIR}/amandates..."
remove
;;
- failed-upgrade)
+ failed-upgrade|abort-upgrade)
check_xinetd "amanda${pkg_type}"
if [ $? -eq 1 ] ; then
install_xinetd
# Copyright (C) 2005-2012 Zmanda Incorporated.
# 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# set then use the env var.
%{!?PKG_CONFIG_PATH: %{expand:%(echo ${PKG_CONFIG_PATH:+"%%define PKG_CONFIG_PATH $PKG_CONFIG_PATH"})}}
-%{?PKG_CONFIG_PATH:%{echo:PKG_CONFIG_PATH = %{PKG_CONFIG_PATH}}}
+%{?PKG_CONFIG_PATH:%{echo:PKG_CONFIG_PATH = %{PKG_CONFIG_PATH}\n}}
# LDFLAGS: newer gnu linkers can use "-Wl,--as-needed", while older ones,
# like rhel3 and sles9 can't.
# Define which Distribution we are building:
# Try to detect the distribution we are building:
-%if %{_vendor} == redhat
+%if %{_vendor} == redhat
# Fedora symlinks /etc/fedora-release to /etc/redhat-release for at least
# fc3-8. So RHEL and Fedora look at the same file. Different versions have
- # different numbers of spaces; hence the use if $3 vs. $4..
- %if %(awk '$1 == "Fedora" && $4 ~ /3.*/ { exit 1; }' /etc/redhat-release; echo $?)
+ # different numbers of spaces; hence the use of $3 vs. $4..
+ %if %(awk '$1 == "Fedora" { exit 1; }' /etc/redhat-release; echo $?)
%define dist fedora
%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
+ %define distver %(awk '{print $4}' /etc/redhat-release)
%endif
# if macro cannot have an empty test and we're just testing the existance
%if %{?fedora:yes}%{!?fedora:no} == yes
- %define dist fedora
- %define disttag fc
+ # In theory this should be more reliable than awking for distver.
%define distver %{fedora}
+ %endif
+ %if "%{dist}" == "fedora"
%if %{distver} <= 8
%define requires_libtermcap Requires: libtermcap.so.2
%define curl curl
%define requires_libtermcap Requires: libtermcap.so.2
%define curl curl
%define without_ipv6 --without-ipv6
+ %undefine enable_as_needed
+ %define prereq_sharutils PreReq: sharutils
%endif
%if %(awk '$1 == "Red" && $7 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist redhat
%define tarver 1.14
%define requires_libtermcap Requires: libtermcap.so.2
%define curl curl
+ %define prereq_sharutils PreReq: sharutils
%endif
%if %(awk '$1 == "CentOS" && $3 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist redhat
%define tarver 1.14
%define requires_libtermcap Requires: libtermcap.so.2
%define curl curl
+ %define prereq_sharutils PreReq: sharutils
%endif
%if %(awk '$1 == "Red" && $7 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
%define dist redhat
# If dist is undefined, we didn't detect.
%{!?dist:%define dist unknown}
%endif
-# Detect Suse variants.
+# Detect Suse variants.
%if %{_vendor} == "suse"
%define dist SuSE
- %if %(awk '$1 == "openSUSE" { exit 1; }' /etc/SuSE-release; echo $?)
- %define disttag suse
- %define distver %(awk '$1=="openSUSE" {print $2}' /etc/SuSE-release)
+ %define disttag %(awk '$1=="openSUSE" { print "suse"; } $1=="SUSE" {$3=="Enterprise" ? TAG="sles" : TAG="suse" ; print TAG}' /etc/SuSE-release)
+ # use printf to be sure rpm gets a number type
+ %define distver %(awk '$1=="openSUSE" { printf("%d", $2); } $1=="SUSE" {$3=="Enterprise" ? VER=$5 : VER=$3 ; printf("%d", VER)}' /etc/SuSE-release)
+ %define curl curl
+ %if %{distver} == 9
+ %undefine enable_as_needed
%endif
- %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 enable_as_needed
- %endif
+ %if %{distver} < 11
+ %define prereq_sharutils PreReq: sharutils
%endif
%endif
# Set options per distribution
%if %{dist} == redhat || %{dist} == fedora
%define rpm_group Applications/Archiving
- %define xinetd_reload restart
%define requires_initscripts Requires: initscripts
%endif
%if %{dist} == SuSE
%define rpm_group Productivity/Archiving/Backup
- %define xinetd_reload restart
%endif
# Let's die if we haven't detected the distro. This might save some frustration.
# Set minimum tar version if it wasn't set in the per-distro section
%{!?tarver: %define tarver 1.15}
+# Define the native binary data encoder (for create_amkey)
+%define encoder %({ command -v base64 2>/dev/null; } || { command -v uuencode 2>/dev/null; })
+
%define packer %(%{__id_u} -n)
# --- Definitions ---
BuildRequires: gcc
BuildRequires: glib2 >= 2.2.0
BuildRequires: glib2-devel
+BuildRequires: gettext
BuildRequires: readline
# Note: newer distros have changed most *-devel to lib*-devel, and added a
# provides tag for backwards compat.
BuildRequires: openssl
BuildRequires: openssl-devel
BuildRequires: perl(ExtUtils::Embed)
+%{?prereq_sharutils}
Requires: /bin/awk
Requires: /bin/date
Requires: /usr/bin/id
Requires: /usr/sbin/useradd
Requires: /usr/sbin/usermod
Requires: fileutils
+Requires: gettext
Requires: grep
Requires: gnuplot
Requires: %{curl} >= 7.10.0
--mandir=%{MANDIR} \
--with-amdatadir=%{AMDATADIR} \
--with-gnuplot=/usr/bin/gnuplot \
- --with-gnutar=/bin/tar \
--with-gnutar-listdir=%{AMANDAHOMEDIR}/gnutar-lists \
--with-index-server=localhost \
--with-tape-server=localhost \
# Define script variables
# Some versions of rpmbuild do not like multi-line macros in spec files. ugly.
-%define script_vars amanda_user=%{amanda_user}; amanda_group=%{amanda_group}; AMANDAHOMEDIR=%{AMANDAHOMEDIR}; os=Linux; wanted_shell=/bin/bash; dist=%{dist}; LOGDIR=%{LOGDIR}; INSTALL_LOG=$LOGDIR/install.log; SYSCONFDIR=%{SYSCONFDIR}; SBINDIR=%{SBINDIR};
+%define script_vars amanda_user=%{amanda_user}; amanda_group=%{amanda_group}; AMANDAHOMEDIR=%{AMANDAHOMEDIR}; os=Linux; wanted_shell=/bin/bash; dist=%{dist}; LOGDIR=%{LOGDIR}; INSTALL_LOG=$LOGDIR/install.log; SYSCONFDIR=%{SYSCONFDIR}; SBINDIR=%{SBINDIR}; encoder=%{encoder};
# --- Pre/post (un)installation scripts ---
%pre backup_server
0) backup_xinetd "amandaclient" ;;
esac
-reload_xinetd
+check_superserver_running "xinetd"
+[ "$?" = "0" ] && action=restart || action=start
+reload_xinetd $action
create_amandates
check_amandates
+create_ampassphrase || \
+ logger "Info: amcryptsimple and amcrpyt will not work until .am_passphrase is created"
create_gnupg
+create_amkey || \
+ logger "Info: amcrypt will not work until keys are created."
+# Checks permissions, but only tries decrypting if both .am_passphrase
+# and .gnupg/am_key.gpg exist.
check_gnupg
create_amandahosts
check_amandahosts_entry root amindexd amidxtaped
create_profile
check_profile
install_client_conf
-create_ampassphrase
logger "Amanda installation complete."
cat $LOGFILE >> $INSTALL_LOG && {
check_xinetd "amandaserver"
if [ $? -eq 0 ] ; then
rm_xinetd "amandaserver"
- reload_xinetd
+ check_superserver_running "xinetd" && reload_xinetd
fi
check_inetd "amandaserver"
if [ $? -eq 0 ] ; then
rm_inetd "amandaserver"
- reload_inetd
- fi
- if [ -d ${SYSCONFDIR}/amanda ]; then
- logger "Removing ${SYSCONFDIR}/amanda if empty..."
- rmdir ${SYSCONFDIR}/amanda 2> /dev/null || true
- fi
- if [ -d ${AMANDAHOMEDIR} ]; then
- logger "Removing ${AMANDAHOMEDIR}..."
- rm -rf ${AMANDAHOMEDIR}
+ check_superserver_running "inetd" && reload_inetd
fi
if [ -f ${SYSCONFDIR}/amandates ]; then
logger "Removing ${SYSCONFDIR}/amandates..."
rm -rf ${SYSCONFDIR}/amandates
fi
+ if [ -d ${SYSCONFDIR}/amanda ]; then
+ logger "Removing ${SYSCONFDIR}/amanda if empty..."
+ rmdir ${SYSCONFDIR}/amanda 2> /dev/null || true
+ fi
+ if [ -d /var/lib/amanda/gnutar-lists ]; then
+ rm -rf /var/lib/amanda/gnutar-lists
# Remove ${amanda_user} from sensitive groups.
if which deluser >/dev/null 2>&1 ; then
for group in tape; do
fi
done
fi
-
+ echo "Amanda removal log can be found in '$LOGFILE'."
fi
-echo "Amanda removal log can be found in '$LOGFILE'."
%pre backup_client
##########################################
reload_xinetd
create_amandates
check_amandates
+create_ampassphrase || \
+ logger "Info: amcryptsimple and amcrpyt will not work until .am_passphrase is created"
create_gnupg
+create_amkey || \
+ logger "Info: amcrypt will not work until keys are created."
+# Checks permissions, but only tries decrypting if both .am_passphrase
+# and .gnupg/am_key.gpg exist.
check_gnupg
create_amandahosts
check_amandahosts_entry ${amanda_user} amdump
rm_inetd "amandaclient"
reload_inetd
fi
+ if [ -f ${SYSCONFDIR}/amandates ]; then
+ logger "Removing ${SYSCONFDIR}/amandates..."
+ rm -rf ${SYSCONFDIR}/amandates
+ fi
if [ -d ${SYSCONFDIR}/amanda ]; then
logger "Removing ${SYSCONFDIR}/amanda if empty..."
rmdir ${SYSCONFDIR}/amanda 2> /dev/null || true
logger "Removing ${AMANDAHOMEDIR}..."
rm -rf ${AMANDAHOMEDIR}
fi
- if [ -f ${SYSCONFDIR}/amandates ]; then
- logger "Removing ${SYSCONFDIR}/amandates..."
- rm -rf ${SYSCONFDIR}/amandates
- fi
# Remove ${amanda_user} from sensitive groups.
if which deluser >/dev/null 2>&1 ; then
for group in tape; do
fi
done
fi
+ echo "Amanda removal log can be found in '$LOGFILE'."
fi
-echo "Amanda removal log can be found in '$LOGFILE'."
%files backup_client
# --- Files to install ---
# --- ChangeLog
%changelog
+* %%DATE%% Dan Locks <dwlocks at zmanda dot com> %{version}
+- Package created
* Fri Aug 20 2010 Dan Locks <dwlocks at zmanda dot com> 3.2.0alpha
-- use %%VERSION%% macro instead of reading a file. error reported by ssgelm
+- use %%VERSION% macro instead of reading a file. error reported by ssgelm
* Thu Aug 19 2010 Dan Locks <dwlocks at zmanda dot com> 3.2.0alpha
- Added detection of openSuSE 11 as suggested by ssgelm
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
AMTMP="/tmp/amanda"
AMANDATES=${SYSCONFDIR}/amandates; export AMANDATES
-
-exit_msg="Amanda installation log can be found in '${INSTALL_LOG}'."
+# uuencode is still standard on sol10, but haven't checked sol 11.
+encoder=`{ command -v base64 2>/dev/null; } || { command -v uuencode 2>/dev/null; }`
# ---------- Common functions ------------
%%COMMON_FUNCTIONS%%
create_amandates
check_amandates
+create_ampassphrase || \
+ logger "Info: amcryptsimple and amcrpyt will not work until .am_passphrase is created"
create_gnupg
+create_amkey || \
+ logger "Info: amcrypt will not work until keys are created."
+# Checks permissions, but only tries decrypting if both .am_passphrase
+# and .gnupg/am_key.gpg exist.
check_gnupg
create_amandahosts
+check_amandahosts_entry root amindexd amidxtaped
check_amandahosts_entry ${amanda_user} amdump
check_amandahosts_perms
create_ssh_key client
create_amtmp
logger "Amanda installation complete."
-cat $LOGFILE >> $INSTALL_LOG
-rm $LOGFILE
-
-echo "${exit_msg}"
+exit_msg="Amanda installation log can be found in '${INSTALL_LOG}'."
+cat $LOGFILE >> $INSTALL_LOG && {
+ rm $LOGFILE
+ echo "${exit_msg} '${INSTALL_LOG}'."
+} || \
+ echo "${exit_msg} $LOGFILE."
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
driveinuse All drives are in use
unknown Unknown reason
empty The slot is empty
+ device Failed to set up the device
Like types, checks for particular reasons should use the methods, to avoid
undetected typos:
my ($statefile, $cb, $sub) = @_;
my ($filelock, $STATE);
my $poll = 0; # first delay will be 0.1s; see below
+ my $time;
+
+ if (defined $self->{'lock-timeout'}) {
+ $time = time() + $self->{'lock-timeout'};
+ } else {
+ $time = time() + 1000;
+ }
my $steps = define_steps
cb_ref => \$cb;
step lock => sub {
my $rv = $filelock->lock();
- if ($rv == 1) {
+ if ($rv == 1 && time() < $time) {
# loop until we get the lock, increasing $poll to 10s
$poll += 100 unless $poll >= 10000;
return Amanda::MainLoop::call_after($poll, $steps->{'lock'});
+ } elsif ($rv == 1) {
+ return $self->make_error("fatal", $cb,
+ message => "Timeout trying to lock '$statefile'");
} elsif ($rv == -1) {
return $self->make_error("fatal", $cb,
message => "Error locking '$statefile'");
sub volinuse { $_[0]->failed && $_[0]->{'reason'} eq 'volinuse'; }
sub unknown { $_[0]->failed && $_[0]->{'reason'} eq 'unknown'; }
sub empty { $_[0]->failed && $_[0]->{'reason'} eq 'empty'; }
+sub device { $_[0]->failed && $_[0]->{'reason'} eq 'device'; }
# slot accessor
sub slot { $_[0]->{'slot'}; }
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
my $state_filename;
my $state_filename_prop = $config->{'properties'}->{'state_filename'};
+ my $lock_timeout = $config->{'properties'}->{'lock-timeout'};
if (defined $state_filename_prop) {
$state_filename = $state_filename_prop->{'values'}[0];
num_children => scalar @children,
current_slot => undef,
state_filename => $state_filename,
+ 'lock-timeout' => $lock_timeout,
};
bless ($self, $class);
return $self;
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
bless ($self, $class);
+ if ($config->{'changerfile'}) {
+ $self->{'state_filename'} = Amanda::Config::config_dir_relative($config->{'changerfile'});
+ }
+ $self->{'lock-timeout'} = $config->get_property('lock-timeout');
+
$self->{'num-slot'} = $config->get_property('num-slot');
$self->{'auto-create-slot'} = $config->get_boolean_property(
'auto-create-slot', 0);
my $self = shift;
my $cb = shift;
my $poll = 0; # first delay will be 0.1s; see below
+ my $time;
+
+ if (defined $self->{'lock-timeout'}) {
+ $time = time() + $self->{'lock-timeout'};
+ } else {
+ $time = time() + 1000;
+ }
+
my $steps = define_steps
cb_ref => \$cb;
step lock => sub {
my $rv = $self->{'fl'}->lock_rd();
- if ($rv == 1) {
+ if ($rv == 1 && time() < $time) {
# loop until we get the lock, increasing $poll to 10s
$poll += 100 unless $poll >= 10000;
return Amanda::MainLoop::call_after($poll, $steps->{'lock'});
+ } elsif ($rv == 1) {
+ return $self->make_error("fatal", $cb,
+ message => "Timeout trying to lock '$self->{'umount_lockfile'}'");
} elsif ($rv == -1) {
return $self->make_error("fatal", $cb,
message => "Error locking '$self->{'umount_lockfile'}'");
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
}
my $state_filename = Amanda::Config::config_dir_relative($config->{'changerfile'});
+ my $lock_timeout = $config->{'lock-timeout'};
Amanda::Debug::debug("Using state file: $state_filename");
my $self = {
state_filename => $state_filename,
first_slot => $first_slot,
last_slot => $last_slot,
+ 'lock-timeout' => $lock_timeout,
};
bless ($self, $class);
if (defined $state->{current_slot}) {
my $slot = $self->{number}->{$state->{current_slot}};
# return the slot if it exist.
- return $slot if $slot >= $self->{'first_slot'} && $slot < $self->{'last_slot'};
+ return $slot if defined $slot and
+ $slot >= $self->{'first_slot'} and
+ $slot < $self->{'last_slot'};
Amanda::Debug::debug("statefile current_slot is not configured");
}
# return the first slot
# Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved.
#
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License version 2.1 as
-# published by the Free Software Foundation.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+#* License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved.
#
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License version 2.1 as
-# published by the Free Software Foundation.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+#* License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
use Data::Dumper;
use File::Path;
use Amanda::Paths;
+use Amanda::Config qw( :init );
use Amanda::MainLoop qw( :GIOCondition make_cb define_steps step );
use Amanda::Config qw( :getconf );
use Amanda::Debug qw( debug warning );
# drives - see below
# drive_lru - recently used drives, least recent first
# bc2lb - hash mapping known barcodes to known labels
-# current_slot - the current slot
+# current_slot - hash of the current slot
# last_operation_time - time the last operation finished
# last_operation_delay - required delay for that operation
# last_status - last time a 'status' command finished
# label - volume label
# barcode - volume barcode
# orig_slot - slot from which this tape was loaded
-
+#
+## The 'current_slot' key is also a hash by config name, the values of
+# which are the current slot for the config.
+# #
# LOCKING
#
# This package uses Amanda::Changer's with_locked_state to lock a statefile and
# set below from properties
statefile => undef,
+ 'lock-timeout' => undef,
drive2device => {}, # { drive => device name }
driveorder => [], # order of tape-device properties
drive_choice => 'lru',
$self->{'statefile'} = "$localstatedir/amanda/$safe_filename";
}
$self->_debug("using statefile '$self->{statefile}'");
-
+ $self->{'lock-timeout'} = $config->{'lock-timeout'};
# figure out the drive number to device name mapping
if (exists $config->{'tapedev'}
and $config->{'tapedev'} ne ''
if (exists $params{'relative_slot'}) {
if ($params{'relative_slot'} eq "next") {
if (exists $params{'slot'}) {
- $slot = $self->_get_next_slot($state, $params{'slot'});
- $self->_debug("loading next relative to $params{slot}: $slot");
+ $slot = $self->_get_next_slot($state, $params{'slot'}, $params{'except_slots'});
+ if (defined $slot) {
+ $self->_debug("loading next relative to $params{slot}: $slot");
+ } else {
+ $self->_debug("no next slot relative to $params{slot}");
+ }
} else {
- $slot = $self->_get_next_slot($state, $state->{'current_slot'});
- $self->_debug("loading next relative to current slot: $slot");
+ $slot = $self->_get_next_slot($state, $state->{'current_slot'}{get_config_name()}, $params{'except_slots'});
+ if (defined $slot) {
+ $self->_debug("loading next relative to current slot: $slot");
+ } else {
+ $self->_debug("no next relative to current slot");
+ }
}
- if ($slot == -1) {
+ if (defined $slot && $slot == -1) {
return $self->make_error("failed", $params{'res_cb'},
reason => "invalid",
message => "could not find next slot");
}
} elsif ($params{'relative_slot'} eq "current") {
- $slot = $state->{'current_slot'};
- if ($slot == -1) {
+ $slot = $state->{'current_slot'}{get_config_name()};
+ if (defined $slot && $slot == -1) {
# seek to the first slot
- $slot = $self->_get_next_slot($state, $state->{'current_slot'});
+ $slot = $self->_get_next_slot($state, $state->{'current_slot'}{get_config_name()}, $params{'except_slots'});
}
- if ($slot == -1) {
+ if (defined $slot && $slot == -1) {
return $self->make_error("failed", $params{'res_cb'},
reason => "invalid",
message => "no current slot");
message => "no 'slot' or 'label' specified to load()");
}
+ if (defined $slot and !exists $state->{'slots'}->{$slot}) {
+ return $self->make_error("failed", $params{'res_cb'},
+ reason => "invalid",
+ message => "invalid slot '$slot'");
+ }
+
+ if (!defined $slot) {
+ my $all_empty = 1;
+ if (exists $params{'except_slots'}) {
+ for my $xslot (keys %{ $params{'except_slots'} }) {
+ if ($state->{'slots'}->{$xslot}->{'state'} ne Amanda::Changer::SLOT_EMPTY) {
+ $all_empty = 0;
+ }
+ }
+ if ($all_empty) {
+ return $self->make_error("failed", $params{'res_cb'},
+ reason => "notfound",
+ message => "all slots are empty");
+ }
+ }
+ return $self->make_error("failed", $params{'res_cb'},
+ reason => "notfound",
+ message => "all slots have been loaded");
+ }
if (!$self->_is_slot_allowed($slot)) {
if (exists $params{'label'}) {
return $self->make_error("failed", $params{'res_cb'},
}
if (exists $params{'except_slots'} and exists $params{'except_slots'}->{$slot}) {
- return $self->make_error("failed", $params{'res_cb'},
- reason => "notfound",
- message => "all slots have been loaded");
+ # if all slots in except_slots are EMPTY
+ my $all_empty = 1;
+ for my $xslot (keys %{ $params{'except_slots'} }) {
+ if ($state->{'slots'}->{$xslot}->{'state'} ne Amanda::Changer::SLOT_EMPTY) {
+ $all_empty = 0;
+ }
+ }
+ if ($all_empty) {
+ return $self->make_error("failed", $params{'res_cb'},
+ reason => "notfound",
+ message => "all slots are empty");
+ } else {
+ return $self->make_error("failed", $params{'res_cb'},
+ reason => "notfound",
+ message => "all slots have been loaded");
+ }
}
if ($state->{'slots'}->{$slot}->{'state'} eq Amanda::Changer::SLOT_EMPTY) {
return $self->make_error("failed", $params{'res_cb'},
reason => "empty",
+ slot => $slot,
message => "slot $slot is empty");
}
# update metadata with this new information
$state->{'slots'}->{$slot}->{'state'} = Amanda::Changer::SLOT_FULL;
$state->{'slots'}->{$slot}->{'device_status'} = $device->status;
- $state->{'slots'}->{$slot}->{'device_error'} = $device->error;
- if (defined $device->{'volume_header'}) {
- $state->{'slots'}->{$slot}->{'f_type'} = $device->{'volume_header'}->{type};
+ if ($device->status == $DEVICE_STATUS_SUCCESS) {
+ $state->{'slots'}->{$slot}->{'device_error'} = undef;
+ } else {
+ $state->{'slots'}->{$slot}->{'device_error'} = $device->error;
+ }
+ if (defined $device->volume_header) {
+ $state->{'slots'}->{$slot}->{'f_type'} = $device->volume_header->{type};
} else {
$state->{'slots'}->{$slot}->{'f_type'} = undef;
}
# update metadata with this new information
$state->{'slots'}->{$slot}->{'state'} = Amanda::Changer::SLOT_FULL;
$state->{'slots'}->{$slot}->{'device_status'} = $device->status;
- $state->{'slots'}->{$slot}->{'device_error'} = $device->error;
- if (defined $device->{'volume_header'}) {
- $state->{'slots'}->{$slot}->{'f_type'} = $device->{'volume_header'}->{type};
+ if ($device->status == $DEVICE_STATUS_SUCCESS) {
+ $state->{'slots'}->{$slot}->{'device_error'} = undef;
+ } else {
+ $state->{'slots'}->{$slot}->{'device_error'} = $device->error;
+ }
+ if (defined $device->volume_header) {
+ $state->{'slots'}->{$slot}->{'f_type'} = $device->volume_header->{type};
} else {
$state->{'slots'}->{$slot}->{'f_type'} = undef;
}
message => "Found unlabeled tape while looking for '$params{label}'");
}
+ if (defined $self->{'tapelist'}) {
+ my $tle = $self->{'tapelist'}->lookup_tapelabel($label);
+ if (defined $tle and defined $tle->{'barcode'} and
+ defined $state->{'slots'}->{$slot}->{'barcode'} and
+ $state->{'slots'}->{$slot}->{'barcode'} ne $tle->{'barcode'}) {
+ return $self->make_error("failed", $params{'res_cb'},
+ reason => "device",
+ message => "Slot $slot, label '$label', mismatch barcode between changer '$state->{'slots'}->{$slot}->{'barcode'}' and tapelist file '$tle->{'barcode'}'");
+ }
+ }
my $res = Amanda::Changer::robot::Reservation->new($self, $slot, $drive,
$device, $state->{'slots'}->{$slot}->{'barcode'});
$state->{'drives'}->{$drive}->{'state'} = Amanda::Changer::SLOT_FULL;
$state->{'drives'}->{$drive}->{'barcode'} = $state->{'slots'}->{$slot}->{'barcode'};
$state->{'slots'}->{$slot}->{'device_status'} = $device->status;
+ if ($device->status == $DEVICE_STATUS_SUCCESS) {
+ $state->{'slots'}->{$slot}->{'device_error'} = undef;
+ } else {
+ $state->{'slots'}->{$slot}->{'device_error'} = $device->error;
+ }
+ if (defined $device->volume_header) {
+ $state->{'slots'}->{$slot}->{'f_type'} = $device->volume_header->{type};
+ } else {
+ $state->{'slots'}->{$slot}->{'f_type'} = undef;
+ }
my $barcode = $state->{'slots'}->{$slot}->{'barcode'};
if ($label and $barcode) {
my $old_label = $state->{'bc2lb'}->{$barcode};
}
if ($params{'set_current'}) {
$self->_debug("setting current slot to $slot");
- $state->{'current_slot'} = $slot;
+ $state->{'current_slot'}{get_config_name()} = $slot;
}
return $params{'res_cb'}->(undef, $res);
my $device = Amanda::Device->new($device_name);
if ($device->status != $DEVICE_STATUS_SUCCESS) {
return Amanda::Changer->make_error("fatal", undef,
- reason => "unknown",
+ reason => "device",
message => "opening '$device_name': " . $device->error_or_status());
}
if (my $err = $self->{'config'}->configure_device($device)) {
return Amanda::Changer->make_error("fatal", undef,
- reason => "unknown",
+ reason => "device",
message => $err);
}
my %params = @_;
my $state = $params{'state'};
- $state->{'current_slot'} = $self->_get_next_slot($state, -1);
+ $state->{'current_slot'}{get_config_name()} = $self->_get_next_slot($state, -1);
$params{'finished_cb'}->();
}
if $slot->{'ie'};
$i->{'current'} = 1
- if $slot_name eq $state->{'current_slot'};
+ if $slot_name eq $state->{'current_slot'}{get_config_name()};
push @inv, $i;
}
# the changer status has been updated)
sub _get_next_slot {
my $self = shift;
- my ($state, $slot) = @_;
+ my ($state, $slot, $except_slots) = @_;
my @nonempty = sort { $a <=> $b } grep {
$state->{'slots'}->{$_}->{'state'} == Amanda::Changer::SLOT_FULL
and $self->_is_slot_allowed($_)
+ and (!$except_slots || !$except_slots->{$_})
} keys(%{$state->{'slots'}});
my @higher = grep { $_ > $slot } @nonempty;
return 0;
}
-# add a prefix and call Amanda::Debug::debug
sub _debug {
my $self = shift;
my ($msg) = @_;
$state->{'drives'} = {};
$state->{'drive_lru'} = [];
$state->{'bc2lb'} = {};
- $state->{'current_slot'} = -1;
+ $state->{'current_slot'}{get_config_name()} = -1;
+ }
+
+ if (defined $state->{'current_slot'} &&
+ ref(\$state->{'current_slot'}) eq "SCALAR") {
+ my $current_slot = $state->{'current_slot'};
+ $state->{'current_slot'} = {get_config_name() => $current_slot};
}
# this is for testing ONLY!
}
}
- if ($state->{'current_slot'} == -1) {
- $state->{'current_slot'} = $self->_get_next_slot($state, -1);
+ if (!defined $state->{'current_slot'}{get_config_name()} ||
+ $state->{'current_slot'}{get_config_name()} == -1) {
+ $state->{'current_slot'}{get_config_name()} = $self->_get_next_slot($state, -1);
}
$steps->{'done'}->();
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(CMDLINE_EMPTY_TO_WILDCARD)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
+ /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do {
+ SV *sv = get_sv((char*) SWIG_prefix "CMDLINE_EXACT_MATCH", TRUE | 0x2 | GV_ADDMULTI);
+ sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(CMDLINE_EXACT_MATCH)));
+ SvREADONLY_on(sv);
+ } while(0) /*@SWIG@*/;
ST(0) = &PL_sv_yes;
XSRETURN(1);
}
*CMDLINE_PARSE_DATESTAMP = *Amanda::Cmdlinec::CMDLINE_PARSE_DATESTAMP;
*CMDLINE_PARSE_LEVEL = *Amanda::Cmdlinec::CMDLINE_PARSE_LEVEL;
*CMDLINE_EMPTY_TO_WILDCARD = *Amanda::Cmdlinec::CMDLINE_EMPTY_TO_WILDCARD;
+*CMDLINE_EXACT_MATCH = *Amanda::Cmdlinec::CMDLINE_EXACT_MATCH;
@EXPORT_OK = ();
%EXPORT_TAGS = ();
$_cmdline_parse_dumpspecs_flags_VALUES{"CMDLINE_EMPTY_TO_WILDCARD"} = $CMDLINE_EMPTY_TO_WILDCARD;
+push @EXPORT_OK, qw($CMDLINE_EXACT_MATCH);
+push @{$EXPORT_TAGS{"cmdline_parse_dumpspecs_flags"}}, qw($CMDLINE_EXACT_MATCH);
+
+$_cmdline_parse_dumpspecs_flags_VALUES{"CMDLINE_EXACT_MATCH"} = $CMDLINE_EXACT_MATCH;
+
#copy symbols in cmdline_parse_dumpspecs_flags to constants
push @{$EXPORT_TAGS{"constants"}}, @{$EXPORT_TAGS{"cmdline_parse_dumpspecs_flags"}};
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
amglue_add_constant(CMDLINE_PARSE_DATESTAMP, cmdline_parse_dumpspecs_flags);
amglue_add_constant(CMDLINE_PARSE_LEVEL, cmdline_parse_dumpspecs_flags);
amglue_add_constant(CMDLINE_EMPTY_TO_WILDCARD, cmdline_parse_dumpspecs_flags);
+amglue_add_constant(CMDLINE_EXACT_MATCH, cmdline_parse_dumpspecs_flags);
amglue_copy_to_tag(cmdline_parse_dumpspecs_flags, constants);
%rename(parse_dumpspecs) cmdline_parse_dumpspecs;
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(CNF_TMPDIR)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
+ /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do {
+ SV *sv = get_sv((char*) SWIG_prefix "CNF_REPORT_USE_MEDIA", TRUE | 0x2 | GV_ADDMULTI);
+ sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(CNF_REPORT_USE_MEDIA)));
+ SvREADONLY_on(sv);
+ } while(0) /*@SWIG@*/;
+ /*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do {
+ SV *sv = get_sv((char*) SWIG_prefix "CNF_REPORT_NEXT_MEDIA", TRUE | 0x2 | GV_ADDMULTI);
+ sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(CNF_REPORT_NEXT_MEDIA)));
+ SvREADONLY_on(sv);
+ } while(0) /*@SWIG@*/;
/*@SWIG:/usr/share/swig/2.0.4/perl5/perltypemaps.swg,65,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "TAPETYPE_COMMENT", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(TAPETYPE_COMMENT)));
*CNF_TAPERSCAN = *Amanda::Configc::CNF_TAPERSCAN;
*CNF_EJECT_VOLUME = *Amanda::Configc::CNF_EJECT_VOLUME;
*CNF_TMPDIR = *Amanda::Configc::CNF_TMPDIR;
+*CNF_REPORT_USE_MEDIA = *Amanda::Configc::CNF_REPORT_USE_MEDIA;
+*CNF_REPORT_NEXT_MEDIA = *Amanda::Configc::CNF_REPORT_NEXT_MEDIA;
*TAPETYPE_COMMENT = *Amanda::Configc::TAPETYPE_COMMENT;
*TAPETYPE_LBL_TEMPL = *Amanda::Configc::TAPETYPE_LBL_TEMPL;
*TAPETYPE_BLOCKSIZE = *Amanda::Configc::TAPETYPE_BLOCKSIZE;
return $enumval;
}
-push @EXPORT_OK, qw( $CNF_ORG $CNF_CONF $CNF_AMDUMP_SERVER $CNF_INDEX_SERVER $CNF_TAPE_SERVER $CNF_AUTH $CNF_SSH_KEYS $CNF_AMANDAD_PATH $CNF_CLIENT_USERNAME $CNF_CLIENT_PORT $CNF_GNUTAR_LIST_DIR $CNF_AMANDATES $CNF_MAILER $CNF_MAILTO $CNF_DUMPUSER $CNF_TAPEDEV $CNF_DEVICE_PROPERTY $CNF_PROPERTY $CNF_CHANGERDEV $CNF_CHANGERFILE $CNF_LABELSTR $CNF_AUTOLABEL $CNF_META_AUTOLABEL $CNF_TAPELIST $CNF_DISKFILE $CNF_INFOFILE $CNF_LOGDIR $CNF_INDEXDIR $CNF_TAPETYPE $CNF_DUMPCYCLE $CNF_RUNSPERCYCLE $CNF_TAPECYCLE $CNF_NETUSAGE $CNF_INPARALLEL $CNF_DUMPORDER $CNF_BUMPPERCENT $CNF_BUMPSIZE $CNF_BUMPMULT $CNF_BUMPDAYS $CNF_TPCHANGER $CNF_RUNTAPES $CNF_MAX_DLE_BY_VOLUME $CNF_MAXDUMPS $CNF_ETIMEOUT $CNF_DTIMEOUT $CNF_CTIMEOUT $CNF_DEVICE_OUTPUT_BUFFER_SIZE $CNF_PRINTER $CNF_AUTOFLUSH $CNF_RESERVE $CNF_MAXDUMPSIZE $CNF_COLUMNSPEC $CNF_AMRECOVER_DO_FSF $CNF_AMRECOVER_CHECK_LABEL $CNF_AMRECOVER_CHANGER $CNF_TAPERALGO $CNF_FLUSH_THRESHOLD_DUMPED $CNF_FLUSH_THRESHOLD_SCHEDULED $CNF_TAPERFLUSH $CNF_DISPLAYUNIT $CNF_KRB5KEYTAB $CNF_KRB5PRINCIPAL $CNF_LABEL_NEW_TAPES $CNF_USETIMESTAMPS $CNF_REP_TRIES $CNF_CONNECT_TRIES $CNF_REQ_TRIES $CNF_DEBUG_AMANDAD $CNF_DEBUG_RECOVERY $CNF_DEBUG_AMIDXTAPED $CNF_DEBUG_AMINDEXD $CNF_DEBUG_AMRECOVER $CNF_DEBUG_AUTH $CNF_DEBUG_EVENT $CNF_DEBUG_HOLDING $CNF_DEBUG_PROTOCOL $CNF_DEBUG_PLANNER $CNF_DEBUG_DRIVER $CNF_DEBUG_DUMPER $CNF_DEBUG_CHUNKER $CNF_DEBUG_TAPER $CNF_DEBUG_SELFCHECK $CNF_DEBUG_SENDSIZE $CNF_DEBUG_SENDBACKUP $CNF_RESERVED_UDP_PORT $CNF_RESERVED_TCP_PORT $CNF_UNRESERVED_TCP_PORT $CNF_HOLDINGDISK $CNF_SEND_AMREPORT_ON $CNF_TAPER_PARALLEL_WRITE $CNF_RECOVERY_LIMIT $CNF_INTERACTIVITY $CNF_TAPERSCAN $CNF_EJECT_VOLUME $CNF_TMPDIR);
-push @{$EXPORT_TAGS{"confparm_key"}}, qw( $CNF_ORG $CNF_CONF $CNF_AMDUMP_SERVER $CNF_INDEX_SERVER $CNF_TAPE_SERVER $CNF_AUTH $CNF_SSH_KEYS $CNF_AMANDAD_PATH $CNF_CLIENT_USERNAME $CNF_CLIENT_PORT $CNF_GNUTAR_LIST_DIR $CNF_AMANDATES $CNF_MAILER $CNF_MAILTO $CNF_DUMPUSER $CNF_TAPEDEV $CNF_DEVICE_PROPERTY $CNF_PROPERTY $CNF_CHANGERDEV $CNF_CHANGERFILE $CNF_LABELSTR $CNF_AUTOLABEL $CNF_META_AUTOLABEL $CNF_TAPELIST $CNF_DISKFILE $CNF_INFOFILE $CNF_LOGDIR $CNF_INDEXDIR $CNF_TAPETYPE $CNF_DUMPCYCLE $CNF_RUNSPERCYCLE $CNF_TAPECYCLE $CNF_NETUSAGE $CNF_INPARALLEL $CNF_DUMPORDER $CNF_BUMPPERCENT $CNF_BUMPSIZE $CNF_BUMPMULT $CNF_BUMPDAYS $CNF_TPCHANGER $CNF_RUNTAPES $CNF_MAX_DLE_BY_VOLUME $CNF_MAXDUMPS $CNF_ETIMEOUT $CNF_DTIMEOUT $CNF_CTIMEOUT $CNF_DEVICE_OUTPUT_BUFFER_SIZE $CNF_PRINTER $CNF_AUTOFLUSH $CNF_RESERVE $CNF_MAXDUMPSIZE $CNF_COLUMNSPEC $CNF_AMRECOVER_DO_FSF $CNF_AMRECOVER_CHECK_LABEL $CNF_AMRECOVER_CHANGER $CNF_TAPERALGO $CNF_FLUSH_THRESHOLD_DUMPED $CNF_FLUSH_THRESHOLD_SCHEDULED $CNF_TAPERFLUSH $CNF_DISPLAYUNIT $CNF_KRB5KEYTAB $CNF_KRB5PRINCIPAL $CNF_LABEL_NEW_TAPES $CNF_USETIMESTAMPS $CNF_REP_TRIES $CNF_CONNECT_TRIES $CNF_REQ_TRIES $CNF_DEBUG_AMANDAD $CNF_DEBUG_RECOVERY $CNF_DEBUG_AMIDXTAPED $CNF_DEBUG_AMINDEXD $CNF_DEBUG_AMRECOVER $CNF_DEBUG_AUTH $CNF_DEBUG_EVENT $CNF_DEBUG_HOLDING $CNF_DEBUG_PROTOCOL $CNF_DEBUG_PLANNER $CNF_DEBUG_DRIVER $CNF_DEBUG_DUMPER $CNF_DEBUG_CHUNKER $CNF_DEBUG_TAPER $CNF_DEBUG_SELFCHECK $CNF_DEBUG_SENDSIZE $CNF_DEBUG_SENDBACKUP $CNF_RESERVED_UDP_PORT $CNF_RESERVED_TCP_PORT $CNF_UNRESERVED_TCP_PORT $CNF_HOLDINGDISK $CNF_SEND_AMREPORT_ON $CNF_TAPER_PARALLEL_WRITE $CNF_RECOVERY_LIMIT $CNF_INTERACTIVITY $CNF_TAPERSCAN $CNF_EJECT_VOLUME $CNF_TMPDIR);
- foreach (qw( CNF_ORG CNF_CONF CNF_AMDUMP_SERVER CNF_INDEX_SERVER CNF_TAPE_SERVER CNF_AUTH CNF_SSH_KEYS CNF_AMANDAD_PATH CNF_CLIENT_USERNAME CNF_CLIENT_PORT CNF_GNUTAR_LIST_DIR CNF_AMANDATES CNF_MAILER CNF_MAILTO CNF_DUMPUSER CNF_TAPEDEV CNF_DEVICE_PROPERTY CNF_PROPERTY CNF_CHANGERDEV CNF_CHANGERFILE CNF_LABELSTR CNF_AUTOLABEL CNF_META_AUTOLABEL CNF_TAPELIST CNF_DISKFILE CNF_INFOFILE CNF_LOGDIR CNF_INDEXDIR CNF_TAPETYPE CNF_DUMPCYCLE CNF_RUNSPERCYCLE CNF_TAPECYCLE CNF_NETUSAGE CNF_INPARALLEL CNF_DUMPORDER CNF_BUMPPERCENT CNF_BUMPSIZE CNF_BUMPMULT CNF_BUMPDAYS CNF_TPCHANGER CNF_RUNTAPES CNF_MAX_DLE_BY_VOLUME CNF_MAXDUMPS CNF_ETIMEOUT CNF_DTIMEOUT CNF_CTIMEOUT CNF_DEVICE_OUTPUT_BUFFER_SIZE CNF_PRINTER CNF_AUTOFLUSH CNF_RESERVE CNF_MAXDUMPSIZE CNF_COLUMNSPEC CNF_AMRECOVER_DO_FSF CNF_AMRECOVER_CHECK_LABEL CNF_AMRECOVER_CHANGER CNF_TAPERALGO CNF_FLUSH_THRESHOLD_DUMPED CNF_FLUSH_THRESHOLD_SCHEDULED CNF_TAPERFLUSH CNF_DISPLAYUNIT CNF_KRB5KEYTAB CNF_KRB5PRINCIPAL CNF_LABEL_NEW_TAPES CNF_USETIMESTAMPS CNF_REP_TRIES CNF_CONNECT_TRIES CNF_REQ_TRIES CNF_DEBUG_AMANDAD CNF_DEBUG_RECOVERY CNF_DEBUG_AMIDXTAPED CNF_DEBUG_AMINDEXD CNF_DEBUG_AMRECOVER CNF_DEBUG_AUTH CNF_DEBUG_EVENT CNF_DEBUG_HOLDING CNF_DEBUG_PROTOCOL CNF_DEBUG_PLANNER CNF_DEBUG_DRIVER CNF_DEBUG_DUMPER CNF_DEBUG_CHUNKER CNF_DEBUG_TAPER CNF_DEBUG_SELFCHECK CNF_DEBUG_SENDSIZE CNF_DEBUG_SENDBACKUP CNF_RESERVED_UDP_PORT CNF_RESERVED_TCP_PORT CNF_UNRESERVED_TCP_PORT CNF_HOLDINGDISK CNF_SEND_AMREPORT_ON CNF_TAPER_PARALLEL_WRITE CNF_RECOVERY_LIMIT CNF_INTERACTIVITY CNF_TAPERSCAN CNF_EJECT_VOLUME CNF_TMPDIR)) { $_confparm_key_VALUES{$_} = $$_; }
+push @EXPORT_OK, qw( $CNF_ORG $CNF_CONF $CNF_AMDUMP_SERVER $CNF_INDEX_SERVER $CNF_TAPE_SERVER $CNF_AUTH $CNF_SSH_KEYS $CNF_AMANDAD_PATH $CNF_CLIENT_USERNAME $CNF_CLIENT_PORT $CNF_GNUTAR_LIST_DIR $CNF_AMANDATES $CNF_MAILER $CNF_MAILTO $CNF_DUMPUSER $CNF_TAPEDEV $CNF_DEVICE_PROPERTY $CNF_PROPERTY $CNF_CHANGERDEV $CNF_CHANGERFILE $CNF_LABELSTR $CNF_AUTOLABEL $CNF_META_AUTOLABEL $CNF_TAPELIST $CNF_DISKFILE $CNF_INFOFILE $CNF_LOGDIR $CNF_INDEXDIR $CNF_TAPETYPE $CNF_DUMPCYCLE $CNF_RUNSPERCYCLE $CNF_TAPECYCLE $CNF_NETUSAGE $CNF_INPARALLEL $CNF_DUMPORDER $CNF_BUMPPERCENT $CNF_BUMPSIZE $CNF_BUMPMULT $CNF_BUMPDAYS $CNF_TPCHANGER $CNF_RUNTAPES $CNF_MAX_DLE_BY_VOLUME $CNF_MAXDUMPS $CNF_ETIMEOUT $CNF_DTIMEOUT $CNF_CTIMEOUT $CNF_DEVICE_OUTPUT_BUFFER_SIZE $CNF_PRINTER $CNF_AUTOFLUSH $CNF_RESERVE $CNF_MAXDUMPSIZE $CNF_COLUMNSPEC $CNF_AMRECOVER_DO_FSF $CNF_AMRECOVER_CHECK_LABEL $CNF_AMRECOVER_CHANGER $CNF_TAPERALGO $CNF_FLUSH_THRESHOLD_DUMPED $CNF_FLUSH_THRESHOLD_SCHEDULED $CNF_TAPERFLUSH $CNF_DISPLAYUNIT $CNF_KRB5KEYTAB $CNF_KRB5PRINCIPAL $CNF_LABEL_NEW_TAPES $CNF_USETIMESTAMPS $CNF_REP_TRIES $CNF_CONNECT_TRIES $CNF_REQ_TRIES $CNF_DEBUG_AMANDAD $CNF_DEBUG_RECOVERY $CNF_DEBUG_AMIDXTAPED $CNF_DEBUG_AMINDEXD $CNF_DEBUG_AMRECOVER $CNF_DEBUG_AUTH $CNF_DEBUG_EVENT $CNF_DEBUG_HOLDING $CNF_DEBUG_PROTOCOL $CNF_DEBUG_PLANNER $CNF_DEBUG_DRIVER $CNF_DEBUG_DUMPER $CNF_DEBUG_CHUNKER $CNF_DEBUG_TAPER $CNF_DEBUG_SELFCHECK $CNF_DEBUG_SENDSIZE $CNF_DEBUG_SENDBACKUP $CNF_RESERVED_UDP_PORT $CNF_RESERVED_TCP_PORT $CNF_UNRESERVED_TCP_PORT $CNF_HOLDINGDISK $CNF_SEND_AMREPORT_ON $CNF_TAPER_PARALLEL_WRITE $CNF_RECOVERY_LIMIT $CNF_INTERACTIVITY $CNF_TAPERSCAN $CNF_EJECT_VOLUME $CNF_TMPDIR $CNF_REPORT_USE_MEDIA $CNF_REPORT_NEXT_MEDIA);
+push @{$EXPORT_TAGS{"confparm_key"}}, qw( $CNF_ORG $CNF_CONF $CNF_AMDUMP_SERVER $CNF_INDEX_SERVER $CNF_TAPE_SERVER $CNF_AUTH $CNF_SSH_KEYS $CNF_AMANDAD_PATH $CNF_CLIENT_USERNAME $CNF_CLIENT_PORT $CNF_GNUTAR_LIST_DIR $CNF_AMANDATES $CNF_MAILER $CNF_MAILTO $CNF_DUMPUSER $CNF_TAPEDEV $CNF_DEVICE_PROPERTY $CNF_PROPERTY $CNF_CHANGERDEV $CNF_CHANGERFILE $CNF_LABELSTR $CNF_AUTOLABEL $CNF_META_AUTOLABEL $CNF_TAPELIST $CNF_DISKFILE $CNF_INFOFILE $CNF_LOGDIR $CNF_INDEXDIR $CNF_TAPETYPE $CNF_DUMPCYCLE $CNF_RUNSPERCYCLE $CNF_TAPECYCLE $CNF_NETUSAGE $CNF_INPARALLEL $CNF_DUMPORDER $CNF_BUMPPERCENT $CNF_BUMPSIZE $CNF_BUMPMULT $CNF_BUMPDAYS $CNF_TPCHANGER $CNF_RUNTAPES $CNF_MAX_DLE_BY_VOLUME $CNF_MAXDUMPS $CNF_ETIMEOUT $CNF_DTIMEOUT $CNF_CTIMEOUT $CNF_DEVICE_OUTPUT_BUFFER_SIZE $CNF_PRINTER $CNF_AUTOFLUSH $CNF_RESERVE $CNF_MAXDUMPSIZE $CNF_COLUMNSPEC $CNF_AMRECOVER_DO_FSF $CNF_AMRECOVER_CHECK_LABEL $CNF_AMRECOVER_CHANGER $CNF_TAPERALGO $CNF_FLUSH_THRESHOLD_DUMPED $CNF_FLUSH_THRESHOLD_SCHEDULED $CNF_TAPERFLUSH $CNF_DISPLAYUNIT $CNF_KRB5KEYTAB $CNF_KRB5PRINCIPAL $CNF_LABEL_NEW_TAPES $CNF_USETIMESTAMPS $CNF_REP_TRIES $CNF_CONNECT_TRIES $CNF_REQ_TRIES $CNF_DEBUG_AMANDAD $CNF_DEBUG_RECOVERY $CNF_DEBUG_AMIDXTAPED $CNF_DEBUG_AMINDEXD $CNF_DEBUG_AMRECOVER $CNF_DEBUG_AUTH $CNF_DEBUG_EVENT $CNF_DEBUG_HOLDING $CNF_DEBUG_PROTOCOL $CNF_DEBUG_PLANNER $CNF_DEBUG_DRIVER $CNF_DEBUG_DUMPER $CNF_DEBUG_CHUNKER $CNF_DEBUG_TAPER $CNF_DEBUG_SELFCHECK $CNF_DEBUG_SENDSIZE $CNF_DEBUG_SENDBACKUP $CNF_RESERVED_UDP_PORT $CNF_RESERVED_TCP_PORT $CNF_UNRESERVED_TCP_PORT $CNF_HOLDINGDISK $CNF_SEND_AMREPORT_ON $CNF_TAPER_PARALLEL_WRITE $CNF_RECOVERY_LIMIT $CNF_INTERACTIVITY $CNF_TAPERSCAN $CNF_EJECT_VOLUME $CNF_TMPDIR $CNF_REPORT_USE_MEDIA $CNF_REPORT_NEXT_MEDIA);
+ foreach (qw( CNF_ORG CNF_CONF CNF_AMDUMP_SERVER CNF_INDEX_SERVER CNF_TAPE_SERVER CNF_AUTH CNF_SSH_KEYS CNF_AMANDAD_PATH CNF_CLIENT_USERNAME CNF_CLIENT_PORT CNF_GNUTAR_LIST_DIR CNF_AMANDATES CNF_MAILER CNF_MAILTO CNF_DUMPUSER CNF_TAPEDEV CNF_DEVICE_PROPERTY CNF_PROPERTY CNF_CHANGERDEV CNF_CHANGERFILE CNF_LABELSTR CNF_AUTOLABEL CNF_META_AUTOLABEL CNF_TAPELIST CNF_DISKFILE CNF_INFOFILE CNF_LOGDIR CNF_INDEXDIR CNF_TAPETYPE CNF_DUMPCYCLE CNF_RUNSPERCYCLE CNF_TAPECYCLE CNF_NETUSAGE CNF_INPARALLEL CNF_DUMPORDER CNF_BUMPPERCENT CNF_BUMPSIZE CNF_BUMPMULT CNF_BUMPDAYS CNF_TPCHANGER CNF_RUNTAPES CNF_MAX_DLE_BY_VOLUME CNF_MAXDUMPS CNF_ETIMEOUT CNF_DTIMEOUT CNF_CTIMEOUT CNF_DEVICE_OUTPUT_BUFFER_SIZE CNF_PRINTER CNF_AUTOFLUSH CNF_RESERVE CNF_MAXDUMPSIZE CNF_COLUMNSPEC CNF_AMRECOVER_DO_FSF CNF_AMRECOVER_CHECK_LABEL CNF_AMRECOVER_CHANGER CNF_TAPERALGO CNF_FLUSH_THRESHOLD_DUMPED CNF_FLUSH_THRESHOLD_SCHEDULED CNF_TAPERFLUSH CNF_DISPLAYUNIT CNF_KRB5KEYTAB CNF_KRB5PRINCIPAL CNF_LABEL_NEW_TAPES CNF_USETIMESTAMPS CNF_REP_TRIES CNF_CONNECT_TRIES CNF_REQ_TRIES CNF_DEBUG_AMANDAD CNF_DEBUG_RECOVERY CNF_DEBUG_AMIDXTAPED CNF_DEBUG_AMINDEXD CNF_DEBUG_AMRECOVER CNF_DEBUG_AUTH CNF_DEBUG_EVENT CNF_DEBUG_HOLDING CNF_DEBUG_PROTOCOL CNF_DEBUG_PLANNER CNF_DEBUG_DRIVER CNF_DEBUG_DUMPER CNF_DEBUG_CHUNKER CNF_DEBUG_TAPER CNF_DEBUG_SELFCHECK CNF_DEBUG_SENDSIZE CNF_DEBUG_SENDBACKUP CNF_RESERVED_UDP_PORT CNF_RESERVED_TCP_PORT CNF_UNRESERVED_TCP_PORT CNF_HOLDINGDISK CNF_SEND_AMREPORT_ON CNF_TAPER_PARALLEL_WRITE CNF_RECOVERY_LIMIT CNF_INTERACTIVITY CNF_TAPERSCAN CNF_EJECT_VOLUME CNF_TMPDIR CNF_REPORT_USE_MEDIA CNF_REPORT_NEXT_MEDIA)) { $_confparm_key_VALUES{$_} = $$_; }
#copy symbols in confparm_key to getconf
push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"confparm_key"}};
=pod
-Global Parameters: C<$CNF_ORG> C<$CNF_CONF> C<$CNF_AMDUMP_SERVER> C<$CNF_INDEX_SERVER> C<$CNF_TAPE_SERVER> C<$CNF_AUTH> C<$CNF_SSH_KEYS> C<$CNF_AMANDAD_PATH> C<$CNF_CLIENT_USERNAME> C<$CNF_CLIENT_PORT> C<$CNF_GNUTAR_LIST_DIR> C<$CNF_AMANDATES> C<$CNF_MAILER> C<$CNF_MAILTO> C<$CNF_DUMPUSER> C<$CNF_TAPEDEV> C<$CNF_DEVICE_PROPERTY> C<$CNF_PROPERTY> C<$CNF_CHANGERDEV> C<$CNF_CHANGERFILE> C<$CNF_LABELSTR> C<$CNF_AUTOLABEL> C<$CNF_META_AUTOLABEL> C<$CNF_TAPELIST> C<$CNF_DISKFILE> C<$CNF_INFOFILE> C<$CNF_LOGDIR> C<$CNF_INDEXDIR> C<$CNF_TAPETYPE> C<$CNF_DUMPCYCLE> C<$CNF_RUNSPERCYCLE> C<$CNF_TAPECYCLE> C<$CNF_NETUSAGE> C<$CNF_INPARALLEL> C<$CNF_DUMPORDER> C<$CNF_BUMPPERCENT> C<$CNF_BUMPSIZE> C<$CNF_BUMPMULT> C<$CNF_BUMPDAYS> C<$CNF_TPCHANGER> C<$CNF_RUNTAPES> C<$CNF_MAX_DLE_BY_VOLUME> C<$CNF_MAXDUMPS> C<$CNF_ETIMEOUT> C<$CNF_DTIMEOUT> C<$CNF_CTIMEOUT> C<$CNF_DEVICE_OUTPUT_BUFFER_SIZE> C<$CNF_PRINTER> C<$CNF_AUTOFLUSH> C<$CNF_RESERVE> C<$CNF_MAXDUMPSIZE> C<$CNF_COLUMNSPEC> C<$CNF_AMRECOVER_DO_FSF> C<$CNF_AMRECOVER_CHECK_LABEL> C<$CNF_AMRECOVER_CHANGER> C<$CNF_TAPERALGO> C<$CNF_FLUSH_THRESHOLD_DUMPED> C<$CNF_FLUSH_THRESHOLD_SCHEDULED> C<$CNF_TAPERFLUSH> C<$CNF_DISPLAYUNIT> C<$CNF_KRB5KEYTAB> C<$CNF_KRB5PRINCIPAL> C<$CNF_LABEL_NEW_TAPES> C<$CNF_USETIMESTAMPS> C<$CNF_REP_TRIES> C<$CNF_CONNECT_TRIES> C<$CNF_REQ_TRIES> C<$CNF_DEBUG_AMANDAD> C<$CNF_DEBUG_RECOVERY> C<$CNF_DEBUG_AMIDXTAPED> C<$CNF_DEBUG_AMINDEXD> C<$CNF_DEBUG_AMRECOVER> C<$CNF_DEBUG_AUTH> C<$CNF_DEBUG_EVENT> C<$CNF_DEBUG_HOLDING> C<$CNF_DEBUG_PROTOCOL> C<$CNF_DEBUG_PLANNER> C<$CNF_DEBUG_DRIVER> C<$CNF_DEBUG_DUMPER> C<$CNF_DEBUG_CHUNKER> C<$CNF_DEBUG_TAPER> C<$CNF_DEBUG_SELFCHECK> C<$CNF_DEBUG_SENDSIZE> C<$CNF_DEBUG_SENDBACKUP> C<$CNF_RESERVED_UDP_PORT> C<$CNF_RESERVED_TCP_PORT> C<$CNF_UNRESERVED_TCP_PORT> C<$CNF_HOLDINGDISK> C<$CNF_SEND_AMREPORT_ON> C<$CNF_TAPER_PARALLEL_WRITE> C<$CNF_RECOVERY_LIMIT> C<$CNF_INTERACTIVITY> C<$CNF_TAPERSCAN> C<$CNF_EJECT_VOLUME> C<$CNF_TMPDIR>
+Global Parameters: C<$CNF_ORG> C<$CNF_CONF> C<$CNF_AMDUMP_SERVER> C<$CNF_INDEX_SERVER> C<$CNF_TAPE_SERVER> C<$CNF_AUTH> C<$CNF_SSH_KEYS> C<$CNF_AMANDAD_PATH> C<$CNF_CLIENT_USERNAME> C<$CNF_CLIENT_PORT> C<$CNF_GNUTAR_LIST_DIR> C<$CNF_AMANDATES> C<$CNF_MAILER> C<$CNF_MAILTO> C<$CNF_DUMPUSER> C<$CNF_TAPEDEV> C<$CNF_DEVICE_PROPERTY> C<$CNF_PROPERTY> C<$CNF_CHANGERDEV> C<$CNF_CHANGERFILE> C<$CNF_LABELSTR> C<$CNF_AUTOLABEL> C<$CNF_META_AUTOLABEL> C<$CNF_TAPELIST> C<$CNF_DISKFILE> C<$CNF_INFOFILE> C<$CNF_LOGDIR> C<$CNF_INDEXDIR> C<$CNF_TAPETYPE> C<$CNF_DUMPCYCLE> C<$CNF_RUNSPERCYCLE> C<$CNF_TAPECYCLE> C<$CNF_NETUSAGE> C<$CNF_INPARALLEL> C<$CNF_DUMPORDER> C<$CNF_BUMPPERCENT> C<$CNF_BUMPSIZE> C<$CNF_BUMPMULT> C<$CNF_BUMPDAYS> C<$CNF_TPCHANGER> C<$CNF_RUNTAPES> C<$CNF_MAX_DLE_BY_VOLUME> C<$CNF_MAXDUMPS> C<$CNF_ETIMEOUT> C<$CNF_DTIMEOUT> C<$CNF_CTIMEOUT> C<$CNF_DEVICE_OUTPUT_BUFFER_SIZE> C<$CNF_PRINTER> C<$CNF_AUTOFLUSH> C<$CNF_RESERVE> C<$CNF_MAXDUMPSIZE> C<$CNF_COLUMNSPEC> C<$CNF_AMRECOVER_DO_FSF> C<$CNF_AMRECOVER_CHECK_LABEL> C<$CNF_AMRECOVER_CHANGER> C<$CNF_TAPERALGO> C<$CNF_FLUSH_THRESHOLD_DUMPED> C<$CNF_FLUSH_THRESHOLD_SCHEDULED> C<$CNF_TAPERFLUSH> C<$CNF_DISPLAYUNIT> C<$CNF_KRB5KEYTAB> C<$CNF_KRB5PRINCIPAL> C<$CNF_LABEL_NEW_TAPES> C<$CNF_USETIMESTAMPS> C<$CNF_REP_TRIES> C<$CNF_CONNECT_TRIES> C<$CNF_REQ_TRIES> C<$CNF_DEBUG_AMANDAD> C<$CNF_DEBUG_RECOVERY> C<$CNF_DEBUG_AMIDXTAPED> C<$CNF_DEBUG_AMINDEXD> C<$CNF_DEBUG_AMRECOVER> C<$CNF_DEBUG_AUTH> C<$CNF_DEBUG_EVENT> C<$CNF_DEBUG_HOLDING> C<$CNF_DEBUG_PROTOCOL> C<$CNF_DEBUG_PLANNER> C<$CNF_DEBUG_DRIVER> C<$CNF_DEBUG_DUMPER> C<$CNF_DEBUG_CHUNKER> C<$CNF_DEBUG_TAPER> C<$CNF_DEBUG_SELFCHECK> C<$CNF_DEBUG_SENDSIZE> C<$CNF_DEBUG_SENDBACKUP> C<$CNF_RESERVED_UDP_PORT> C<$CNF_RESERVED_TCP_PORT> C<$CNF_UNRESERVED_TCP_PORT> C<$CNF_HOLDINGDISK> C<$CNF_SEND_AMREPORT_ON> C<$CNF_TAPER_PARALLEL_WRITE> C<$CNF_RECOVERY_LIMIT> C<$CNF_INTERACTIVITY> C<$CNF_TAPERSCAN> C<$CNF_EJECT_VOLUME> C<$CNF_TMPDIR> C<$CNF_REPORT_USE_MEDIA> C<$CNF_REPORT_NEXT_MEDIA>
=cut
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
APPLY(CNF_INTERACTIVITY) \
APPLY(CNF_TAPERSCAN) \
APPLY(CNF_EJECT_VOLUME) \
-APPLY(CNF_TMPDIR)
+APPLY(CNF_TMPDIR) \
+APPLY(CNF_REPORT_USE_MEDIA) \
+APPLY(CNF_REPORT_NEXT_MEDIA)
amglue_add_enum_tag_fns(confparm_key);
amglue_add_constants(FOR_ALL_CONFPARM_KEY, confparm_key);
# vim:ft=perl
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#define SWIGTYPE_p_Device swig_types[0]
#define SWIGTYPE_p_DevicePropertyBase swig_types[1]
-#define SWIGTYPE_p_DirectTCPAddr swig_types[2]
-#define SWIGTYPE_p_DirectTCPConnection swig_types[3]
-#define SWIGTYPE_p_GCond swig_types[4]
-#define SWIGTYPE_p_GMutex swig_types[5]
-#define SWIGTYPE_p_GSList swig_types[6]
-#define SWIGTYPE_p_GValue swig_types[7]
-#define SWIGTYPE_p_a_STRMAX__char swig_types[8]
-#define SWIGTYPE_p_char swig_types[9]
-#define SWIGTYPE_p_double swig_types[10]
-#define SWIGTYPE_p_dumpfile_t swig_types[11]
-#define SWIGTYPE_p_float swig_types[12]
-#define SWIGTYPE_p_guint swig_types[13]
-#define SWIGTYPE_p_guint32 swig_types[14]
-#define SWIGTYPE_p_guint64 swig_types[15]
-#define SWIGTYPE_p_int swig_types[16]
-#define SWIGTYPE_p_p_DirectTCPAddr swig_types[17]
-#define SWIGTYPE_p_unsigned_char swig_types[18]
-static swig_type_info *swig_types[20];
-static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0};
+#define SWIGTYPE_p_DirectTCPConnection swig_types[2]
+#define SWIGTYPE_p_GSList swig_types[3]
+#define SWIGTYPE_p_GValue swig_types[4]
+#define SWIGTYPE_p_a_STRMAX__char swig_types[5]
+#define SWIGTYPE_p_char swig_types[6]
+#define SWIGTYPE_p_double swig_types[7]
+#define SWIGTYPE_p_dumpfile_t swig_types[8]
+#define SWIGTYPE_p_float swig_types[9]
+#define SWIGTYPE_p_guint swig_types[10]
+#define SWIGTYPE_p_guint32 swig_types[11]
+#define SWIGTYPE_p_guint64 swig_types[12]
+#define SWIGTYPE_p_int swig_types[13]
+#define SWIGTYPE_p_p_DirectTCPAddr swig_types[14]
+#define SWIGTYPE_p_unsigned_char swig_types[15]
+static swig_type_info *swig_types[17];
+static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
if (!device_listen(self, for_writing, addrs))
*addrs = NULL;
}
-SWIGINTERN DirectTCPConnection *Device_accept(Device *self){
- DirectTCPConnection *conn = NULL;
- gboolean rv;
-
- rv = device_accept(self, &conn, NULL, NULL);
- if (!rv && conn) {
- /* conn is ref'd for our convenience, but we don't want it */
- g_object_unref(conn);
- conn = NULL;
- }
- return conn;
- }
-SWIGINTERN DirectTCPConnection *Device_accept_with_cond(Device *self,GMutex *abort_mutex,GCond *abort_cond){
- DirectTCPConnection *conn = NULL;
- gboolean rv;
-
- rv = device_accept_with_cond(self, &conn, abort_mutex, abort_cond);
- if (!rv && conn) {
- /* conn is ref'd for our convenience, but we don't want it */
- g_object_unref(conn);
- conn = NULL;
- }
- return conn;
- }
-SWIGINTERN DirectTCPConnection *Device_connect(Device *self,gboolean for_writing,DirectTCPAddr *addrs){
- DirectTCPConnection *conn = NULL;
- gboolean rv;
-
- rv = device_connect(self, for_writing, addrs, &conn, NULL, NULL);
- if (!rv && conn) {
- /* conn is ref'd for our convenience, but we don't want it */
- g_object_unref(conn);
- conn = NULL;
- }
- return conn;
- }
-SWIGINTERN DirectTCPConnection *Device_connect_with_cond(Device *self,gboolean for_writing,DirectTCPAddr *addrs,GMutex *abort_mutex,GCond *abort_cond){
- DirectTCPConnection *conn = NULL;
- gboolean rv;
-
- rv = device_connect_with_cond(self, for_writing, addrs, &conn,
- abort_mutex, abort_cond);
- if (!rv && conn) {
- /* conn is ref'd for our convenience, but we don't want it */
- g_object_unref(conn);
- conn = NULL;
- }
- return conn;
- }
SWIGINTERN gboolean Device_use_connection(Device *self,DirectTCPConnection *conn){
return device_use_connection(self, conn);
}
-SWIGINTERN gboolean Device_write_from_connection(Device *self,guint64 size,guint64 *actual_size){
- return device_write_from_connection(self, size, actual_size);
- }
-SWIGINTERN gboolean Device_read_to_connection(Device *self,guint64 size,guint64 *actual_size){
- return device_read_to_connection(self, size, actual_size);
- }
SWIGINTERN GSList const *Device_property_list(Device *self){
return device_property_get_list(self);
}
- SWIG_croak_null();
- }
-}
-
-
-XS(_wrap_Device_accept) {
- {
- Device *arg1 = (Device *) 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- int argvi = 0;
- DirectTCPConnection *result = 0 ;
- dXSARGS;
-
- if ((items < 1) || (items > 1)) {
- SWIG_croak("Usage: Device_accept(self);");
- }
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_accept" "', argument " "1"" of type '" "Device *""'");
- }
- arg1 = (Device *)(argp1);
- result = (DirectTCPConnection *)Device_accept(arg1);
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirectTCPConnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
-
- XSRETURN(argvi);
- fail:
-
- SWIG_croak_null();
- }
-}
-
-
-XS(_wrap_Device_accept_with_cond) {
- {
- Device *arg1 = (Device *) 0 ;
- GMutex *arg2 = (GMutex *) 0 ;
- GCond *arg3 = (GCond *) 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- void *argp2 = 0 ;
- int res2 = 0 ;
- void *argp3 = 0 ;
- int res3 = 0 ;
- int argvi = 0;
- DirectTCPConnection *result = 0 ;
- dXSARGS;
-
- if ((items < 3) || (items > 3)) {
- SWIG_croak("Usage: Device_accept_with_cond(self,abort_mutex,abort_cond);");
- }
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_accept_with_cond" "', argument " "1"" of type '" "Device *""'");
- }
- arg1 = (Device *)(argp1);
- res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_GMutex, 0 | 0 );
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Device_accept_with_cond" "', argument " "2"" of type '" "GMutex *""'");
- }
- arg2 = (GMutex *)(argp2);
- res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_GCond, 0 | 0 );
- if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Device_accept_with_cond" "', argument " "3"" of type '" "GCond *""'");
- }
- arg3 = (GCond *)(argp3);
- result = (DirectTCPConnection *)Device_accept_with_cond(arg1,arg2,arg3);
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirectTCPConnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
-
-
-
- XSRETURN(argvi);
- fail:
-
-
-
- SWIG_croak_null();
- }
-}
-
-
-XS(_wrap_Device_connect) {
- {
- Device *arg1 = (Device *) 0 ;
- gboolean arg2 ;
- DirectTCPAddr *arg3 = (DirectTCPAddr *) 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- int argvi = 0;
- DirectTCPConnection *result = 0 ;
- dXSARGS;
-
- if ((items < 3) || (items > 3)) {
- SWIG_croak("Usage: Device_connect(self,for_writing,addrs);");
- }
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_connect" "', argument " "1"" of type '" "Device *""'");
- }
- arg1 = (Device *)(argp1);
- {
- arg2 = SvTRUE(ST(1));
- }
- {
- AV *addrs_av;
- int num_addrs, i;
-
- if (!SvROK(ST(2)) || SvTYPE(SvRV(ST(2))) != SVt_PVAV) {
- SWIG_exception_fail(SWIG_TypeError, "must provide an arrayref of DirectTCPAddrs");
- }
- addrs_av = (AV *)SvRV(ST(2));
- num_addrs = av_len(addrs_av)+1;
-
- arg3 = g_new0(DirectTCPAddr, num_addrs+1);
-
- for (i = 0; i < num_addrs; i++) {
- SV **svp = av_fetch(addrs_av, i, 0);
- AV *addr_av;
- sockaddr_union addr;
- IV port;
-
- if (!svp || !SvROK(*svp) || SvTYPE(SvRV(*svp)) != SVt_PVAV
- || av_len((AV *)SvRV(*svp))+1 != 2) {
- SWIG_exception_fail(SWIG_TypeError, "each DirectTCPAddr must be a 2-element arrayref");
- }
-
- addr_av = (AV *)SvRV(*svp);
-
- /* get address */
- svp = av_fetch(addr_av, 0, 0);
- if (!svp || !SvPOK(*svp) || !str_to_sockaddr(SvPV_nolen(*svp), &addr)) {
- SWIG_exception_fail(SWIG_TypeError, "invalid IPv4 addr in address");
- }
-
- /* get port */
- svp = av_fetch(addr_av, 1, 0);
- if (!svp || !SvIOK(*svp) || (port = SvIV(*svp)) <= 0 || port >= 65536) {
- SWIG_exception_fail(SWIG_TypeError, "invalid port in address");
- }
- SU_SET_PORT(&addr, port);
-
- copy_sockaddr(arg3, &addr);
- }
- }
- result = (DirectTCPConnection *)Device_connect(arg1,arg2,arg3);
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirectTCPConnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
-
-
-
- XSRETURN(argvi);
- fail:
-
-
-
- SWIG_croak_null();
- }
-}
-
-
-XS(_wrap_Device_connect_with_cond) {
- {
- Device *arg1 = (Device *) 0 ;
- gboolean arg2 ;
- DirectTCPAddr *arg3 = (DirectTCPAddr *) 0 ;
- GMutex *arg4 = (GMutex *) 0 ;
- GCond *arg5 = (GCond *) 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- void *argp4 = 0 ;
- int res4 = 0 ;
- void *argp5 = 0 ;
- int res5 = 0 ;
- int argvi = 0;
- DirectTCPConnection *result = 0 ;
- dXSARGS;
-
- if ((items < 5) || (items > 5)) {
- SWIG_croak("Usage: Device_connect_with_cond(self,for_writing,addrs,abort_mutex,abort_cond);");
- }
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_connect_with_cond" "', argument " "1"" of type '" "Device *""'");
- }
- arg1 = (Device *)(argp1);
- {
- arg2 = SvTRUE(ST(1));
- }
- {
- AV *addrs_av;
- int num_addrs, i;
-
- if (!SvROK(ST(2)) || SvTYPE(SvRV(ST(2))) != SVt_PVAV) {
- SWIG_exception_fail(SWIG_TypeError, "must provide an arrayref of DirectTCPAddrs");
- }
- addrs_av = (AV *)SvRV(ST(2));
- num_addrs = av_len(addrs_av)+1;
-
- arg3 = g_new0(DirectTCPAddr, num_addrs+1);
-
- for (i = 0; i < num_addrs; i++) {
- SV **svp = av_fetch(addrs_av, i, 0);
- AV *addr_av;
- sockaddr_union addr;
- IV port;
-
- if (!svp || !SvROK(*svp) || SvTYPE(SvRV(*svp)) != SVt_PVAV
- || av_len((AV *)SvRV(*svp))+1 != 2) {
- SWIG_exception_fail(SWIG_TypeError, "each DirectTCPAddr must be a 2-element arrayref");
- }
-
- addr_av = (AV *)SvRV(*svp);
-
- /* get address */
- svp = av_fetch(addr_av, 0, 0);
- if (!svp || !SvPOK(*svp) || !str_to_sockaddr(SvPV_nolen(*svp), &addr)) {
- SWIG_exception_fail(SWIG_TypeError, "invalid IPv4 addr in address");
- }
-
- /* get port */
- svp = av_fetch(addr_av, 1, 0);
- if (!svp || !SvIOK(*svp) || (port = SvIV(*svp)) <= 0 || port >= 65536) {
- SWIG_exception_fail(SWIG_TypeError, "invalid port in address");
- }
- SU_SET_PORT(&addr, port);
-
- copy_sockaddr(arg3, &addr);
- }
- }
- res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_GMutex, 0 | 0 );
- if (!SWIG_IsOK(res4)) {
- SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Device_connect_with_cond" "', argument " "4"" of type '" "GMutex *""'");
- }
- arg4 = (GMutex *)(argp4);
- res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_GCond, 0 | 0 );
- if (!SWIG_IsOK(res5)) {
- SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Device_connect_with_cond" "', argument " "5"" of type '" "GCond *""'");
- }
- arg5 = (GCond *)(argp5);
- result = (DirectTCPConnection *)Device_connect_with_cond(arg1,arg2,arg3,arg4,arg5);
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirectTCPConnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
-
-
-
-
-
- XSRETURN(argvi);
- fail:
-
-
-
-
-
SWIG_croak_null();
}
}
}
-XS(_wrap_Device_write_from_connection) {
- {
- Device *arg1 = (Device *) 0 ;
- guint64 arg2 ;
- guint64 *arg3 = (guint64 *) 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- guint64 sz3 ;
- int argvi = 0;
- gboolean result;
- dXSARGS;
-
- {
- sz3 = 0;
- arg3 = &sz3;
- }
- if ((items < 2) || (items > 2)) {
- SWIG_croak("Usage: Device_write_from_connection(self,size);");
- }
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_write_from_connection" "', argument " "1"" of type '" "Device *""'");
- }
- arg1 = (Device *)(argp1);
- {
- arg2 = amglue_SvU64(ST(1));
- }
- result = (gboolean)Device_write_from_connection(arg1,arg2,arg3);
- {
- if (result)
- ST(argvi) = &PL_sv_yes;
- else
- ST(argvi) = &PL_sv_no;
- argvi++;
- }
- {
- SP += argvi; PUTBACK;
- ST(argvi) = sv_2mortal(amglue_newSVu64(*arg3));
- SPAGAIN; SP -= argvi; argvi++;
- }
-
-
- XSRETURN(argvi);
- fail:
-
-
- SWIG_croak_null();
- }
-}
-
-
-XS(_wrap_Device_read_to_connection) {
- {
- Device *arg1 = (Device *) 0 ;
- guint64 arg2 ;
- guint64 *arg3 = (guint64 *) 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- guint64 sz3 ;
- int argvi = 0;
- gboolean result;
- dXSARGS;
-
- {
- sz3 = 0;
- arg3 = &sz3;
- }
- if ((items < 2) || (items > 2)) {
- SWIG_croak("Usage: Device_read_to_connection(self,size);");
- }
- res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_read_to_connection" "', argument " "1"" of type '" "Device *""'");
- }
- arg1 = (Device *)(argp1);
- {
- arg2 = amglue_SvU64(ST(1));
- }
- result = (gboolean)Device_read_to_connection(arg1,arg2,arg3);
- {
- if (result)
- ST(argvi) = &PL_sv_yes;
- else
- ST(argvi) = &PL_sv_no;
- argvi++;
- }
- {
- SP += argvi; PUTBACK;
- ST(argvi) = sv_2mortal(amglue_newSVu64(*arg3));
- SPAGAIN; SP -= argvi; argvi++;
- }
-
-
- XSRETURN(argvi);
- fail:
-
-
- SWIG_croak_null();
- }
-}
-
-
XS(_wrap_Device_property_list) {
{
Device *arg1 = (Device *) 0 ;
static swig_type_info _swigt__p_Device = {"_p_Device", "struct Device *|Device *", 0, 0, (void*)"Amanda::Device::Device", 0};
static swig_type_info _swigt__p_DevicePropertyBase = {"_p_DevicePropertyBase", "DevicePropertyBase *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_DirectTCPAddr = {"_p_DirectTCPAddr", "DirectTCPAddr *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_DirectTCPConnection = {"_p_DirectTCPConnection", "struct DirectTCPConnection *|DirectTCPConnection *", 0, 0, (void*)"Amanda::Device::DirectTCPConnection", 0};
-static swig_type_info _swigt__p_GCond = {"_p_GCond", "GCond *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GMutex = {"_p_GMutex", "GMutex *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GSList = {"_p_GSList", "GSList *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GValue = {"_p_GValue", "GValue *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_a_STRMAX__char = {"_p_a_STRMAX__char", "char (*)[STRMAX]|string_t *", 0, 0, (void*)0, 0};
static swig_type_info *swig_type_initial[] = {
&_swigt__p_Device,
&_swigt__p_DevicePropertyBase,
- &_swigt__p_DirectTCPAddr,
&_swigt__p_DirectTCPConnection,
- &_swigt__p_GCond,
- &_swigt__p_GMutex,
&_swigt__p_GSList,
&_swigt__p_GValue,
&_swigt__p_a_STRMAX__char,
static swig_cast_info _swigc__p_Device[] = { {&_swigt__p_Device, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DevicePropertyBase[] = { {&_swigt__p_DevicePropertyBase, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_DirectTCPAddr[] = { {&_swigt__p_DirectTCPAddr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DirectTCPConnection[] = { {&_swigt__p_DirectTCPConnection, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GCond[] = { {&_swigt__p_GCond, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GMutex[] = { {&_swigt__p_GMutex, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GSList[] = { {&_swigt__p_GSList, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GValue[] = { {&_swigt__p_GValue, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_a_STRMAX__char[] = { {&_swigt__p_a_STRMAX__char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
_swigc__p_Device,
_swigc__p_DevicePropertyBase,
- _swigc__p_DirectTCPAddr,
_swigc__p_DirectTCPConnection,
- _swigc__p_GCond,
- _swigc__p_GMutex,
_swigc__p_GSList,
_swigc__p_GValue,
_swigc__p_a_STRMAX__char,
{"Amanda::Devicec::Device_eject", _wrap_Device_eject},
{"Amanda::Devicec::Device_directtcp_supported", _wrap_Device_directtcp_supported},
{"Amanda::Devicec::Device_listen", _wrap_Device_listen},
-{"Amanda::Devicec::Device_accept", _wrap_Device_accept},
-{"Amanda::Devicec::Device_accept_with_cond", _wrap_Device_accept_with_cond},
-{"Amanda::Devicec::Device_connect", _wrap_Device_connect},
-{"Amanda::Devicec::Device_connect_with_cond", _wrap_Device_connect_with_cond},
{"Amanda::Devicec::Device_use_connection", _wrap_Device_use_connection},
-{"Amanda::Devicec::Device_write_from_connection", _wrap_Device_write_from_connection},
-{"Amanda::Devicec::Device_read_to_connection", _wrap_Device_read_to_connection},
{"Amanda::Devicec::Device_property_list", _wrap_Device_property_list},
{"Amanda::Devicec::Device_property_get", _wrap_Device_property_get},
{"Amanda::Devicec::Device_property_set", _wrap_Device_property_set},
*eject = *Amanda::Devicec::Device_eject;
*directtcp_supported = *Amanda::Devicec::Device_directtcp_supported;
*listen = *Amanda::Devicec::Device_listen;
-*accept = *Amanda::Devicec::Device_accept;
-*accept_with_cond = *Amanda::Devicec::Device_accept_with_cond;
-*connect = *Amanda::Devicec::Device_connect;
-*connect_with_cond = *Amanda::Devicec::Device_connect_with_cond;
*use_connection = *Amanda::Devicec::Device_use_connection;
-*write_from_connection = *Amanda::Devicec::Device_write_from_connection;
-*read_to_connection = *Amanda::Devicec::Device_read_to_connection;
*property_list = *Amanda::Devicec::Device_property_list;
*property_get = *Amanda::Devicec::Device_property_get;
*property_set = *Amanda::Devicec::Device_property_set;
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
*addrs = NULL;
}
- %newobject accept; /* connection is already ref'd, so we own it */
- DirectTCPConnection *
- accept() {
- DirectTCPConnection *conn = NULL;
- gboolean rv;
-
- rv = device_accept(self, &conn, NULL, NULL);
- if (!rv && conn) {
- /* conn is ref'd for our convenience, but we don't want it */
- g_object_unref(conn);
- conn = NULL;
- }
- return conn;
- }
-
- %newobject accept_with_cond; /* connection is already ref'd, so we own it */
- DirectTCPConnection *
- accept_with_cond(GMutex *abort_mutex, GCond *abort_cond) {
- DirectTCPConnection *conn = NULL;
- gboolean rv;
-
- rv = device_accept_with_cond(self, &conn, abort_mutex, abort_cond);
- if (!rv && conn) {
- /* conn is ref'd for our convenience, but we don't want it */
- g_object_unref(conn);
- conn = NULL;
- }
- return conn;
- }
-
- %newobject connect; /* connection is already ref'd, so we own it */
- DirectTCPConnection *
- connect(gboolean for_writing, DirectTCPAddr *addrs) {
- DirectTCPConnection *conn = NULL;
- gboolean rv;
-
- rv = device_connect(self, for_writing, addrs, &conn, NULL, NULL);
- if (!rv && conn) {
- /* conn is ref'd for our convenience, but we don't want it */
- g_object_unref(conn);
- conn = NULL;
- }
- return conn;
- }
-
- %newobject connect_with_cond; /* connection is already ref'd, so we own it */
- DirectTCPConnection *
- connect_with_cond(gboolean for_writing, DirectTCPAddr *addrs,
- GMutex *abort_mutex, GCond *abort_cond) {
- DirectTCPConnection *conn = NULL;
- gboolean rv;
-
- rv = device_connect_with_cond(self, for_writing, addrs, &conn,
- abort_mutex, abort_cond);
- if (!rv && conn) {
- /* conn is ref'd for our convenience, but we don't want it */
- g_object_unref(conn);
- conn = NULL;
- }
- return conn;
- }
-
gboolean
use_connection(DirectTCPConnection *conn) {
return device_use_connection(self, conn);
}
- %typemap(in,numinputs=0) guint64 *actual_size (guint64 sz) {
- sz = 0;
- $1 = &sz;
- }
- %typemap(argout) guint64 *actual_size {
- SP += argvi; PUTBACK;
- $result = sv_2mortal(amglue_newSVu64(*$1));
- SPAGAIN; SP -= argvi; argvi++;
- }
- gboolean
- write_from_connection(guint64 size, guint64 *actual_size) {
- return device_write_from_connection(self, size, actual_size);
- }
-
- gboolean
- read_to_connection(guint64 size, guint64 *actual_size) {
- return device_read_to_connection(self, size, actual_size);
- }
-
%typemap(out) const GSList * {
GSList *iter;
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
--- /dev/null
+# vim:ft=perl
+# Copyright (c) 2008-2012 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
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
+# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
+
+package Amanda::Extract;
+
+use strict;
+use warnings;
+use IPC::Open3;
+
+use Amanda::Debug qw( :logging );
+use Amanda::Paths;
+
+=head1 NAME
+
+Amanda::Extract - perl utilities to run scripts and applications
+
+=head1 SYNOPSIS
+
+ use Amanda::Extract;
+
+ my (@bsu, @err)= Amanda::Extract::BSU(application => $application,
+ config => $config,
+ host => $host,
+ disk => $disk,
+ device => $device);
+ my (@bsu, @err)= Amanda::Extract::Run($application_name, \@g_options,
+ $hdr, @properties);
+
+=cut
+
+sub BSU {
+ my (%params) = @_;
+
+ my %bsu;
+ my @err;
+ my @command;
+
+ push @command, $Amanda::Paths::APPLICATION_DIR . '/' . $params{'application'};
+ push @command, "support";
+ push @command, "--config", $params{'config'} if $params{'config'};
+ push @command, "--host" , $params{'host'} if $params{'host'};
+ push @command, "--disk" , $params{'disk'} if $params{'disk'};
+ push @command, "--device", $params{'device'} if $params{'device'};
+ debug("Running: " . join(' ', @command));
+
+ my $in;
+ my $out;
+ my $err = Symbol::gensym;
+ my $pid = open3($in, $out, $err, @command);
+
+ close($in);
+ while (my $line = <$out>) {
+ chomp $line;
+ debug("support: $line");
+ my ($name, $value) = split ' ', $line;
+
+ $name = lc($name);
+
+ if ($name eq 'config' ||
+ $name eq 'host' ||
+ $name eq 'disk' ||
+ $name eq 'index-line' ||
+ $name eq 'index-xml' ||
+ $name eq 'message-line' ||
+ $name eq 'message-xml' ||
+ $name eq 'record' ||
+ $name eq 'include-file' ||
+ $name eq 'include-list' ||
+ $name eq 'include-list-glob' ||
+ $name eq 'include-optional' ||
+ $name eq 'exclude-file' ||
+ $name eq 'exclude-list' ||
+ $name eq 'exclude-list-glob' ||
+ $name eq 'exclude-optional' ||
+ $name eq 'collection' ||
+ $name eq 'caclsize' ||
+ $name eq 'client-estimate' ||
+ $name eq 'multi-estimate' ||
+ $name eq 'amfeatures') {
+ $bsu{$name} = ($value eq "YES");
+ } elsif ($name eq 'max-level') {
+ $bsu{$name} = $value;
+ } elsif ($name eq 'recover-mode') {
+ $bsu{'smb-recover-mode'} = $value eq 'SMB';
+ } elsif ($name eq 'recover-path') {
+ $bsu{'recover-path-cwd'} = $value eq 'CWD';
+ $bsu{'recover-path-remote'} = $value eq 'REMOTE';
+ } elsif ($name eq 'data-path') {
+ if ($value eq 'AMANDA') {
+ $bsu{'data-path-amanda'} = 1;
+ } elsif ($value eq 'DIRECTTCP') {
+ $bsu{'data-path-directtcp'} = 1;
+ }
+ }
+ }
+ close($out);
+
+ while (my $line = <$err>) {
+ chomp($line);
+ next if $line == '';
+ push @err, $line;
+ }
+ close($err);
+
+ waitpid($pid, 0);
+ my $child_exit_status = $? >> 8;
+
+ if ($child_exit_status != 0) {
+ push @err, "exited with status $child_exit_status";
+ }
+ return (\%bsu, \@err);
+}
+
+1;
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2010-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=perl
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 Zmanda, Inc. All Rights Reserved.
#
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License version 2.1 as
-# published by the Free Software Foundation.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+#* License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
my $finished_cb = $params{'finished_cb'};
confess "Cannot quit a Clerk while a transfer is in progress"
- if $self->{'xfer_state'};
+ if $self->{'xfer_state'} and $self->{'xfer_state'}->{'xfer'};
my $steps = define_steps
cb_ref => \$finished_cb,
# Copyright (c) 2010-2012 Zmanda, Inc. All Rights Reserved.
#
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License version 2.1 as
-# published by the Free Software Foundation.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+#* License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
my %incr_stats = %{ $self->{incr_stats} };
my %total_stats = %{ $self->{total_stats} };
- if (@$tape_labels > 0) {
+ if (getconf($CNF_REPORT_USE_MEDIA) and @$tape_labels > 0) {
# slightly different sentence depending on the run type
my $tapelist_str;
}
}
- my $nb_new_tape = 0;
- my $run_tapes = getconf($CNF_RUNTAPES);
+ if (getconf($CNF_REPORT_NEXT_MEDIA)) {
+ my $nb_new_tape = 0;
+ my $run_tapes = getconf($CNF_RUNTAPES);
- if ($run_tapes) {
- ($run_tapes > 1)
+ if ($run_tapes) {
+ ($run_tapes > 1)
? print $fh "The next $run_tapes tapes Amanda expects to use are: "
: print $fh "The next tape Amanda expects to use is: ";
- }
+ }
+
+ my $first = 1;
+ foreach my $i ( 0 .. ( $run_tapes - 1 ) ) {
- my $first = 1;
- foreach my $i ( 0 .. ( $run_tapes - 1 ) ) {
+ if ( my $tape_label =
+ Amanda::Tapelist::get_last_reusable_tape_label($i) ) {
- if ( my $tape_label =
- Amanda::Tapelist::get_last_reusable_tape_label($i) ) {
+ if ($nb_new_tape) {
+ print $fh ", " if !$first;
+ print $fh "$nb_new_tape new tape"
+ . ( $nb_new_tape > 1 ? "s" : "" );
+ $nb_new_tape = 0;
+ $first = 0;
+ }
- if ($nb_new_tape) {
- print $fh ", " if !$first;
- print $fh "$nb_new_tape new tape"
- . ( $nb_new_tape > 1 ? "s" : "" );
- $nb_new_tape = 0;
+ print $fh
+ $first ? "" : ", ",
+ $tape_label;
$first = 0;
- }
+ } else {
+ $nb_new_tape++;
+ }
+ }
- print $fh
- $first ? "" : ", ",
- $tape_label;
- $first = 0;
- } else {
- $nb_new_tape++;
- }
- }
+ if ($nb_new_tape) {
+ print $fh ", " if !$first;
+ print $fh "$nb_new_tape new tape"
+ . ( $nb_new_tape > 1 ? "s" : "" );
+ }
+ print $fh ".\n";
- if ($nb_new_tape) {
- print $fh ", " if !$first;
- print $fh "$nb_new_tape new tape"
- . ( $nb_new_tape > 1 ? "s" : "" );
+ my $new_tapes = Amanda::Tapelist::list_new_tapes(getconf($CNF_RUNTAPES));
+ print $fh "$new_tapes\n" if $new_tapes;
}
- print $fh ".\n";
-
- my $new_tapes = Amanda::Tapelist::list_new_tapes(getconf($CNF_RUNTAPES));
- print $fh "$new_tapes\n" if $new_tapes;
return;
}
my $nodump_PARTIAL_format = get_summary_format($col_spec, 'nodump-PARTIAL', @summary_linedata);
my $nodump_FAILED_format = get_summary_format($col_spec, 'nodump-FAILED', @summary_linedata);
my $nodump_FLUSH_format = get_summary_format($col_spec, 'nodump-FLUSH', @summary_linedata);
+ my $nodump_NOT_FLUSHED_format = get_summary_format($col_spec, 'nodump-NOT FLUSHED', @summary_linedata);
my $skipped_format = get_summary_format($col_spec, 'skipped', @summary_linedata);
## print the header names
print $fh sprintf($nodump_FAILED_format, @data);
} elsif ($type eq 'nodump-FLUSH') {
print $fh sprintf($nodump_FLUSH_format, @data);
+ } elsif ($type eq 'nodump-NOT FLUSHED') {
+debug("nodump_NOT_FLUSHED_format; $nodump_NOT_FLUSHED_format");
+debug("data: " . Data::Dumper::Dumper(\@data));
+ print $fh sprintf($nodump_NOT_FLUSHED_format, @data);
} elsif ($type eq 'missing') {
print $fh sprintf($missing_format, @data[0..2]);
} elsif ($type eq 'noflush') {
## ('missing', host, disk, '' ..) # MISSING -----
## ('noflush', host, disk, '' ..) # NO FILE TO FLUSH ------
## ('nodump-$msg', host, disk, level, '', out, '--', '',
-## '', tapetime, taperate, taperpartial) # ... {FLUSH|FAILED|PARTIAL} ...
+## '', tapetime, taperate, taperpartial) # ... {FLUSH|NOT FLUSHED|FAILED|PARTIAL} ...
## ('skipped', host, disk, '' ..) # SKIPPED -----
##
## the taperpartial column is not covered by the columnspec, and "hangs off"
push @rvs, [@rv];
} elsif (keys %{$alldumps} == 0) {
my @rv;
- push @rv, $report->get_flag("amflush_run")? 'noflush' : 'missing';
+ push @rv, $report->get_flag("amflush_run")? 'nodump-NOT FLUSHED' : 'missing';
push @rv, $hostname;
push @rv, $disk_out;
- push @rv, ("",) x 8;
+ push @rv, ("",) x 9;
push @rvs, [@rv];
}
if defined $dumper;
my ( $out_size, $dump_time, $dump_rate, $tape_time, $tape_rate ) = (0) x 5;
+ my $tape_failure_from = '';
my ($dumper_status) = "";
my $saw_dumper = 0; # no dumper will mean this was a flush
my $taper_partial = 0; # was the last taper run partial?
$out_size = $try->{taper}{kb};
$tape_time = $try->{taper}{sec};
$tape_rate = $try->{taper}{kps};
+ $tape_failure_from = $try->{taper}{failure_from};
} elsif ( exists $try->{taper}
&& ( $try->{taper}{status} eq "partial" ) ) {
$out_size = $try->{taper}{kb};
$tape_time = $try->{taper}{sec} if !$tape_time;
$tape_rate = $try->{taper}{kps} if !$tape_rate;
+ $tape_failure_from = $try->{taper}{failure_from};
} elsif (exists $try->{taper} && ( $try->{taper}{status} eq "fail")) {
$tape_time = undef;
$tape_rate = undef;
+ $tape_failure_from = $try->{taper}{failure_from};
}
if (!$out_size &&
my @rv;
- if ( !$orig_size && !$out_size && (!defined($tape_time) || !$tape_time)) {
+ if ( !$orig_size && !$out_size && ((!defined($tape_time) || !$tape_time) && !defined($tape_failure_from))) {
push @rv, $report->get_flag("amflush_run")? 'noflush' : 'missing';
push @rv, $hostname;
push @rv, $disk_out;
push @rv, $compression;
push @rv, $dump_time ? $fmt_col_field->(6, mnsc($dump_time)) : "PARTIAL";
push @rv, $dump_rate ? $fmt_col_field->(7, $dump_rate) : "";
- push @rv, $fmt_col_field->(8,
+ if (defined $tape_failure_from and $tape_failure_from eq 'config') {
+ push @rv, $format_space->(8,"");
+ push @rv, $format_space->(9,"");
+ } else {
+ push @rv, $fmt_col_field->(8,
(defined $tape_time) ?
$tape_time ? mnsc($tape_time) : ""
: "FAILED");
- push @rv, (defined $tape_rate) ?
- $tape_rate ?
- $fmt_col_field->(9, $tape_rate)
- : $format_space->(9, "")
- : $format_space->(9, "FAILED");
+ push @rv, (defined $tape_rate) ?
+ $tape_rate ?
+ $fmt_col_field->(9, $tape_rate)
+ : $format_space->(9, "")
+ : $format_space->(9, "FAILED");
+ }
push @rv, $taper_partial? " PARTIAL" : ""; # column 10
} else {
my $message = $saw_dumper?
($dumper_status eq 'failed') ? 'FAILED' : 'PARTIAL'
- : 'FLUSH';
+ : (defined $tape_failure_from and
+ $tape_failure_from eq 'config') ? 'NOT FLUSHED'
+ : 'FLUSH';
push @rv, "nodump-$message";
push @rv, $hostname;
push @rv, $disk_out;
push @rv, $compression;
push @rv, '';
push @rv, '';
- push @rv, $fmt_col_field->(8,
- (defined $tape_time) ?
- $tape_time ? mnsc($tape_time) : ""
- : "FAILED");
- push @rv, (defined $tape_rate) ?
- $tape_rate ?
- $fmt_col_field->(9, $tape_rate)
- : $format_space->(9, "")
- : $format_space->(9, "FAILED");
+ if (defined $tape_failure_from and $tape_failure_from eq 'config') {
+ push @rv, $format_space->(8,"");
+ push @rv, $format_space->(9,"");
+ next if !$report->get_flag("amflush_run"); # do not print a line for flush with config error
+ } else {
+ push @rv, $fmt_col_field->(8,
+ (defined $tape_time) ?
+ $tape_time ? mnsc($tape_time) : ""
+ : "FAILED");
+ push @rv, (defined $tape_rate) ?
+ $tape_rate ?
+ $fmt_col_field->(9, $tape_rate)
+ : $format_space->(9, "")
+ : $format_space->(9, "FAILED");
+ }
push @rv, $taper_partial? " PARTIAL" : "";
}
push @rvs, [@rv];
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
if (!$autolabel->{'other_config'}) {
$self->_user_msg(slot_result => 1,
label => $label,
+ labelstr => $self->{'labelstr'},
does_not_match_labelstr => 1,
slot => $slot);
return 0;
# vim:ft=perl
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=perl
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
open(my $fh, "<", $self->{'filename'}) or return $self;
while (my $line = <$fh>) {
my ($datestamp, $label, $reuse, $barcode, $meta, $blocksize, $comment)
- = $line =~ m/^([0-9]*)\s([^\s]*)\s(reuse|no-reuse)\s*(?:BARCODE:([^\s]*))?\s*(?:META:([^\s]*))?\s*(?:BLOCKSIZE:([^\s]*))?\s*(?:\#(.*))?$/mx;
- next if !defined $datestamp; # silently filter out bogus lines
+ = $line =~ m/^([0-9]+)\s*([^\s]*)\s*(?:(reuse|no-reuse))?\s*(?:BARCODE:([^\s]*))?\s*(?:META:([^\s]*))?\s*(?:BLOCKSIZE:([^\s]*))?\s*(?:\#(.*))?$/mx;
+ if (!defined $datestamp) {
+ Amanda::Debug::critical("Bogus line in the tapelist ($self->{'filename'}) file: $line");
+ }
push @tles, {
'datestamp' => $datestamp,
'label' => $label,
- 'reuse' => ($reuse eq 'reuse'),
+ 'reuse' => (!defined $reuse || $reuse eq 'reuse'),
'barcode' => $barcode,
'meta' => $meta,
'blocksize' => $blocksize,
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
open(my $fh, "<", $self->{'filename'}) or return $self;
while (my $line = <$fh>) {
my ($datestamp, $label, $reuse, $barcode, $meta, $blocksize, $comment)
- = $line =~ m/^([0-9]*)\s([^\s]*)\s(reuse|no-reuse)\s*(?:BARCODE:([^\s]*))?\s*(?:META:([^\s]*))?\s*(?:BLOCKSIZE:([^\s]*))?\s*(?:\#(.*))?$/mx;
- next if !defined $datestamp; # silently filter out bogus lines
+ = $line =~ m/^([0-9]+)\s*([^\s]*)\s*(?:(reuse|no-reuse))?\s*(?:BARCODE:([^\s]*))?\s*(?:META:([^\s]*))?\s*(?:BLOCKSIZE:([^\s]*))?\s*(?:\#(.*))?$/mx;
+ if (!defined $datestamp) {
+ Amanda::Debug::critical("Bogus line in the tapelist ($self->{'filename'}) file: $line");
+ }
push @tles, {
'datestamp' => $datestamp,
'label' => $label,
- 'reuse' => ($reuse eq 'reuse'),
+ 'reuse' => (!defined $reuse || $reuse eq 'reuse'),
'barcode' => $barcode,
'meta' => $meta,
'blocksize' => $blocksize,
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
tx_fh => *STDOUT,
message_cb => $message_cb,
message_obj => $self,
- debug => $Amanda::Config::debug_taper?'driver/taper':'',
+ debug => $Amanda::Config::debug_taper?'taper/driver':'',
);
my $changer = Amanda::Changer->new(undef, tapelist => $self->{'tapelist'});
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# Copyright (c) 2010-2012 Zmanda, Inc. All Rights Reserved.
#
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License version 2.1 as
-# published by the Free Software Foundation.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+#* License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
for my $tle (@{$self->{'tapelist'}->{'tles'}}) {
next unless $tle->{'reuse'};
next if $tle->{'datestamp'} eq '0' and !$params{'new_label_ok'};
+ next if $tle->{'label'} !~ $self->{'labelstr'};
$num_acceptable++;
$best = $tle;
}
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
push @reusable, $sl;
} else {
my $vol_tle = $self->{'tapelist'}->lookup_tapelabel($sl->{'label'});
- if ($vol_tle) {
+ if ($vol_tle && $sl->{'label'} =~ /$self->{'labelstr'}/) {
if ($vol_tle->{'datestamp'} eq '0') {
push @new_labeled, $sl;
}
} elsif ($self->volume_is_labelable($sl)) {
+ $sl->{'label'} = $self->{'chg'}->make_new_tape_label(
+ barcode => $sl->{'barcode'},
+ slot => $sl->{'slot'},
+ meta => $sl->{'meta'});
$first_new_volume = $sl if !$first_new_volume;
$new_volume = $sl if $current && !$new_volume;
push @new_volume, $sl;
}
}
} elsif ($self->volume_is_labelable($sl)) {
+ $sl->{'label'} = $self->{'chg'}->make_new_tape_label(
+ barcode => $sl->{'barcode'},
+ slot => $sl->{'slot'},
+ meta => $sl->{'meta'});
$first_new_volume = $sl if !$first_new_volume;
$new_volume = $sl if $current && !$new_volume;
push @new_volume, $sl;
}
for my $sl (@new_volume) {
- $sl->{'label'} = $self->{'chg'}->make_new_tape_label(
- barcode => $sl->{'barcode'},
- slot => $sl->{'slot'},
- meta => $sl->{'meta'});
$new_volume = $sl if defined $last_label and
$new_volume->{'label'} ne $sl->{'label'} and
(($sl->{'label'} gt $last_label and
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
push @reusable, $sl;
} else {
my $vol_tle = $self->{'tapelist'}->lookup_tapelabel($sl->{'label'});
- if ($vol_tle) {
+ if ($vol_tle && $sl->{'label'} =~ /$self->{'labelstr'}/) {
if ($vol_tle->{'datestamp'} eq '0') {
push @new_labeled, $sl;
}
} elsif ($self->volume_is_labelable($sl)) {
+ $sl->{'label'} = $self->{'chg'}->make_new_tape_label(
+ barcode => $sl->{'barcode'},
+ slot => $sl->{'slot'},
+ meta => $sl->{'meta'});
$first_new_volume = $sl if !$first_new_volume;
$new_volume = $sl if $current && !$new_volume;
push @new_volume, $sl;
}
}
} elsif ($self->volume_is_labelable($sl)) {
+ $sl->{'label'} = $self->{'chg'}->make_new_tape_label(
+ barcode => $sl->{'barcode'},
+ slot => $sl->{'slot'},
+ meta => $sl->{'meta'});
$first_new_volume = $sl if !$first_new_volume;
$new_volume = $sl if $current && !$new_volume;
push @new_volume, $sl;
}
for my $sl (@new_volume) {
- $sl->{'label'} = $self->{'chg'}->make_new_tape_label(
- barcode => $sl->{'barcode'},
- slot => $sl->{'slot'},
- meta => $sl->{'meta'});
$new_volume = $sl if defined $last_label and
$new_volume->{'label'} ne $sl->{'label'} and
(($sl->{'label'} gt $last_label and
# Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved.
#
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License version 2.1 as
-# published by the Free Software Foundation.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+#* License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
my $loaded_current = $load_current;
$load_current = 0; # don't load current a second time
- $self->_user_msg(search_result => 1, res => $res, err => $err);
# bail out immediately if the scan is complete
if ($err and $err->failed and $err->notfound) {
+ $self->_user_msg(search_result => 1, res => $res, err => $err);
# no error, no reservation -> end of the scan
return $self->scan_result(result_cb => $result_cb);
}
# Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved.
#
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License version 2.1 as
-# published by the Free Software Foundation.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+#* License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
$self->dbg("not notifying for empty, successful part");
} else {
# double-check partnum
- confess "Part numbers do not match!"
+ confess "Part numbers do not match! $self->{'dump_header'}->{'partnum'} $msg->{'partnum'}"
unless ($self->{'dump_header'}->{'partnum'} == $msg->{'partnum'});
# notify
}
}
+sub abort_setup {
+ my $self = shift;
+ my %params = @_;
+
+ $self->{'dump_cb'} = $params{'dump_cb'};
+ $self->_dump_done();
+}
+
sub _dump_done {
my $self = shift;
# determine the correct final status - DONE if we're done, PARTIAL
# if we've started writing to the volume, otherwise FAILED
- if (@{$self->{'device_errors'}} or $self->{'config_denial_message'} or
- !$self->{'last_part_successful'}) {
- $result = $self->{'started_writing'}? 'PARTIAL' : 'FAILED';
+ if (!$self->{'started_writing'}) {
+ $result = 'FAILED';
+ } elsif (@{$self->{'device_errors'}} or $self->{'config_denial_message'} or
+ !$self->{'last_part_successful'}) {
+ $result = 'PARTIAL';
} else {
$result = 'DONE';
}
my $dump_cb = $self->{'dump_cb'};
+
+ return if !defined $dump_cb;
+
my %dump_cb_args = (
result => $result,
device_errors => $self->{'device_errors'},
if (defined $self->{'dump_cb'}) {
# _dump_done constructs the dump_cb from $self parameters
$self->_dump_done();
- } else {
- confess "error with no callback to handle it: $error_message";
}
}
}
step device_started => sub {
my $result = shift;
- if ($result == 0) {
+ if ($result =~ /\D/) {
+ $self->{'feedback'}->scribe_notif_new_tape(
+ error => $result,
+ volume_label => undef);
+ $self->_get_new_volume();
+ return $cbX->();
+ } elsif ($result == 0) {
# try reading the label to see whether we erased the tape
my $erased = 0;
CHECK_READ_LABEL: {
$self->_get_new_volume();
return $cbX->();
- } elsif ($result != 1) {
- $self->{'feedback'}->scribe_notif_new_tape(
- error => $result,
- volume_label => undef);
- $self->_get_new_volume();
- return $cbX->();
}
$new_label = $device->volume_label;
unless defined $params{'part_cache_type'};
}
- # if any of the dle_* parameters are set, use those to set the part_*
- # parameters, which are emptied out first.
- if (defined $params{'dle_tape_splitsize'} or
- defined $params{'dle_split_diskbuffer'} or
- defined $params{'dle_fallback_splitsize'}) {
+ if (defined $splitting_args{'data_path'} and
+ $splitting_args{'data_path'} eq "DIRECTTCP") {
+ my $ps = $params{'dle_tape_splitsize'};
+ if (defined $ps and $ps > 0) {
+ $params{'part_cache_max_size'} = undef
+ } else {
+ $ps = $params{'part_size'};
+ my $pcms = $params{'part_cache_max_size'};
+ $ps = $pcms if (!defined $ps or (defined $pcms and $pcms < $ps));
+ }
+ $splitting_args{'allow_split'} = 1 if ((defined $ps and $ps > 0) or
+ $params{'leom_supported'});
+ $params{'part_size'} = $ps;
+ $params{'part_cache_type'} = 'none';
+ $params{'part_cache_dir'} = undef;
+ } elsif (defined $params{'dle_tape_splitsize'} or
+ defined $params{'dle_split_diskbuffer'} or
+ defined $params{'dle_fallback_splitsize'}) {
+ # if any of the dle_* parameters are set, use those to set the part_*
+ # parameters, which are emptied out first.
$params{'part_size'} = $params{'dle_tape_splitsize'} || 0;
$params{'part_cache_type'} = 'none';
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
my $self = shift;
my ($msgtype, %params) = @_;
- if (!defined $self->{'dumper_status'}) {
- $self->{'dumper_status'} = "DONE";
- $self->{'orig_kb'} = $params{'orig_kb'};
- if (defined $self->{'result'}) {
- $self->result_cb(undef);
- }
- } else {
- # ignore the message
+ if ($params{'handle'} ne $self->{'handle'}) {
+ # ignore message for previous handle
+ return;
+ }
+
+ if (defined $self->{'dumper_status'}) {
+ # ignore duplicate message
+ return
+ }
+
+ $self->{'dumper_status'} = "DONE";
+ $self->{'orig_kb'} = $params{'orig_kb'};
+ if (defined $self->{'result'}) {
+ $self->result_cb(undef);
}
}
my $self = shift;
my ($msgtype, %params) = @_;
+ if ($params{'handle'} ne $self->{'handle'}) {
+ # ignore message for previous handle
+ return;
+ }
+
+ if (defined $self->{'dumper_status'}) {
+ # ignore duplicate message
+ return
+ }
+
$self->{'dumper_status'} = "FAILED";
if (defined $self->{'header_xfer'}) {
$self->{'header_xfer'}->cancel();
my $logtype;
if ($params{'result'} eq 'DONE') {
- if (!$self->{'doing_port_write'} or $self->{'dumper_status'} eq "DONE") {
+ if ($self->{'dumper_status'} eq "DONE") {
$msgtype = Amanda::Taper::Protocol::DONE;
$logtype = $L_DONE;
} else {
$msg_params{'taper'} = 'TAPE-ERROR';
$msg_params{'tapererr'} = join("; ", @{$params{'device_errors'}});
} elsif ($params{'config_denial_message'}) {
- $msg_params{'taper'} = 'TAPE-ERROR';
+ $msg_params{'taper'} = 'TAPE-CONFIG';
$msg_params{'tapererr'} = $params{'config_denial_message'};
} else {
$msg_params{'taper'} = 'TAPE-GOOD';
step process_args => sub {
# extract the splitting-related parameters, stripping out empty strings
my %splitting_args = map {
- ($params{$_} ne '')? ($_, $params{$_}) : ()
+ (defined $params{$_} && $params{$_} ne '')? ($_, $params{$_}) : ()
} qw(
dle_tape_splitsize dle_split_diskbuffer dle_fallback_splitsize dle_allow_split
- part_size part_cache_type part_cache_dir part_cache_max_size
+ part_size part_cache_type part_cache_dir part_cache_max_size data_path
);
# convert numeric values to BigInts
# getting the header is easy for FILE-WRITE..
my $hdr = $self->{'header'} = Amanda::Holding::get_header($params{'filename'});
+ if (!defined $hdr || $hdr->{'type'} != $Amanda::Header::F_DUMPFILE) {
+ confess("Could not read header from '$params{filename}'");
+ }
+
# stip out header fields we don't need
$hdr->{'cont_filename'} = '';
- if (!defined $hdr || $hdr->{'type'} != $Amanda::Header::F_DUMPFILE) {
- confess("Could not read header from '$params{filename}'");
+ if ($self->{'header'}->{'is_partial'}) {
+ $self->{'dumper_status'} = "FAILED";
+ } else {
+ $self->{'dumper_status'} = "DONE";
}
+
$steps->{'start_dump'}->(undef);
} else {
# ..but quite a bit harder for PORT-WRITE; this method will send the
$self->_assert_in_state("getting_header") or return;
$self->{'state'} = 'writing';
+ # abort if we already got a device_errors
+ if (@{$self->{'scribe'}->{'device_errors'}}) {
+ $self->{'scribe'}->abort_setup(dump_cb => $params{'dump_cb'});
+ return;
+ }
# if $err is set, cancel the dump, treating it as a input error
if ($err) {
push @{$self->{'input_errors'}}, $err;
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
Amanda_DATA += Amanda/Script_App.pm
EXTRA_DIST += Amanda/Script_App.pm
+# PACKAGE: Amanda::Extract
+Amanda_DATA += Amanda/Extract.pm
+EXTRA_DIST += Amanda/Extract.pm
if WANT_SERVER
# PACKAGE: Amanda::Holding
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(libApplicationdir)" \
"$(DESTDIR)$(libArchivedir)" "$(DESTDIR)$(libCmdlinedir)" \
"$(DESTDIR)$(libConfigdir)" "$(DESTDIR)$(libDebugdir)" \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DATA = $(Amanda_DATA) $(AmandaApplication_DATA) $(AmandaChanger_DATA) \
$(AmandaConfig_DATA) $(AmandaCurinfo_DATA) $(AmandaIPC_DATA) \
$(AmandaInteractivity_DATA) $(AmandaRecovery_DATA) \
Amanda/MainLoop.swg Amanda/MainLoop.pm Amanda/MainLoop.pod \
$(AmandaIPC_DATA) Amanda/IPC/Binary.swg Amanda/IPC/Binary.pm \
Amanda/IPC/Binary.pod Amanda/Paths.pm.in \
- Amanda/Constants.pm.in Amanda/Script_App.pm Amanda/Holding.pm \
- Amanda/Application.swg Amanda/Application.pm \
+ Amanda/Constants.pm.in Amanda/Script_App.pm Amanda/Extract.pm \
+ Amanda/Holding.pm Amanda/Application.swg Amanda/Application.pm \
Amanda/Application.pod Amanda/Script.pm \
Amanda/Application/Zfs.pm
BUILT_SOURCES =
# PACKAGE: Amanda::Script_App
+# PACKAGE: Amanda::Extract
+
# PACKAGE: Amanda::Script
Amanda_DATA = Amanda/Archive.pm Amanda/Process.pm $(am__append_4) \
Amanda/Feature.pm $(am__append_6) Amanda/ClientService.pm \
$(am__append_13) Amanda/BigIntCompat.pm Amanda/Debug.pm \
Amanda/Config.pm Amanda/Util.pm Amanda/Header.pm \
Amanda/Tests.pm Amanda/MainLoop.pm Amanda/Paths.pm \
- Amanda/Constants.pm Amanda/Script_App.pm $(am__append_16) \
- $(am__append_17) Amanda/Script.pm
+ Amanda/Constants.pm Amanda/Script_App.pm Amanda/Extract.pm \
+ $(am__append_16) $(am__append_17) Amanda/Script.pm
# PACKAGE: Amanda::Archive
libArchivedir = $(amperldir)/auto/Amanda/Archive
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-libApplicationLTLIBRARIES: $(libApplication_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libApplicationdir)" || $(MKDIR_P) "$(DESTDIR)$(libApplicationdir)"
@list='$(libApplication_LTLIBRARIES)'; test -n "$(libApplicationdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libApplicationdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libApplicationdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libApplicationdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libApplicationdir)"; \
}
done
install-libArchiveLTLIBRARIES: $(libArchive_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libArchivedir)" || $(MKDIR_P) "$(DESTDIR)$(libArchivedir)"
@list='$(libArchive_LTLIBRARIES)'; test -n "$(libArchivedir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libArchivedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libArchivedir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libArchivedir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libArchivedir)"; \
}
done
install-libCmdlineLTLIBRARIES: $(libCmdline_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libCmdlinedir)" || $(MKDIR_P) "$(DESTDIR)$(libCmdlinedir)"
@list='$(libCmdline_LTLIBRARIES)'; test -n "$(libCmdlinedir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libCmdlinedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libCmdlinedir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libCmdlinedir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libCmdlinedir)"; \
}
done
install-libConfigLTLIBRARIES: $(libConfig_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libConfigdir)" || $(MKDIR_P) "$(DESTDIR)$(libConfigdir)"
@list='$(libConfig_LTLIBRARIES)'; test -n "$(libConfigdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libConfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libConfigdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libConfigdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libConfigdir)"; \
}
done
install-libDebugLTLIBRARIES: $(libDebug_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libDebugdir)" || $(MKDIR_P) "$(DESTDIR)$(libDebugdir)"
@list='$(libDebug_LTLIBRARIES)'; test -n "$(libDebugdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libDebugdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libDebugdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libDebugdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libDebugdir)"; \
}
done
install-libDeviceLTLIBRARIES: $(libDevice_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libDevicedir)" || $(MKDIR_P) "$(DESTDIR)$(libDevicedir)"
@list='$(libDevice_LTLIBRARIES)'; test -n "$(libDevicedir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libDevicedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libDevicedir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libDevicedir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libDevicedir)"; \
}
done
install-libDisklistLTLIBRARIES: $(libDisklist_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libDisklistdir)" || $(MKDIR_P) "$(DESTDIR)$(libDisklistdir)"
@list='$(libDisklist_LTLIBRARIES)'; test -n "$(libDisklistdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libDisklistdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libDisklistdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libDisklistdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libDisklistdir)"; \
}
done
install-libFeatureLTLIBRARIES: $(libFeature_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libFeaturedir)" || $(MKDIR_P) "$(DESTDIR)$(libFeaturedir)"
@list='$(libFeature_LTLIBRARIES)'; test -n "$(libFeaturedir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libFeaturedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libFeaturedir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libFeaturedir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libFeaturedir)"; \
}
done
install-libHeaderLTLIBRARIES: $(libHeader_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libHeaderdir)" || $(MKDIR_P) "$(DESTDIR)$(libHeaderdir)"
@list='$(libHeader_LTLIBRARIES)'; test -n "$(libHeaderdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libHeaderdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libHeaderdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libHeaderdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libHeaderdir)"; \
}
done
install-libIPCBinaryLTLIBRARIES: $(libIPCBinary_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libIPCBinarydir)" || $(MKDIR_P) "$(DESTDIR)$(libIPCBinarydir)"
@list='$(libIPCBinary_LTLIBRARIES)'; test -n "$(libIPCBinarydir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libIPCBinarydir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libIPCBinarydir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libIPCBinarydir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libIPCBinarydir)"; \
}
done
install-libLogfileLTLIBRARIES: $(libLogfile_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libLogfiledir)" || $(MKDIR_P) "$(DESTDIR)$(libLogfiledir)"
@list='$(libLogfile_LTLIBRARIES)'; test -n "$(libLogfiledir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libLogfiledir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libLogfiledir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libLogfiledir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libLogfiledir)"; \
}
done
install-libMainLoopLTLIBRARIES: $(libMainLoop_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libMainLoopdir)" || $(MKDIR_P) "$(DESTDIR)$(libMainLoopdir)"
@list='$(libMainLoop_LTLIBRARIES)'; test -n "$(libMainLoopdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libMainLoopdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libMainLoopdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libMainLoopdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libMainLoopdir)"; \
}
done
install-libNDMPLTLIBRARIES: $(libNDMP_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libNDMPdir)" || $(MKDIR_P) "$(DESTDIR)$(libNDMPdir)"
@list='$(libNDMP_LTLIBRARIES)'; test -n "$(libNDMPdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libNDMPdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libNDMPdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libNDMPdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libNDMPdir)"; \
}
done
install-libTapelistLTLIBRARIES: $(libTapelist_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libTapelistdir)" || $(MKDIR_P) "$(DESTDIR)$(libTapelistdir)"
@list='$(libTapelist_LTLIBRARIES)'; test -n "$(libTapelistdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libTapelistdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libTapelistdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libTapelistdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libTapelistdir)"; \
}
done
install-libTestsLTLIBRARIES: $(libTests_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libTestsdir)" || $(MKDIR_P) "$(DESTDIR)$(libTestsdir)"
@list='$(libTests_LTLIBRARIES)'; test -n "$(libTestsdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libTestsdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libTestsdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libTestsdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libTestsdir)"; \
}
done
install-libUtilLTLIBRARIES: $(libUtil_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libUtildir)" || $(MKDIR_P) "$(DESTDIR)$(libUtildir)"
@list='$(libUtil_LTLIBRARIES)'; test -n "$(libUtildir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libUtildir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libUtildir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libUtildir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libUtildir)"; \
}
done
install-libXferLTLIBRARIES: $(libXfer_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libXferdir)" || $(MKDIR_P) "$(DESTDIR)$(libXferdir)"
@list='$(libXfer_LTLIBRARIES)'; test -n "$(libXferdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libXferdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libXferdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libXferdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libXferdir)"; \
}
done
install-libXferServerLTLIBRARIES: $(libXferServer_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libXferServerdir)" || $(MKDIR_P) "$(DESTDIR)$(libXferServerdir)"
@list='$(libXferServer_LTLIBRARIES)'; test -n "$(libXferServerdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libXferServerdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libXferServerdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libXferServerdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libXferServerdir)"; \
}
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libApplication.la: $(libApplication_la_OBJECTS) $(libApplication_la_DEPENDENCIES)
+libApplication.la: $(libApplication_la_OBJECTS) $(libApplication_la_DEPENDENCIES) $(EXTRA_libApplication_la_DEPENDENCIES)
$(libApplication_la_LINK) $(am_libApplication_la_rpath) $(libApplication_la_OBJECTS) $(libApplication_la_LIBADD) $(LIBS)
-libArchive.la: $(libArchive_la_OBJECTS) $(libArchive_la_DEPENDENCIES)
+libArchive.la: $(libArchive_la_OBJECTS) $(libArchive_la_DEPENDENCIES) $(EXTRA_libArchive_la_DEPENDENCIES)
$(libArchive_la_LINK) -rpath $(libArchivedir) $(libArchive_la_OBJECTS) $(libArchive_la_LIBADD) $(LIBS)
-libBinary.la: $(libBinary_la_OBJECTS) $(libBinary_la_DEPENDENCIES)
+libBinary.la: $(libBinary_la_OBJECTS) $(libBinary_la_DEPENDENCIES) $(EXTRA_libBinary_la_DEPENDENCIES)
$(libBinary_la_LINK) -rpath $(libIPCBinarydir) $(libBinary_la_OBJECTS) $(libBinary_la_LIBADD) $(LIBS)
-libCmdline.la: $(libCmdline_la_OBJECTS) $(libCmdline_la_DEPENDENCIES)
+libCmdline.la: $(libCmdline_la_OBJECTS) $(libCmdline_la_DEPENDENCIES) $(EXTRA_libCmdline_la_DEPENDENCIES)
$(libCmdline_la_LINK) $(am_libCmdline_la_rpath) $(libCmdline_la_OBJECTS) $(libCmdline_la_LIBADD) $(LIBS)
-libConfig.la: $(libConfig_la_OBJECTS) $(libConfig_la_DEPENDENCIES)
+libConfig.la: $(libConfig_la_OBJECTS) $(libConfig_la_DEPENDENCIES) $(EXTRA_libConfig_la_DEPENDENCIES)
$(libConfig_la_LINK) -rpath $(libConfigdir) $(libConfig_la_OBJECTS) $(libConfig_la_LIBADD) $(LIBS)
-libDebug.la: $(libDebug_la_OBJECTS) $(libDebug_la_DEPENDENCIES)
+libDebug.la: $(libDebug_la_OBJECTS) $(libDebug_la_DEPENDENCIES) $(EXTRA_libDebug_la_DEPENDENCIES)
$(libDebug_la_LINK) -rpath $(libDebugdir) $(libDebug_la_OBJECTS) $(libDebug_la_LIBADD) $(LIBS)
-libDevice.la: $(libDevice_la_OBJECTS) $(libDevice_la_DEPENDENCIES)
+libDevice.la: $(libDevice_la_OBJECTS) $(libDevice_la_DEPENDENCIES) $(EXTRA_libDevice_la_DEPENDENCIES)
$(libDevice_la_LINK) $(am_libDevice_la_rpath) $(libDevice_la_OBJECTS) $(libDevice_la_LIBADD) $(LIBS)
-libDisklist.la: $(libDisklist_la_OBJECTS) $(libDisklist_la_DEPENDENCIES)
+libDisklist.la: $(libDisklist_la_OBJECTS) $(libDisklist_la_DEPENDENCIES) $(EXTRA_libDisklist_la_DEPENDENCIES)
$(libDisklist_la_LINK) $(am_libDisklist_la_rpath) $(libDisklist_la_OBJECTS) $(libDisklist_la_LIBADD) $(LIBS)
-libFeature.la: $(libFeature_la_OBJECTS) $(libFeature_la_DEPENDENCIES)
+libFeature.la: $(libFeature_la_OBJECTS) $(libFeature_la_DEPENDENCIES) $(EXTRA_libFeature_la_DEPENDENCIES)
$(libFeature_la_LINK) -rpath $(libFeaturedir) $(libFeature_la_OBJECTS) $(libFeature_la_LIBADD) $(LIBS)
-libHeader.la: $(libHeader_la_OBJECTS) $(libHeader_la_DEPENDENCIES)
+libHeader.la: $(libHeader_la_OBJECTS) $(libHeader_la_DEPENDENCIES) $(EXTRA_libHeader_la_DEPENDENCIES)
$(libHeader_la_LINK) -rpath $(libHeaderdir) $(libHeader_la_OBJECTS) $(libHeader_la_LIBADD) $(LIBS)
-libLogfile.la: $(libLogfile_la_OBJECTS) $(libLogfile_la_DEPENDENCIES)
+libLogfile.la: $(libLogfile_la_OBJECTS) $(libLogfile_la_DEPENDENCIES) $(EXTRA_libLogfile_la_DEPENDENCIES)
$(libLogfile_la_LINK) $(am_libLogfile_la_rpath) $(libLogfile_la_OBJECTS) $(libLogfile_la_LIBADD) $(LIBS)
-libMainLoop.la: $(libMainLoop_la_OBJECTS) $(libMainLoop_la_DEPENDENCIES)
+libMainLoop.la: $(libMainLoop_la_OBJECTS) $(libMainLoop_la_DEPENDENCIES) $(EXTRA_libMainLoop_la_DEPENDENCIES)
$(libMainLoop_la_LINK) -rpath $(libMainLoopdir) $(libMainLoop_la_OBJECTS) $(libMainLoop_la_LIBADD) $(LIBS)
-libNDMP.la: $(libNDMP_la_OBJECTS) $(libNDMP_la_DEPENDENCIES)
+libNDMP.la: $(libNDMP_la_OBJECTS) $(libNDMP_la_DEPENDENCIES) $(EXTRA_libNDMP_la_DEPENDENCIES)
$(libNDMP_la_LINK) $(am_libNDMP_la_rpath) $(libNDMP_la_OBJECTS) $(libNDMP_la_LIBADD) $(LIBS)
-libTapelist.la: $(libTapelist_la_OBJECTS) $(libTapelist_la_DEPENDENCIES)
+libTapelist.la: $(libTapelist_la_OBJECTS) $(libTapelist_la_DEPENDENCIES) $(EXTRA_libTapelist_la_DEPENDENCIES)
$(libTapelist_la_LINK) $(am_libTapelist_la_rpath) $(libTapelist_la_OBJECTS) $(libTapelist_la_LIBADD) $(LIBS)
-libTests.la: $(libTests_la_OBJECTS) $(libTests_la_DEPENDENCIES)
+libTests.la: $(libTests_la_OBJECTS) $(libTests_la_DEPENDENCIES) $(EXTRA_libTests_la_DEPENDENCIES)
$(libTests_la_LINK) -rpath $(libTestsdir) $(libTests_la_OBJECTS) $(libTests_la_LIBADD) $(LIBS)
-libUtil.la: $(libUtil_la_OBJECTS) $(libUtil_la_DEPENDENCIES)
+libUtil.la: $(libUtil_la_OBJECTS) $(libUtil_la_DEPENDENCIES) $(EXTRA_libUtil_la_DEPENDENCIES)
$(libUtil_la_LINK) -rpath $(libUtildir) $(libUtil_la_OBJECTS) $(libUtil_la_LIBADD) $(LIBS)
-libXfer.la: $(libXfer_la_OBJECTS) $(libXfer_la_DEPENDENCIES)
+libXfer.la: $(libXfer_la_OBJECTS) $(libXfer_la_DEPENDENCIES) $(EXTRA_libXfer_la_DEPENDENCIES)
$(libXfer_la_LINK) -rpath $(libXferdir) $(libXfer_la_OBJECTS) $(libXfer_la_LIBADD) $(LIBS)
-libXferServer.la: $(libXferServer_la_OBJECTS) $(libXferServer_la_DEPENDENCIES)
+libXferServer.la: $(libXferServer_la_OBJECTS) $(libXferServer_la_DEPENDENCIES) $(EXTRA_libXferServer_la_DEPENDENCIES)
$(libXferServer_la_LINK) $(am_libXferServer_la_rpath) $(libXferServer_la_OBJECTS) $(libXferServer_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -rf .libs _libs
install-AmandaDATA: $(Amanda_DATA)
@$(NORMAL_INSTALL)
- test -z "$(Amandadir)" || $(MKDIR_P) "$(DESTDIR)$(Amandadir)"
@list='$(Amanda_DATA)'; test -n "$(Amandadir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(Amandadir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(Amandadir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(Amanda_DATA)'; test -n "$(Amandadir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(Amandadir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(Amandadir)" && rm -f $$files
+ dir='$(DESTDIR)$(Amandadir)'; $(am__uninstall_files_from_dir)
install-AmandaApplicationDATA: $(AmandaApplication_DATA)
@$(NORMAL_INSTALL)
- test -z "$(AmandaApplicationdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaApplicationdir)"
@list='$(AmandaApplication_DATA)'; test -n "$(AmandaApplicationdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(AmandaApplicationdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(AmandaApplicationdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(AmandaApplication_DATA)'; test -n "$(AmandaApplicationdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(AmandaApplicationdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(AmandaApplicationdir)" && rm -f $$files
+ dir='$(DESTDIR)$(AmandaApplicationdir)'; $(am__uninstall_files_from_dir)
install-AmandaChangerDATA: $(AmandaChanger_DATA)
@$(NORMAL_INSTALL)
- test -z "$(AmandaChangerdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaChangerdir)"
@list='$(AmandaChanger_DATA)'; test -n "$(AmandaChangerdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(AmandaChangerdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(AmandaChangerdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(AmandaChanger_DATA)'; test -n "$(AmandaChangerdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(AmandaChangerdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(AmandaChangerdir)" && rm -f $$files
+ dir='$(DESTDIR)$(AmandaChangerdir)'; $(am__uninstall_files_from_dir)
install-AmandaConfigDATA: $(AmandaConfig_DATA)
@$(NORMAL_INSTALL)
- test -z "$(AmandaConfigdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaConfigdir)"
@list='$(AmandaConfig_DATA)'; test -n "$(AmandaConfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(AmandaConfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(AmandaConfigdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(AmandaConfig_DATA)'; test -n "$(AmandaConfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(AmandaConfigdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(AmandaConfigdir)" && rm -f $$files
+ dir='$(DESTDIR)$(AmandaConfigdir)'; $(am__uninstall_files_from_dir)
install-AmandaCurinfoDATA: $(AmandaCurinfo_DATA)
@$(NORMAL_INSTALL)
- test -z "$(AmandaCurinfodir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaCurinfodir)"
@list='$(AmandaCurinfo_DATA)'; test -n "$(AmandaCurinfodir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(AmandaCurinfodir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(AmandaCurinfodir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(AmandaCurinfo_DATA)'; test -n "$(AmandaCurinfodir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(AmandaCurinfodir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(AmandaCurinfodir)" && rm -f $$files
+ dir='$(DESTDIR)$(AmandaCurinfodir)'; $(am__uninstall_files_from_dir)
install-AmandaIPCDATA: $(AmandaIPC_DATA)
@$(NORMAL_INSTALL)
- test -z "$(AmandaIPCdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaIPCdir)"
@list='$(AmandaIPC_DATA)'; test -n "$(AmandaIPCdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(AmandaIPCdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(AmandaIPCdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(AmandaIPC_DATA)'; test -n "$(AmandaIPCdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(AmandaIPCdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(AmandaIPCdir)" && rm -f $$files
+ dir='$(DESTDIR)$(AmandaIPCdir)'; $(am__uninstall_files_from_dir)
install-AmandaInteractivityDATA: $(AmandaInteractivity_DATA)
@$(NORMAL_INSTALL)
- test -z "$(AmandaInteractivitydir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaInteractivitydir)"
@list='$(AmandaInteractivity_DATA)'; test -n "$(AmandaInteractivitydir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(AmandaInteractivitydir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(AmandaInteractivitydir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(AmandaInteractivity_DATA)'; test -n "$(AmandaInteractivitydir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(AmandaInteractivitydir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(AmandaInteractivitydir)" && rm -f $$files
+ dir='$(DESTDIR)$(AmandaInteractivitydir)'; $(am__uninstall_files_from_dir)
install-AmandaRecoveryDATA: $(AmandaRecovery_DATA)
@$(NORMAL_INSTALL)
- test -z "$(AmandaRecoverydir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaRecoverydir)"
@list='$(AmandaRecovery_DATA)'; test -n "$(AmandaRecoverydir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(AmandaRecoverydir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(AmandaRecoverydir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(AmandaRecovery_DATA)'; test -n "$(AmandaRecoverydir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(AmandaRecoverydir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(AmandaRecoverydir)" && rm -f $$files
+ dir='$(DESTDIR)$(AmandaRecoverydir)'; $(am__uninstall_files_from_dir)
install-AmandaReportDATA: $(AmandaReport_DATA)
@$(NORMAL_INSTALL)
- test -z "$(AmandaReportdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaReportdir)"
@list='$(AmandaReport_DATA)'; test -n "$(AmandaReportdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(AmandaReportdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(AmandaReportdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(AmandaReport_DATA)'; test -n "$(AmandaReportdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(AmandaReportdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(AmandaReportdir)" && rm -f $$files
+ dir='$(DESTDIR)$(AmandaReportdir)'; $(am__uninstall_files_from_dir)
install-AmandaTaperDATA: $(AmandaTaper_DATA)
@$(NORMAL_INSTALL)
- test -z "$(AmandaTaperdir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaTaperdir)"
@list='$(AmandaTaper_DATA)'; test -n "$(AmandaTaperdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(AmandaTaperdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(AmandaTaperdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(AmandaTaper_DATA)'; test -n "$(AmandaTaperdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(AmandaTaperdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(AmandaTaperdir)" && rm -f $$files
+ dir='$(DESTDIR)$(AmandaTaperdir)'; $(am__uninstall_files_from_dir)
install-AmandaTaperScanDATA: $(AmandaTaperScan_DATA)
@$(NORMAL_INSTALL)
- test -z "$(AmandaTaperScandir)" || $(MKDIR_P) "$(DESTDIR)$(AmandaTaperScandir)"
@list='$(AmandaTaperScan_DATA)'; test -n "$(AmandaTaperScandir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(AmandaTaperScandir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(AmandaTaperScandir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(AmandaTaperScan_DATA)'; test -n "$(AmandaTaperScandir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(AmandaTaperScandir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(AmandaTaperScandir)" && rm -f $$files
+ dir='$(DESTDIR)$(AmandaTaperScandir)'; $(am__uninstall_files_from_dir)
install-Amanda_DBDATA: $(Amanda_DB_DATA)
@$(NORMAL_INSTALL)
- test -z "$(Amanda_DBdir)" || $(MKDIR_P) "$(DESTDIR)$(Amanda_DBdir)"
@list='$(Amanda_DB_DATA)'; test -n "$(Amanda_DBdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(Amanda_DBdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(Amanda_DBdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@$(NORMAL_UNINSTALL)
@list='$(Amanda_DB_DATA)'; test -n "$(Amanda_DBdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(Amanda_DBdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(Amanda_DBdir)" && rm -f $$files
+ dir='$(DESTDIR)$(Amanda_DBdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
installcheck: installcheck-recursive
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# configure.in
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amlibdir)"
LTLIBRARIES = $(amlib_LTLIBRARIES)
libamglue_la_DEPENDENCIES = $(top_builddir)/xfer-src/libamxfer.la
$(LDFLAGS) -o $@
SOURCES = $(libamglue_la_SOURCES)
DIST_SOURCES = $(libamglue_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
@list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \
}
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libamglue.la: $(libamglue_la_OBJECTS) $(libamglue_la_DEPENDENCIES)
+libamglue.la: $(libamglue_la_OBJECTS) $(libamglue_la_DEPENDENCIES) $(EXTRA_libamglue_la_DEPENDENCIES)
$(libamglue_la_LINK) -rpath $(amlibdir) $(libamglue_la_OBJECTS) $(libamglue_la_LIBADD) $(LIBS)
mostlyclean-compile:
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) Zmanda, Inc. All Rights Reserved.
*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License version 2.1 as
- * published by the Free Software Foundation.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Makefile for PO directory in any package using GNU gettext.
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
ACLOCAL = @ACLOCAL@
AIX_BACKUP = @AIX_BACKUP@
ALLOCA = @ALLOCA@
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
+LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+ --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS)
YLWRAP = $(top_srcdir)/config/ylwrap
-YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
+ --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS)
SOURCES = $(amrecover_SOURCES)
DIST_SOURCES = $(amrecover_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
echo " rm -f" $$list; \
rm -f $$list
uparse.h: uparse.c
- @if test ! -f $@; then \
- rm -f uparse.c; \
- $(MAKE) $(AM_MAKEFLAGS) uparse.c; \
- else :; fi
-amrecover$(EXEEXT): $(amrecover_OBJECTS) $(amrecover_DEPENDENCIES)
+ @if test ! -f $@; then rm -f uparse.c; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) uparse.c; else :; fi
+amrecover$(EXEEXT): $(amrecover_OBJECTS) $(amrecover_DEPENDENCIES) $(EXTRA_amrecover_DEPENDENCIES)
@rm -f amrecover$(EXEEXT)
$(LINK) $(amrecover_OBJECTS) $(amrecover_LDADD) $(LIBS)
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*NOTREACHED*/
}
- if (ctl_data->file.program != NULL) {
+ if (ctl_data->file.program[0] != '\0') {
if (strcmp(ctl_data->file.program, "APPLICATION") == 0)
dumptype = IS_APPLICATION_API;
#ifdef GNUTAR
g_debug("read header %zd => %d", size, header_size);
if (header_size < 32768) {
- security_stream_read(amidxtaped_streams[DATAFD].fd,
- read_amidxtaped_data, cookie);
+ /* wait to read more data */
return;
} else if (header_size > 32768) {
error("header_size is %d\n", header_size);
}
assert (to_move == size);
+ security_stream_read_cancel(amidxtaped_streams[DATAFD].fd);
/* parse the file header */
fh_init(&ctl_data->file);
parse_file_header(header_buf, &ctl_data->file, (size_t)header_size);
* We ignore errors while writing to the index file.
*/
(void)full_write(ctl_data->child_pipe[1], buf, (size_t)size);
- security_stream_read(amidxtaped_streams[DATAFD].fd,
- read_amidxtaped_data, cookie);
}
}
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
int verbose)
{
char *dir = NULL;
- char *s;
int nb_found;
int result;
size_t i;
DIR_ITEM *ditem;
- if ((s = validate_regexp(tpath_on_disk)) != NULL) {
+ if (validate_regexp(tpath_on_disk) != NULL) {
result = set_directory(default_dir, verbose);
return result;
}
/* Copy the first part of user declarations. */
/* Line 268 of yacc.c */
-#line 31 "uparse.y"
+#line 32 "uparse.y"
#include "amanda.h"
#include "amrecover.h"
{
/* Line 293 of yacc.c */
-#line 43 "uparse.y"
+#line 44 "uparse.y"
int intval;
double floatval;
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 68, 68, 69, 70, 71, 72, 73, 74, 75,
- 76, 77, 78, 79, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
- 132, 178, 179, 183, 184, 185, 186, 187, 188, 189,
- 190, 191, 192, 193, 194, 195, 199, 200, 204, 208,
- 209, 213, 217, 218, 222, 226, 227, 231, 235, 236,
- 240, 241, 242, 246, 247, 251, 252, 256, 257, 261,
- 270, 271, 275, 279, 280
+ 0, 69, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 133, 179, 180, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 200, 201, 205, 209,
+ 210, 214, 218, 219, 223, 227, 228, 232, 236, 237,
+ 241, 242, 243, 247, 248, 252, 253, 257, 258, 262,
+ 271, 272, 276, 280, 281
};
#endif
case 14:
/* Line 1806 of yacc.c */
-#line 83 "uparse.y"
+#line 84 "uparse.y"
{ list_host(); }
break;
case 15:
/* Line 1806 of yacc.c */
-#line 84 "uparse.y"
+#line 85 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 16:
/* Line 1806 of yacc.c */
-#line 85 "uparse.y"
+#line 86 "uparse.y"
{ list_disk((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 17:
/* Line 1806 of yacc.c */
-#line 86 "uparse.y"
+#line 87 "uparse.y"
{ list_disk(NULL); }
break;
case 18:
/* Line 1806 of yacc.c */
-#line 87 "uparse.y"
+#line 88 "uparse.y"
{ yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 19:
/* Line 1806 of yacc.c */
-#line 88 "uparse.y"
+#line 89 "uparse.y"
{ list_property(); }
break;
case 20:
/* Line 1806 of yacc.c */
-#line 89 "uparse.y"
+#line 90 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 21:
/* Line 1806 of yacc.c */
-#line 90 "uparse.y"
+#line 91 "uparse.y"
{ set_translate(NULL); }
break;
case 22:
/* Line 1806 of yacc.c */
-#line 91 "uparse.y"
+#line 92 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 23:
/* Line 1806 of yacc.c */
-#line 92 "uparse.y"
+#line 93 "uparse.y"
{ set_translate((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 24:
/* Line 1806 of yacc.c */
-#line 93 "uparse.y"
+#line 94 "uparse.y"
{ set_host((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 25:
/* Line 1806 of yacc.c */
-#line 94 "uparse.y"
+#line 95 "uparse.y"
{ yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 26:
/* Line 1806 of yacc.c */
-#line 95 "uparse.y"
+#line 96 "uparse.y"
{ yyerror("Argument required"); }
break;
case 27:
/* Line 1806 of yacc.c */
-#line 96 "uparse.y"
+#line 97 "uparse.y"
{ set_disk((yyvsp[(2) - (4)].strval), (yyvsp[(3) - (4)].strval)); amfree((yyvsp[(2) - (4)].strval)); amfree((yyvsp[(3) - (4)].strval)); }
break;
case 28:
/* Line 1806 of yacc.c */
-#line 97 "uparse.y"
+#line 98 "uparse.y"
{ set_disk((yyvsp[(2) - (3)].strval), NULL); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 29:
/* Line 1806 of yacc.c */
-#line 98 "uparse.y"
+#line 99 "uparse.y"
{ yyerror("Invalid argument"); amfree((yyvsp[(2) - (4)].strval)); amfree((yyvsp[(3) - (4)].strval)); }
break;
case 30:
/* Line 1806 of yacc.c */
-#line 99 "uparse.y"
+#line 100 "uparse.y"
{ yyerror("Argument required"); }
break;
case 31:
/* Line 1806 of yacc.c */
-#line 100 "uparse.y"
+#line 101 "uparse.y"
{ set_tape((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 32:
/* Line 1806 of yacc.c */
-#line 101 "uparse.y"
+#line 102 "uparse.y"
{ set_tape("default"); }
break;
case 33:
/* Line 1806 of yacc.c */
-#line 102 "uparse.y"
+#line 103 "uparse.y"
{ yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 34:
/* Line 1806 of yacc.c */
-#line 103 "uparse.y"
+#line 104 "uparse.y"
{ set_device(NULL, (yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 35:
/* Line 1806 of yacc.c */
-#line 104 "uparse.y"
+#line 105 "uparse.y"
{ set_device((yyvsp[(3) - (5)].strval), (yyvsp[(4) - (5)].strval)); amfree((yyvsp[(3) - (5)].strval)); amfree((yyvsp[(4) - (5)].strval)); }
break;
case 36:
/* Line 1806 of yacc.c */
-#line 105 "uparse.y"
+#line 106 "uparse.y"
{ set_device(NULL, NULL); }
break;
case 37:
/* Line 1806 of yacc.c */
-#line 106 "uparse.y"
+#line 107 "uparse.y"
{ yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 38:
/* Line 1806 of yacc.c */
-#line 107 "uparse.y"
+#line 108 "uparse.y"
{ yyerror("Invalid argument"); amfree((yyvsp[(3) - (4)].strval)); }
break;
case 39:
/* Line 1806 of yacc.c */
-#line 108 "uparse.y"
+#line 109 "uparse.y"
{ yyerror("Invalid argument"); amfree((yyvsp[(3) - (5)].strval)); amfree((yyvsp[(4) - (5)].strval)); }
break;
case 40:
/* Line 1806 of yacc.c */
-#line 109 "uparse.y"
+#line 110 "uparse.y"
{ set_property_name((yyvsp[(2) - (3)].strval), 0); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 41:
/* Line 1806 of yacc.c */
-#line 110 "uparse.y"
+#line 111 "uparse.y"
{ set_property_name((yyvsp[(3) - (4)].strval), 1); amfree((yyvsp[(3) - (4)].strval)); }
break;
case 42:
/* Line 1806 of yacc.c */
-#line 111 "uparse.y"
+#line 112 "uparse.y"
{ set_property_name((yyvsp[(3) - (4)].strval), 0); amfree((yyvsp[(3) - (4)].strval)); }
break;
case 43:
/* Line 1806 of yacc.c */
-#line 112 "uparse.y"
+#line 113 "uparse.y"
{ set_property_name((yyvsp[(4) - (5)].strval), 1); amfree((yyvsp[(4) - (5)].strval)); }
break;
case 44:
/* Line 1806 of yacc.c */
-#line 113 "uparse.y"
+#line 114 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 45:
/* Line 1806 of yacc.c */
-#line 114 "uparse.y"
+#line 115 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 46:
/* Line 1806 of yacc.c */
-#line 115 "uparse.y"
+#line 116 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 47:
/* Line 1806 of yacc.c */
-#line 116 "uparse.y"
+#line 117 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 48:
/* Line 1806 of yacc.c */
-#line 117 "uparse.y"
+#line 118 "uparse.y"
{ cd_glob((yyvsp[(2) - (3)].strval), 1); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 49:
/* Line 1806 of yacc.c */
-#line 118 "uparse.y"
+#line 119 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 50:
/* Line 1806 of yacc.c */
-#line 119 "uparse.y"
+#line 120 "uparse.y"
{ yyerror("Argument required"); }
break;
case 51:
/* Line 1806 of yacc.c */
-#line 120 "uparse.y"
+#line 121 "uparse.y"
{ cd_regex((yyvsp[(2) - (3)].strval), 1); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 52:
/* Line 1806 of yacc.c */
-#line 121 "uparse.y"
+#line 122 "uparse.y"
{ yyerror("Invalid argument"); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 53:
/* Line 1806 of yacc.c */
-#line 122 "uparse.y"
+#line 123 "uparse.y"
{ yyerror("Argument required"); }
break;
case 54:
/* Line 1806 of yacc.c */
-#line 123 "uparse.y"
+#line 124 "uparse.y"
{ set_mode(SAMBA_SMBCLIENT); }
break;
case 55:
/* Line 1806 of yacc.c */
-#line 124 "uparse.y"
+#line 125 "uparse.y"
{ set_mode(SAMBA_TAR); }
break;
case 56:
/* Line 1806 of yacc.c */
-#line 125 "uparse.y"
+#line 126 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 57:
/* Line 1806 of yacc.c */
-#line 126 "uparse.y"
+#line 127 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 58:
/* Line 1806 of yacc.c */
-#line 127 "uparse.y"
+#line 128 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 59:
/* Line 1806 of yacc.c */
-#line 128 "uparse.y"
+#line 129 "uparse.y"
{ yyerror("Argument required"); }
break;
case 60:
/* Line 1806 of yacc.c */
-#line 132 "uparse.y"
+#line 133 "uparse.y"
{
time_t now;
struct tm *t;
case 61:
/* Line 1806 of yacc.c */
-#line 178 "uparse.y"
+#line 179 "uparse.y"
{ yyerror("Argument required"); }
break;
case 62:
/* Line 1806 of yacc.c */
-#line 179 "uparse.y"
+#line 180 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 63:
/* Line 1806 of yacc.c */
-#line 183 "uparse.y"
+#line 184 "uparse.y"
{ list_disk_history(); }
break;
case 64:
/* Line 1806 of yacc.c */
-#line 184 "uparse.y"
+#line 185 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 65:
/* Line 1806 of yacc.c */
-#line 185 "uparse.y"
+#line 186 "uparse.y"
{ list_directory(); }
break;
case 66:
/* Line 1806 of yacc.c */
-#line 186 "uparse.y"
+#line 187 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 67:
/* Line 1806 of yacc.c */
-#line 187 "uparse.y"
+#line 188 "uparse.y"
{ display_extract_list((yyvsp[(2) - (3)].strval)); amfree((yyvsp[(2) - (3)].strval)); }
break;
case 68:
/* Line 1806 of yacc.c */
-#line 188 "uparse.y"
+#line 189 "uparse.y"
{ display_extract_list(NULL); }
break;
case 69:
/* Line 1806 of yacc.c */
-#line 189 "uparse.y"
+#line 190 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 70:
/* Line 1806 of yacc.c */
-#line 190 "uparse.y"
+#line 191 "uparse.y"
{ show_directory(); }
break;
case 71:
/* Line 1806 of yacc.c */
-#line 191 "uparse.y"
+#line 192 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 72:
/* Line 1806 of yacc.c */
-#line 192 "uparse.y"
+#line 193 "uparse.y"
{ clear_extract_list(); }
break;
case 73:
/* Line 1806 of yacc.c */
-#line 193 "uparse.y"
+#line 194 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 74:
/* Line 1806 of yacc.c */
-#line 194 "uparse.y"
+#line 195 "uparse.y"
{ show_mode (); }
break;
case 75:
/* Line 1806 of yacc.c */
-#line 195 "uparse.y"
+#line 196 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 76:
/* Line 1806 of yacc.c */
-#line 199 "uparse.y"
+#line 200 "uparse.y"
{ quit(); }
break;
case 77:
/* Line 1806 of yacc.c */
-#line 200 "uparse.y"
+#line 201 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 79:
/* Line 1806 of yacc.c */
-#line 208 "uparse.y"
+#line 209 "uparse.y"
{ add_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 80:
/* Line 1806 of yacc.c */
-#line 209 "uparse.y"
+#line 210 "uparse.y"
{ add_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
break;
case 82:
/* Line 1806 of yacc.c */
-#line 217 "uparse.y"
+#line 218 "uparse.y"
{ add_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 83:
/* Line 1806 of yacc.c */
-#line 218 "uparse.y"
+#line 219 "uparse.y"
{ add_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
break;
case 85:
/* Line 1806 of yacc.c */
-#line 226 "uparse.y"
+#line 227 "uparse.y"
{ delete_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 86:
/* Line 1806 of yacc.c */
-#line 227 "uparse.y"
+#line 228 "uparse.y"
{ delete_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
break;
case 88:
/* Line 1806 of yacc.c */
-#line 235 "uparse.y"
+#line 236 "uparse.y"
{ delete_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); }
break;
case 89:
/* Line 1806 of yacc.c */
-#line 236 "uparse.y"
+#line 237 "uparse.y"
{ delete_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); }
break;
case 90:
/* Line 1806 of yacc.c */
-#line 240 "uparse.y"
+#line 241 "uparse.y"
{ char * buf= g_get_current_dir(); puts(buf); free(buf); }
break;
case 91:
/* Line 1806 of yacc.c */
-#line 241 "uparse.y"
+#line 242 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 92:
/* Line 1806 of yacc.c */
-#line 242 "uparse.y"
+#line 243 "uparse.y"
{
local_cd((yyvsp[(2) - (3)].strval));
amfree((yyvsp[(2) - (3)].strval));
case 93:
/* Line 1806 of yacc.c */
-#line 246 "uparse.y"
+#line 247 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 94:
/* Line 1806 of yacc.c */
-#line 247 "uparse.y"
+#line 248 "uparse.y"
{ yyerror("Argument required"); }
break;
case 95:
/* Line 1806 of yacc.c */
-#line 251 "uparse.y"
+#line 252 "uparse.y"
{ help_list(); }
break;
case 96:
/* Line 1806 of yacc.c */
-#line 252 "uparse.y"
+#line 253 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 97:
/* Line 1806 of yacc.c */
-#line 256 "uparse.y"
+#line 257 "uparse.y"
{ extract_files(); }
break;
case 98:
/* Line 1806 of yacc.c */
-#line 257 "uparse.y"
+#line 258 "uparse.y"
{ yyerror("Invalid argument"); }
break;
case 99:
/* Line 1806 of yacc.c */
-#line 261 "uparse.y"
+#line 262 "uparse.y"
{
char * errstr = vstralloc("Invalid command: ", (yyvsp[(1) - (2)].strval), NULL);
yyerror(errstr);
case 100:
/* Line 1806 of yacc.c */
-#line 270 "uparse.y"
+#line 271 "uparse.y"
{ add_property_value((yyvsp[(1) - (2)].strval)); amfree( (yyvsp[(1) - (2)].strval)); }
break;
case 101:
/* Line 1806 of yacc.c */
-#line 271 "uparse.y"
+#line 272 "uparse.y"
{ ; }
break;
case 102:
/* Line 1806 of yacc.c */
-#line 275 "uparse.y"
+#line 276 "uparse.y"
{ amfree((yyvsp[(1) - (2)].strval)); }
break;
case 103:
/* Line 1806 of yacc.c */
-#line 279 "uparse.y"
+#line 280 "uparse.y"
{ amfree((yyvsp[(1) - (2)].strval)); }
break;
case 104:
/* Line 1806 of yacc.c */
-#line 280 "uparse.y"
+#line 281 "uparse.y"
{ ; }
break;
/* Line 2067 of yacc.c */
-#line 283 "uparse.y"
+#line 284 "uparse.y"
void
{
/* Line 2068 of yacc.c */
-#line 43 "uparse.y"
+#line 44 "uparse.y"
int intval;
double floatval;
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998, 2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* amanda, the advanced maryland automatic network disk archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
*
* lexer for amrecover interactive language
*/
-#line 32 "uscan.l"
+#line 33 "uscan.l"
#include "amanda.h"
#include "uparse.h"
-#line 66 "uscan.l"
+#line 67 "uscan.l"
static char *string_buf = NULL;
-#line 631 "uscan.c"
+#line 632 "uscan.c"
#define INITIAL 0
#define quotedstring 1
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 69 "uscan.l"
+#line 70 "uscan.l"
/* literal keyword tokens */
-#line 827 "uscan.c"
+#line 828 "uscan.c"
if ( !(yy_init) )
{
case 1:
YY_RULE_SETUP
-#line 75 "uscan.l"
+#line 76 "uscan.l"
{ BEGIN(needstring); return LISTHOST; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 76 "uscan.l"
+#line 77 "uscan.l"
{ BEGIN(needstring); return LISTDISK; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 77 "uscan.l"
+#line 78 "uscan.l"
{ BEGIN(needstring); return LISTPROPERTY; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 78 "uscan.l"
+#line 79 "uscan.l"
{ BEGIN(needstring); return SETHOST; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 79 "uscan.l"
+#line 80 "uscan.l"
{ BEGIN(needstring); return SETDISK; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 80 "uscan.l"
+#line 81 "uscan.l"
{ BEGIN(needstring); return SETDATE; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 81 "uscan.l"
+#line 82 "uscan.l"
{ BEGIN(needmode); return SETMODE; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 82 "uscan.l"
+#line 83 "uscan.l"
{ BEGIN(needstring); return SETTAPE; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 83 "uscan.l"
+#line 84 "uscan.l"
{ BEGIN(needdevice); return SETDEVICE; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 84 "uscan.l"
+#line 85 "uscan.l"
{ BEGIN(propertyappend); return SETPROPERTY; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 85 "uscan.l"
+#line 86 "uscan.l"
{ BEGIN(needstring); return SETTRANSLATE; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 86 "uscan.l"
+#line 87 "uscan.l"
{ BEGIN(needstring); return DASH_H; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 87 "uscan.l"
+#line 88 "uscan.l"
{ BEGIN(needstring); return CD; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 88 "uscan.l"
+#line 89 "uscan.l"
{ BEGIN(needstring); return CDX; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 89 "uscan.l"
+#line 90 "uscan.l"
{ BEGIN(needstring); return QUIT; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 90 "uscan.l"
+#line 91 "uscan.l"
{ BEGIN(needstring); return QUIT; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 91 "uscan.l"
+#line 92 "uscan.l"
{ BEGIN(needstring); return DHIST; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 92 "uscan.l"
+#line 93 "uscan.l"
{ BEGIN(needstring); return LS; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 93 "uscan.l"
+#line 94 "uscan.l"
{ BEGIN(needstring); return ADD; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 94 "uscan.l"
+#line 95 "uscan.l"
{ BEGIN(needstring); return ADDX; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 95 "uscan.l"
+#line 96 "uscan.l"
{ BEGIN(needstring); return LIST; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 96 "uscan.l"
+#line 97 "uscan.l"
{ BEGIN(needstring); return DELETE; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 97 "uscan.l"
+#line 98 "uscan.l"
{ BEGIN(needstring); return DELETEX; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 98 "uscan.l"
+#line 99 "uscan.l"
{ BEGIN(needstring); return PWD; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 99 "uscan.l"
+#line 100 "uscan.l"
{ BEGIN(needstring); return CLEAR; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 100 "uscan.l"
+#line 101 "uscan.l"
{ BEGIN(INITIAL); return HELP; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 101 "uscan.l"
+#line 102 "uscan.l"
{ BEGIN(needstring); return HELP; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 102 "uscan.l"
+#line 103 "uscan.l"
{ BEGIN(needstring); return LCD; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 103 "uscan.l"
+#line 104 "uscan.l"
{ BEGIN(needstring); return LPWD; }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 104 "uscan.l"
+#line 105 "uscan.l"
{ BEGIN(needstring); return EXTRACT; }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 105 "uscan.l"
+#line 106 "uscan.l"
{ BEGIN(needstring); return MODE; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 106 "uscan.l"
+#line 107 "uscan.l"
{ BEGIN(needstring); return TAR; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 107 "uscan.l"
+#line 108 "uscan.l"
{ BEGIN(needstring); return SMB; }
YY_BREAK
case 34:
/* rule 34 can match eol */
YY_RULE_SETUP
-#line 108 "uscan.l"
+#line 109 "uscan.l"
{ BEGIN(INITIAL); return NL; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 114 "uscan.l"
+#line 115 "uscan.l"
{
BEGIN(propertypriority);
return APPEND;
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 119 "uscan.l"
+#line 120 "uscan.l"
{
BEGIN(needstring);
return PRIORITY;
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 124 "uscan.l"
+#line 125 "uscan.l"
{
if(string_buf != NULL) {
g_printf("ERROR:string_buf != NULL: %s\n",string_buf);
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 132 "uscan.l"
+#line 133 "uscan.l"
{
strappend(string_buf, yytext);
}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 136 "uscan.l"
+#line 137 "uscan.l"
{
/* escaped character (including quote) */
strappend(string_buf, yytext);
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 141 "uscan.l"
+#line 142 "uscan.l"
{ /* saw closing quote - all done */
strappend(string_buf, yytext);
yylval.strval = string_buf;
case 41:
/* rule 41 can match eol */
YY_RULE_SETUP
-#line 149 "uscan.l"
+#line 150 "uscan.l"
{
fprintf(stderr,"Unterminated quoted string\n");
string_buf = NULL;
case 42:
YY_RULE_SETUP
-#line 160 "uscan.l"
+#line 161 "uscan.l"
{
yylval.strval = stralloc(yytext);
BEGIN(needstring);
case 43:
/* rule 43 can match eol */
YY_RULE_SETUP
-#line 170 "uscan.l"
+#line 171 "uscan.l"
; /* whitespace */
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 183 "uscan.l"
+#line 184 "uscan.l"
ECHO;
YY_BREAK
-#line 1183 "uscan.c"
+#line 1184 "uscan.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(quotedstring):
case YY_STATE_EOF(needdevice):
#define YYTABLES_NAME "yytables"
-#line 183 "uscan.l"
+#line 184 "uscan.l"
/*
* amanda, the advanced maryland automatic network disk archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" \
"$(DESTDIR)$(sbindir)" "$(DESTDIR)$(amlibexecdir)" \
"$(DESTDIR)$(sbindir)"
$(amindexd_SOURCES) amtrmidx.c amtrmlog.c chunker.c \
$(diskfile_SOURCES) driver.c dumper.c $(infofile_SOURCES) \
planner.c
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
@list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \
}
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libamserver.la: $(libamserver_la_OBJECTS) $(libamserver_la_DEPENDENCIES)
+libamserver.la: $(libamserver_la_OBJECTS) $(libamserver_la_DEPENDENCIES) $(EXTRA_libamserver_la_DEPENDENCIES)
$(libamserver_la_LINK) -rpath $(amlibdir) $(libamserver_la_OBJECTS) $(libamserver_la_LIBADD) $(LIBS)
install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_PROGRAMS)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-amadmin$(EXEEXT): $(amadmin_OBJECTS) $(amadmin_DEPENDENCIES)
+amadmin$(EXEEXT): $(amadmin_OBJECTS) $(amadmin_DEPENDENCIES) $(EXTRA_amadmin_DEPENDENCIES)
@rm -f amadmin$(EXEEXT)
$(LINK) $(amadmin_OBJECTS) $(amadmin_LDADD) $(LIBS)
-amcheck$(EXEEXT): $(amcheck_OBJECTS) $(amcheck_DEPENDENCIES)
+amcheck$(EXEEXT): $(amcheck_OBJECTS) $(amcheck_DEPENDENCIES) $(EXTRA_amcheck_DEPENDENCIES)
@rm -f amcheck$(EXEEXT)
$(LINK) $(amcheck_OBJECTS) $(amcheck_LDADD) $(LIBS)
-amflush$(EXEEXT): $(amflush_OBJECTS) $(amflush_DEPENDENCIES)
+amflush$(EXEEXT): $(amflush_OBJECTS) $(amflush_DEPENDENCIES) $(EXTRA_amflush_DEPENDENCIES)
@rm -f amflush$(EXEEXT)
$(LINK) $(amflush_OBJECTS) $(amflush_LDADD) $(LIBS)
-amindexd$(EXEEXT): $(amindexd_OBJECTS) $(amindexd_DEPENDENCIES)
+amindexd$(EXEEXT): $(amindexd_OBJECTS) $(amindexd_DEPENDENCIES) $(EXTRA_amindexd_DEPENDENCIES)
@rm -f amindexd$(EXEEXT)
$(LINK) $(amindexd_OBJECTS) $(amindexd_LDADD) $(LIBS)
-amtrmidx$(EXEEXT): $(amtrmidx_OBJECTS) $(amtrmidx_DEPENDENCIES)
+amtrmidx$(EXEEXT): $(amtrmidx_OBJECTS) $(amtrmidx_DEPENDENCIES) $(EXTRA_amtrmidx_DEPENDENCIES)
@rm -f amtrmidx$(EXEEXT)
$(LINK) $(amtrmidx_OBJECTS) $(amtrmidx_LDADD) $(LIBS)
-amtrmlog$(EXEEXT): $(amtrmlog_OBJECTS) $(amtrmlog_DEPENDENCIES)
+amtrmlog$(EXEEXT): $(amtrmlog_OBJECTS) $(amtrmlog_DEPENDENCIES) $(EXTRA_amtrmlog_DEPENDENCIES)
@rm -f amtrmlog$(EXEEXT)
$(LINK) $(amtrmlog_OBJECTS) $(amtrmlog_LDADD) $(LIBS)
-chunker$(EXEEXT): $(chunker_OBJECTS) $(chunker_DEPENDENCIES)
+chunker$(EXEEXT): $(chunker_OBJECTS) $(chunker_DEPENDENCIES) $(EXTRA_chunker_DEPENDENCIES)
@rm -f chunker$(EXEEXT)
$(LINK) $(chunker_OBJECTS) $(chunker_LDADD) $(LIBS)
-diskfile$(EXEEXT): $(diskfile_OBJECTS) $(diskfile_DEPENDENCIES)
+diskfile$(EXEEXT): $(diskfile_OBJECTS) $(diskfile_DEPENDENCIES) $(EXTRA_diskfile_DEPENDENCIES)
@rm -f diskfile$(EXEEXT)
$(LINK) $(diskfile_OBJECTS) $(diskfile_LDADD) $(LIBS)
-driver$(EXEEXT): $(driver_OBJECTS) $(driver_DEPENDENCIES)
+driver$(EXEEXT): $(driver_OBJECTS) $(driver_DEPENDENCIES) $(EXTRA_driver_DEPENDENCIES)
@rm -f driver$(EXEEXT)
$(LINK) $(driver_OBJECTS) $(driver_LDADD) $(LIBS)
-dumper$(EXEEXT): $(dumper_OBJECTS) $(dumper_DEPENDENCIES)
+dumper$(EXEEXT): $(dumper_OBJECTS) $(dumper_DEPENDENCIES) $(EXTRA_dumper_DEPENDENCIES)
@rm -f dumper$(EXEEXT)
$(LINK) $(dumper_OBJECTS) $(dumper_LDADD) $(LIBS)
-infofile$(EXEEXT): $(infofile_OBJECTS) $(infofile_DEPENDENCIES)
+infofile$(EXEEXT): $(infofile_OBJECTS) $(infofile_DEPENDENCIES) $(EXTRA_infofile_DEPENDENCIES)
@rm -f infofile$(EXEEXT)
$(LINK) $(infofile_OBJECTS) $(infofile_LDADD) $(LIBS)
-planner$(EXEEXT): $(planner_OBJECTS) $(planner_DEPENDENCIES)
+planner$(EXEEXT): $(planner_OBJECTS) $(planner_DEPENDENCIES) $(EXTRA_planner_DEPENDENCIES)
@rm -f planner$(EXEEXT)
$(LINK) $(planner_OBJECTS) $(planner_LDADD) $(LIBS)
install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
@list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@list='$(amlibexec_SCRIPTS)'; test -n "$(amlibexecdir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(amlibexecdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(amlibexecdir)" && rm -f $$files
+ dir='$(DESTDIR)$(amlibexecdir)'; $(am__uninstall_files_from_dir)
install-sbinSCRIPTS: $(sbin_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+ dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
#
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
static gboolean print_source = 0;
static int opt_days = -1;
static char *opt_sort = NULL;
+static gboolean exact_match = FALSE;
static gboolean opt_long = 0;
static gboolean opt_outdated = 0;
{"print-source" , 0, NULL, 3},
{"days" , 1, NULL, 4},
{"sort" , 1, NULL, 5},
+ {"exact-match" , 0, NULL, 6},
{NULL, 0, NULL, 0}
};
break;
case 5: opt_sort = g_strdup(optarg);
break;
+ case 6: exact_match = TRUE;
+ break;
case 'l': opt_long = TRUE;
break;
case 'd': opt_outdated = TRUE;
{
int i;
- g_fprintf(stderr, _("\nUsage: %s [--version] [--no-default] [--print-source] [-o configoption]*\n <conf> <command> {<args>} ...\n"),
+ g_fprintf(stderr, _("\nUsage: %s [--version] [--exact-match] [--no-default] [--print-source] [-o configoption]*\n <conf> <command> {<args>} ...\n"),
get_pname());
g_fprintf(stderr, _(" Valid <command>s are:\n"));
for (i = 0; i < NCMDS; i++)
usage();
}
- errstr = match_disklist(&diskq, argc-3, argv+3);
+ errstr = match_disklist(&diskq, exact_match, argc-3, argv+3);
if (errstr) {
g_printf("%s", errstr);
amfree(errstr);
}
}
start_argc=4;
- errstr = match_disklist(&diskq, argc-(start_argc-1), argv+(start_argc-1));
+ errstr = match_disklist(&diskq, exact_match, argc-(start_argc-1),
+ argv+(start_argc-1));
/* check all log file exists */
output_find_log = find_log();
disk_t *dp;
amfree(errstr);
- errstr = match_disklist(&diskq, argc-(start_argc-1),
- argv+(start_argc-1));
+ errstr = match_disklist(&diskq, exact_match, argc-(start_argc-1),
+ argv+(start_argc-1));
if (errstr) {
g_printf("%s", errstr);
amfree(errstr);
get_file_list(
int argc,
char **argv,
- int allow_empty)
+ int allow_empty,
+ gboolean exact_match)
{
GSList * file_list = NULL;
GSList * dumplist;
flags = CMDLINE_PARSE_DATESTAMP;
if (allow_empty) flags |= CMDLINE_EMPTY_TO_WILDCARD;
+ if (exact_match) flags |= CMDLINE_EXACT_MATCH;
dumplist = cmdline_parse_dumpspecs(argc, argv, flags);
file_list = cmdline_match_holding(dumplist);
_("size (kB)"), _("lv"), _("outd"), _("dump specification"));
}
- file_list = get_file_list(argc, argv, 1);
+ file_list = get_file_list(argc, argv, 1, exact_match);
for (li = file_list; li != NULL; li = li->next) {
char *dumpstr;
int is_outdated;
case HOLDING_DELETE:
argc -= 4; argv += 4;
- file_list = get_file_list(argc, argv, 0);
+ file_list = get_file_list(argc, argv, 0, exact_match);
for (li = file_list; li != NULL; li = li->next) {
g_fprintf(stderr, _("Deleting '%s'\n"), (char *)li->data);
/* remove it from the catalog */
#! @PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
print STDERR "slot $params{'err'}->{'this_slot'}:";
}
print STDERR " $params{'err'}\n";
+ } elsif (!$params{'res'}) {
+ my $volume_label = $params{'label'};
+ if ($params{'active'}) {
+ print STDERR " volume '$volume_label' is still active and cannot be overwritten\n";
+ } elsif ($params{'does_not_match_labelstr'}) {
+ print STDERR " volume '$volume_label' does not match labelstr '$params{'labelstr'}'\n";
+ } elsif ($params{'not_in_tapelist'}) {
+ print STDERR " volume '$volume_label' is not in the tapelist\n"
+ } else {
+ print STDERR " volume '$volume_label'\n";
+ }
} else { # res must be defined
my $res = $params{'res'};
my $dev = $res->{'device'};
print "Will $modestr to volume '$label' in slot $slot.\n";
} else {
my $header = $res->{'device'}->volume_header();
- if ($header->{'type'} == $Amanda::Header::F_WEIRD) {
+ if (defined $header and defined $header->{'type'} and
+ $header->{'type'} == $Amanda::Header::F_WEIRD) {
print "Will $modestr label '$label' to non-Amanda volume in slot $slot.\n";
} else {
print "Will $modestr label '$label' to new volume in slot $slot.\n";
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
void
usage(void)
{
- g_printf(_("Usage: amcheck [--version] [-am] [-w] [-sclt] [-M <address>] [--client-verbose] [-o configoption]* <conf> [host [disk]* ]*\n"));
+ g_printf(_("Usage: amcheck [--version] [-am] [-w] [-sclt] [-M <address>] [--client-verbose] [--exact_match] [-o configoption]* <conf> [host [disk]* ]*\n"));
exit(1);
/*NOTREACHED*/
}
static long int unitdivisor;
static int client_verbose = FALSE;
+static gboolean exact_match = FALSE;
static struct option long_options[] = {
{"client-verbose", 0, NULL, 1},
{"version" , 0, NULL, 2},
+ {"exact-match" , 0, NULL, 3},
{NULL, 0, NULL, 0}
};
case 2: printf("amcheck-%s\n", VERSION);
return(0);
break;
+ case 3: exact_match = TRUE;
+ break;
case 'M': if (mailto) {
g_printf(_("Multiple -M options\n"));
exit(1);
conf_ctimeout = (time_t)getconf_int(CNF_CTIMEOUT);
- errstr = match_disklist(&origq, argc-1, argv+1);
+ errstr = match_disklist(&origq, exact_match, argc-1, argv+1);
if (errstr) {
g_printf(_("%s"),errstr);
amfree(errstr);
#! @PERL@
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
if ($all_success) {
print "All images successfully validated\n";
} else {
- print "Some images failed to be correclty validated.\n";
+ print "Some images failed to be correctly validated.\n";
$exit_code = 1;
}
#!@PERL@
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#!@PERL@
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#! @PERL@
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
use Getopt::Long;
use POSIX qw(WIFEXITED WEXITSTATUS strftime);
+use File::Glob qw( :glob );
use Amanda::Config qw( :init :getconf );
use Amanda::Util qw( :constants );
sub usage {
my ($msg) = @_;
print STDERR <<EOF;
-Usage: amdump <conf> [--no-taper] [--from-client] [-o configoption]* [host/disk]*
+Usage: amdump <conf> [--no-taper] [--from-client] [--exact-match] [-o configoption]* [host/disk]*
EOF
print STDERR "$msg\n" if $msg;
exit 1;
my $opt_no_taper = 0;
my $opt_from_client = 0;
+my $opt_exact_match = 0;
debug("Arguments: " . join(' ', @ARGV));
Getopt::Long::Configure(qw(bundling));
'help|usage|?' => \&usage,
'no-taper' => \$opt_no_taper,
'from-client' => \$opt_from_client,
+ 'exact-match' => \$opt_exact_match,
'o=s' => sub {
push @config_overrides_opts, "-o" . $_[1];
add_config_override_opt($config_overrides, $_[1]);
my $datestamp = strftime "%Y%m%d", @now;
my $starttime_locale_independent = strftime "%Y-%m-%d %H:%M:%S %Z", @now;
my $trace_log_filename = "$logdir/log";
-my $amdump_log_filename = "$logdir/amdump";
+my $amdump_log_filename_default = "$logdir/amdump";
+my $amdump_log_filename = "$logdir/amdump.$timestamp";
my $exit_code = 0;
my $amdump_log = \*STDERR;
}
sub do_amcleanup {
- return unless -f $amdump_log_filename || -f $trace_log_filename;
+ return unless -f $amdump_log_filename_default || -f $trace_log_filename;
# logfiles are still around. First, try an amcleanup -p to see if
# the actual processes are already dead
run_subprocess("$sbindir/amcleanup", '-p', $config_name, @config_overrides_opts);
# and check again
- return unless -f $amdump_log_filename || -f $trace_log_filename;
+ return unless -f $amdump_log_filename_default || -f $trace_log_filename;
bail_already_running();
}
# 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': $!");
+ unlink $amdump_log_filename_default;
+ symlink $amdump_log_filename, $amdump_log_filename_default;
}
sub planner_driver_pipeline {
my $driver = "$amlibexecdir/driver";
my @no_taper = $opt_no_taper? ('--no-taper'):();
my @from_client = $opt_from_client? ('--from-client'):();
+ my @exact_match = $opt_exact_match? ('--exact-match'):();
check_exec($planner);
check_exec($driver);
close($amdump_log);
exec $planner,
# note that @no_taper must follow --starttime
- $config_name, '--starttime', $timestamp, @no_taper, @from_client, @config_overrides_opts, @hostdisk;
+ $config_name, '--starttime', $timestamp, @no_taper, @from_client, @exact_match, @config_overrides_opts, @hostdisk;
die "Could not exec $planner: $!";
}
debug(" planner: $pl_pid");
sub roll_amdump_logs {
debug("renaming amdump log and trimming old amdump logs (beyond tapecycle+2)");
- # rename all the way along the tapecycle
+ unlink "$amdump_log_filename_default.1";
+ rename $amdump_log_filename_default, "$amdump_log_filename_default.1";
+
+ # keep the latest tapecycle files.
+ my @files = sort {-M $b <=> -M $a} grep { !/^\./ && -f "$_"} <$logdir/amdump.*>;
my $days = getconf($CNF_TAPECYCLE) + 2;
for (my $i = $days-1; $i >= 1; $i--) {
- next unless -f "$amdump_log_filename.$i";
- rename("$amdump_log_filename.$i", "$amdump_log_filename.".($i+1));
+ my $a = pop @files;
+ }
+ foreach my $name (@files) {
+ unlink $name;
+ amdump_log("unlink $name");
}
-
- # now swap the current logfile in
- rename("$amdump_log_filename", "$amdump_log_filename.1");
}
# now do the meat of the amdump work; these operations are ported directly
#! @PERL@
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#! @PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
use warnings;
use Getopt::Long;
+use File::Basename;
+use XML::Simple;
+use IPC::Open3;
use Amanda::Device qw( :constants );
use Amanda::Debug qw( :logging );
use Amanda::Recovery::Planner;
use Amanda::Recovery::Clerk;
use Amanda::Recovery::Scan;
+use Amanda::Extract;
# Interactivity package
package Amanda::Interactivity::amfetchdump;
my ($msg) = @_;
print STDERR <<EOF;
Usage: amfetchdump [-c|-C|-l] [-p|-n] [-a] [-O directory] [-d device]
- [-h|--header-file file|--header-fd fd]i
- [--decrypt|--no-decrypt|--server-decrypt|--client-decrypt]
+ [-h|--header-file file|--header-fd fd]
+ [-decrypt|--no-decrypt|--server-decrypt|--client-decrypt]
[--decompress|--no-decompress|--server-decompress|--client-decompress]
- [-o configoption]* config
+ [--extract --directory directory [--data-path (amanda|directtcp)]
+ [--application-property='NAME=VALUE']*]
+ [-o configoption]* [--exact-match] config
hostname [diskname [datestamp [hostname [diskname [datestamp ... ]]]]]
EOF
print STDERR "ERROR: $msg\n" if $msg;
$opt_assume, $opt_leave, $opt_blocksize, $opt_device, $opt_chdir, $opt_header,
$opt_header_file, $opt_header_fd, @opt_dumpspecs,
$opt_decrypt, $opt_server_decrypt, $opt_client_decrypt,
- $opt_decompress, $opt_server_decompress, $opt_client_decompress);
+ $opt_decompress, $opt_server_decompress, $opt_client_decompress,
+ $opt_extract, $opt_directory, $opt_data_path, %application_property,
+ $opt_exact_match);
my $NEVER = 0;
my $ALWAYS = 1;
'decompress!' => \$opt_decompress,
'server-decompress' => \$opt_server_decompress,
'client-decompress' => \$opt_client_decompress,
+ 'extract' => \$opt_extract,
+ 'directory=s' => \$opt_directory,
+ 'data-path=s' => \$opt_data_path,
+ 'application-property=s' => \%application_property,
+ 'exact-match' => \$opt_exact_match,
'b=s' => \$opt_blocksize,
'd=s' => \$opt_device,
'O=s' => \$opt_chdir,
if (($opt_header and ($opt_header_file or $opt_header_fd))
or ($opt_header_file and $opt_header_fd));
+ $opt_data_path = lc($opt_data_path) if defined ($opt_data_path);
+usage("--data_path must be 'amanda' or 'directtcp'")
+ if (defined $opt_data_path and $opt_data_path ne 'directtcp' and $opt_data_path ne 'amanda');
+
if (defined $opt_leave) {
if (defined $opt_decrypt and $opt_decrypt) {
print STDERR "-l is incompatible with --decrypt\n";
}
}
+if (( defined $opt_directory and !defined $opt_extract) or
+ (!defined $opt_directory and defined $opt_extract)) {
+ print STDERR "Both --directorty and --extract must be set\n";
+ usage();
+}
+if (defined $opt_directory and defined $opt_extract) {
+ $opt_decrypt = 1;
+ if (defined $opt_server_decrypt or defined $opt_client_decrypt) {
+ print STDERR "--server_decrypt or --client-decrypt is incompatible with --extract\n";
+ usage();
+ }
+ $opt_decompress = 1;
+ if (defined $opt_server_decompress || defined $opt_client_decompress) {
+ print STDERR "--server-decompress r --client-decompress is incompatible with --extract\n";
+ usage();
+ }
+ if (defined($opt_leave) +
+ defined($opt_compress) +
+ defined($opt_compress_best)) {
+ print STDERR "Can't use -l -c or -C with --extract\n";
+ usage();
+ }
+ if (defined $opt_pipe) {
+ print STDERR "--pipe is incompatible with --extract\n";
+ usage();
+ }
+ if (defined $opt_header) {
+ print STDERR "--header is incompatible with --extract\n";
+ usage();
+ }
+}
+
if (defined($opt_decrypt) +
defined($opt_server_decrypt) +
defined($opt_client_decrypt) > 1) {
$decompress = $ONLY_CLIENT if defined $opt_client_decompress;
usage("must specify at least a hostname") unless @ARGV;
-@opt_dumpspecs = Amanda::Cmdline::parse_dumpspecs([@ARGV],
- $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP | $Amanda::Cmdline::CMDLINE_PARSE_LEVEL);
+my $cmd_flags = $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP |
+ $Amanda::Cmdline::CMDLINE_PARSE_LEVEL;
+$cmd_flags |= $Amanda::Cmdline::CMDLINE_EXACT_MATCH if $opt_exact_match;
+@opt_dumpspecs = Amanda::Cmdline::parse_dumpspecs([@ARGV], $cmd_flags);
set_config_overrides($config_overrides);
config_init($CONFIG_INIT_EXPLICIT_NAME, $opt_config);
my $exit_status = 0;
my $clerk;
+use Data::Dumper;
sub failure {
my ($msg, $finished_cb) = @_;
print STDERR "ERROR: $msg\n";
+ debug("FAILURE: $msg");
$exit_status = 1;
if ($clerk) {
$clerk->quit(finished_cb => sub {
my $timer;
my $is_tty;
my $delay;
+ my $directtcp = 0;
+ my @directtcp_command;
my $steps = define_steps
cb_ref => \$finished_cb;
my ($errs, $hdr, $xfer_src, $directtcp_supported) = @_;
return failure(join("; ", @$errs), $finished_cb) if $errs;
+ my $dle_str = $hdr->{'dle_str'};
+ my $p1 = XML::Simple->new();
+ my $dle = $p1->XMLin($dle_str);
+
# and set up the destination..
my $dest_fh;
- if ($opt_pipe) {
+ my $xfer_dest;
+ my @filters;
+
+ if (defined $opt_data_path and $opt_data_path eq 'directtcp' and !$directtcp_supported) {
+ return failure("The device can't do directtcp", $finished_cb);
+ }
+ $directtcp_supported = 0 if defined $opt_data_path and $opt_data_path eq 'amanda';
+ if ($opt_extract) {
+ my $program = uc(basename($hdr->{program}));
+ my @argv;
+ if ($program ne "APPLICATION") {
+ $directtcp_supported = 0;
+ my %validation_programs = (
+ "STAR" => [ $Amanda::Constants::STAR, qw(-x -f -) ],
+ "DUMP" => [ $Amanda::Constants::RESTORE, qw(xbf 2 -) ],
+ "VDUMP" => [ $Amanda::Constants::VRESTORE, qw(xf -) ],
+ "VXDUMP" => [ $Amanda::Constants::VXRESTORE, qw(xbf 2 -) ],
+ "XFSDUMP" => [ $Amanda::Constants::XFSRESTORE, qw(-v silent) ],
+ "TAR" => [ $Amanda::Constants::GNUTAR, qw(--ignore-zeros -xf -) ],
+ "GTAR" => [ $Amanda::Constants::GNUTAR, qw(--ignore-zeros -xf -) ],
+ "GNUTAR" => [ $Amanda::Constants::GNUTAR, qw(--ignore-zeros -xf -) ],
+ "SMBCLIENT" => [ $Amanda::Constants::GNUTAR, qw(-xf -) ],
+ "PKZIP" => undef,
+ );
+ if (!exists $validation_programs{$program}) {
+ return failure("Unknown program '$program' in header; no validation to perform",
+ $finished_cb);
+ }
+ @argv = $validation_programs{$program};
+ } else {
+ if (!defined $hdr->{application}) {
+ return failure("Application not set", $finished_cb);
+ }
+ my $program_path = $Amanda::Paths::APPLICATION_DIR . "/" .
+ $hdr->{application};
+ if (!-x $program_path) {
+ return failure("Application '" . $hdr->{application} .
+ "($program_path)' not available on the server",
+ $finished_cb);
+ }
+ my %bsu_argv;
+ $bsu_argv{'application'} = $hdr->{application};
+ $bsu_argv{'config'} = $opt_config;
+ $bsu_argv{'host'} = $hdr->{'name'};
+ $bsu_argv{'disk'} = $hdr->{'disk'};
+ $bsu_argv{'device'} = $dle->{'diskdevice'} if defined $dle->{'diskdevice'};
+ my ($bsu, $err) = Amanda::Extract::BSU(%bsu_argv);
+ if (defined $opt_data_path and $opt_data_path eq 'directtcp' and
+ !$bsu->{'data-path-directtcp'}) {
+ return failure("The application can't do directtcp", $finished_cb);
+ }
+ if ($directtcp_supported and !$bsu->{'data-path-directtcp'}) {
+ # application do not support directtcp
+ $directtcp_supported = 0;
+ }
+
+ push @argv, $program_path, "restore";
+ push @argv, "--config", $opt_config;
+ push @argv, "--host", $hdr->{'name'};
+ push @argv, "--disk", $hdr->{'disk'};
+ push @argv, "--device", $dle->{'diskdevice'} if defined ($dle->{'diskdevice'});
+ push @argv, "--level", $hdr->{'dumplevel'};
+ push @argv, "--directory", $opt_directory;
+
+ # add application_property
+ while (my($name, $value) = each(%application_property)) {
+ push @argv, "--".$name, $value if $value;
+ }
+
+ #merge property from header;
+ while (my($name, $value) = each (%{$dle->{'backup-program'}->{'property'}})) {
+ if (!exists $application_property{$name}) {
+ push @argv, "--".$name, $value->{'value'};
+ }
+ }
+
+ }
+ $directtcp = $directtcp_supported;
+ if ($directtcp_supported) {
+ $xfer_dest = Amanda::Xfer::Dest::DirectTCPListen->new();
+ @directtcp_command = @argv;
+ } else {
+ # set up the extraction command as a filter element, since
+ # we need its stderr.
+ debug("Running: ". join(' ',@argv));
+ push @filters, Amanda::Xfer::Filter::Process->new(\@argv, 0);
+
+ $dest_fh = \*STDOUT;
+ $xfer_dest = Amanda::Xfer::Dest::Fd->new($dest_fh);
+ }
+ } elsif ($opt_pipe) {
$dest_fh = \*STDOUT;
+ $xfer_dest = Amanda::Xfer::Dest::Fd->new($dest_fh);
} else {
my $filename = sprintf("%s.%s.%s.%d",
$hdr->{'name'},
if (!open($dest_fh, ">", $filename)) {
return failure("Could not open '$filename' for writing: $!", $finished_cb);
}
+ $xfer_dest = Amanda::Xfer::Dest::Fd->new($dest_fh);
}
$timer = Amanda::MainLoop::timeout_source($delay);
}
});
- my $xfer_dest = Amanda::Xfer::Dest::Fd->new($dest_fh);
-
- my $dle = $hdr->get_dle();
-
# set up any filters that need to be applied; decryption first
- my @filters;
if ($hdr->{'encrypted'} and
(($hdr->{'srv_encrypt'} and ($decrypt == $ALWAYS || $decrypt == $ONLY_SERVER)) ||
($hdr->{'clnt_encrypt'} and ($decrypt == $ALWAYS || $decrypt == $ONLY_CLIENT)))) {
if ($hdr->{'compressed'} and not $opt_compress and
(($hdr->{'srvcompprog'} and ($decompress == $ALWAYS || $decompress == $ONLY_SERVER)) ||
($hdr->{'clntcompprog'} and ($decompress == $ALWAYS || $decompress == $ONLY_CLIENT)) ||
- ($dle->{'compress'} == $Amanda::Config::COMP_SERVER_FAST and ($decompress == $ALWAYS || $decompress == $ONLY_SERVER)) ||
- ($dle->{'compress'} == $Amanda::Config::COMP_SERVER_BEST and ($decompress == $ALWAYS || $decompress == $ONLY_SERVER)) ||
- ($dle->{'compress'} == $Amanda::Config::COMP_FAST and ($decompress == $ALWAYS || $decompress == $ONLY_CLIENT)) ||
- ($dle->{'compress'} == $Amanda::Config::COMP_BEST and ($decompress == $ALWAYS || $decompress == $ONLY_CLIENT)))) {
+ ($dle->{'compress'} and $dle->{'compress'} eq "SERVER-FAST" and ($decompress == $ALWAYS || $decompress == $ONLY_SERVER)) ||
+ ($dle->{'compress'} and $dle->{'compress'} eq "SERVER-BEST" and ($decompress == $ALWAYS || $decompress == $ONLY_SERVER)) ||
+ ($dle->{'compress'} and $dle->{'compress'} eq "FAST" and ($decompress == $ALWAYS || $decompress == $ONLY_CLIENT)) ||
+ ($dle->{'compress'} and $dle->{'compress'} eq "BEST" and ($decompress == $ALWAYS || $decompress == $ONLY_CLIENT)))) {
# need to uncompress this file
if ($hdr->{'encrypted'}) {
print "Not decompressing because the backup image is not decrypted\n";
$buffer .= $b;
if ($b eq "\n") {
my $line = $buffer;
- print STDERR "filter stderr: $line";
chomp $line;
- debug("filter stderr: $line");
+ if (length($line) > 1) {
+ print STDERR "filter stderr: $line\n";
+ debug("filter stderr: $line");
+ }
$buffer = "";
}
}
});
}
- my $xfer = Amanda::Xfer->new([ $xfer_src, @filters, $xfer_dest ]);
+ my $xfer;
+ if (@filters) {
+ $xfer = Amanda::Xfer->new([ $xfer_src, @filters, $xfer_dest ]);
+ } else {
+ $xfer = Amanda::Xfer->new([ $xfer_src, $xfer_dest ]);
+ }
$xfer->start($steps->{'handle_xmsg'}, 0, $current_dump->{'bytes'});
$clerk->start_recovery(
xfer => $xfer,
recovery_cb => $steps->{'recovery_cb'});
+ if ($directtcp) {
+ my $addr = $xfer_dest->get_addrs();
+ push @directtcp_command, "--data-path", "DIRECTTCP";
+ push @directtcp_command, "--direct-tcp", "$addr->[0]->[0]:$addr->[0]->[1]";
+ debug("Running: ". join(' ', @directtcp_command));
+
+ my ($wtr, $rdr);
+ my $err = Symbol::gensym;
+ my $amndmp_pid = open3($wtr, $rdr, $err, @directtcp_command);
+ $amndmp_pid = $amndmp_pid;
+ my $file_to_close = 2;
+ my $amndmp_stdout_src = Amanda::MainLoop::fd_source($rdr,
+ $G_IO_IN|$G_IO_HUP|$G_IO_ERR);
+ my $amndmp_stderr_src = Amanda::MainLoop::fd_source($err,
+ $G_IO_IN|$G_IO_HUP|$G_IO_ERR);
+
+ $amndmp_stdout_src->set_callback( sub {
+ my $line = <$rdr>;
+ if (!defined $line) {
+ $file_to_close--;
+ $amndmp_stdout_src->remove();
+ if ($file_to_close == 0) {
+ #abort the xfer
+ $xfer->cancel() if $xfer->get_status != $XFER_DONE;
+ }
+ return;
+ }
+ chomp $line;
+ debug("amndmp stdout: $line");
+ print "$line\n";
+ });
+ $amndmp_stderr_src->set_callback( sub {
+ my $line = <$err>;
+ if (!defined $line) {
+ $file_to_close--;
+ $amndmp_stderr_src->remove();
+ if ($file_to_close == 0) {
+ #abort the xfer
+ $xfer->cancel() if $xfer->get_status != $XFER_DONE;
+ }
+ return;
+ }
+ chomp $line;
+ debug("amndmp stderr: $line");
+ print STDERR "$line\n";
+ });
+ }
};
step handle_xmsg => sub {
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
static struct option long_options[] = {
{"version" , 0, NULL, 1},
+ {"exact-match" , 0, NULL, 2},
{NULL, 0, NULL, 0}
};
char **config_options;
find_result_t *holding_files;
disklist_t holding_disklist = { NULL, NULL };
+ gboolean exact_match = FALSE;
/*
* Configure program for internationalization:
case 1 : printf("amflush-%s\n", VERSION);
return(0);
break;
-
+ case 2 : exact_match = TRUE;
+ break;
case 'b': batch = 1;
break;
case 'f': foreground = 1;
}
if(argc < 1) {
- error(_("Usage: amflush [-b] [-f] [-s] [-D date]* [-o configoption]* <confdir> [host [disk]* ]*"));
+ error(_("Usage: amflush [-b] [-f] [-s] [-D date]* [--exact-match] [-o configoption]* <confdir> [host [disk]* ]*"));
/*NOTREACHED*/
}
* dumps will be filtered properly by match_disklist, setting the dp->todo
* flag appropriately. */
- errstr = match_disklist(&diskq, argc-1, argv+1);
+ errstr = match_disklist(&diskq, exact_match, argc-1, argv+1);
if (errstr) {
g_printf(_("%s"),errstr);
amfree(errstr);
for(dp = diskq.head; dp != NULL; dp = dp->next) {
if(dp->todo) {
- char *qname;
- qname = quote_string(dp->name);
- log_add(L_DISK, "%s %s", dp->host->hostname, qname);
- amfree(qname);
+ /* is it holding_list */
+ for (holding_file=holding_list; holding_file != NULL;
+ holding_file = holding_file->next) {
+ dumpfile_t file;
+ holding_file_get_dumpfile((char *)holding_file->data, &file);
+ if (g_str_equal(dp->host->hostname, file.name) &&
+ g_str_equal(dp->name, file.disk)) {
+ char *qname;
+ qname = quote_string(dp->name);
+ log_add(L_DISK, "%s %s", dp->host->hostname, qname);
+ amfree(qname);
+ }
+ }
}
}
#! @PERL@
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
#! @PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#! @PERL@
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#!@PERL@
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#! @PERL@
# Copyright (c) 2010-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#! @PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
print STDERR "$msg\n" if $msg;
print STDERR <<EOF;
Usage: amrestore [--config config] [-b blocksize] [-r|-c|-C] [-p] [-h]
- [-f filenum] [-l label] [-o configoption]*
+ [-f filenum] [-l label] [--exact-match] [-o configoption]*
{device | [--holding] holdingfile}
[hostname [diskname [datestamp [hostname [diskname [datestamp ... ]]]]]]"));
EOF
my $config_overrides = new_config_overrides($#ARGV+1);
my ($opt_config, $opt_blocksize, $opt_raw, $opt_compress, $opt_compress_best,
- $opt_pipe, $opt_header, $opt_filenum, $opt_label, $opt_holding, $opt_restore_src);
+ $opt_pipe, $opt_header, $opt_filenum, $opt_label, $opt_holding, $opt_restore_src, $opt_exact_match);
debug("Arguments: " . join(' ', @ARGV));
Getopt::Long::Configure(qw(bundling));
'help|usage|?' => \&usage,
'config=s' => \$opt_config,
'holding' => \$opt_holding,
+ 'exact-match' => \$opt_exact_match,
'b=i' => \$opt_blocksize,
'r' => \$opt_raw,
'c' => \$opt_compress,
if (Amanda::Holding::get_header($opt_restore_src));
}
-my @opt_dumpspecs = Amanda::Cmdline::parse_dumpspecs([@ARGV],
- $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP);
+my $cmd_flags = $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP;
+$cmd_flags |= $Amanda::Cmdline::CMDLINE_EXACT_MATCH if $opt_exact_match;
+my @opt_dumpspecs = Amanda::Cmdline::parse_dumpspecs([@ARGV], $cmd_flags);
usage("Cannot check a label on a holding-disk file")
if ($opt_holding and $opt_label);
#
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
my $keep_label;
my $verbose = 1;
my $help;
-my $logdir;
-my $log_file;
-my $log_created = 0;
-
-sub die_handler {
- if ($log_created == 1) {
- unlink $log_file;
- $log_created = 0;
- }
-}
-$SIG{__DIE__} = \&die_handler;
-
-sub int_handler {
- if ($log_created == 1) {
- unlink $log_file;
- $log_created = 0;
- }
- die "Interrupted\n";
-}
-$SIG{INT} = \&int_handler;
sub usage() {
print <<EOF
}
Amanda::Util::finish_setup($RUNNING_AS_DUMPUSER);
-$logdir = config_dir_relative(getconf($CNF_LOGDIR));
-$log_file = "$logdir/log";
-
-if ($erase) {
- # Check for log file existance
- if (-e $log_file) {
- `amcleanup -p $config_name`;
- }
-
- if (-e $log_file) {
- local *LOG;
- open(LOG, $log_file);
- my $info_line = <LOG>;
- close LOG;
- $info_line =~ /^INFO (.*) .* pid .*$/;
- my $process_name = $1;
- print "$process_name is running, or you must run amcleanup\n";
- exit 1;
- }
-}
# amadmin may later try to load this and will die if it has errors
# load it now to catch the problem sooner (before we might erase data)
$tapelist->write();
}
- my $tmp_curinfo_file = "$AMANDA_TMPDIR/curinfo-amrmtape-" . time();
+ my $tmp_curinfo_file = "$AMANDA_TMPDIR/curinfo-amrmtape-" . time() . "-" . $$;
unless (open(AMADMIN, "$amadmin $config_name export |")) {
die "Failed to execute $amadmin: $! $?";
}
- open(CURINFO, ">$tmp_curinfo_file");
+ open(CURINFO, ">$tmp_curinfo_file") or
+ die "Failed to open $tmp_curinfo_file for writing: $! $?";
sub info_line($) {
print CURINFO "$_[0]";
my $erase_volume = make_cb('erase_volume' => sub {
if ($erase) {
- $log_created = 1;
- local *LOG;
- open(LOG, ">$log_file");
- print LOG "INFO amrmtape amrmtape pid $$\n";
- close LOG;
my $chg = Amanda::Changer->new($changer_name, tapelist => $tapelist);
$chg->load(
'label' => $label,
$erase_volume->();
Amanda::MainLoop::run();
-if ($log_created == 1) {
- unlink $log_file;
- $log_created = 0;
-}
-
Amanda::Util::finish_application();
#
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
open(AMDUMP,"<$errfile") || die("$errfile: $!");
print "Using $errfile\n";
-my $taper_status_file;
+my %taper_status_file;
$start_degraded_mode = 0;
$partition = $line[11];
$hostpart=&make_hostpart($host,$partition,$gdatestamp);
$serial=$line[7];
+ $dumper_to_serial{$line[5]} = $serial;
$dump_started{$hostpart}=1;
$dump_time{$hostpart}=$current_time;
$dump_finished{$hostpart}=0;
$partition=$line[11];
$hostpart=&make_hostpart($host,$partition,$gdatestamp);
$serial=$line[7];
+ $chunker_to_serial{$line[5]} = $serial;
$serial{$serial}=$hostpart;
$holding_file{$hostpart}=$line[8];
#$chunk_started{$hostpart}=1;
}
elsif($line[6] eq "FILE-WRITE") {
#7:name 8:handle 9:filename 10:host 11:disk 12:level 13:datestamp 14:splitsize
+ $name=$line[7];
$serial=$line[8];
$host=$line[10];
$partition=$line[11];
$taper_finished{$hostpart}=0;
$taper_time{$hostpart}=$current_time;
$taper_error{$hostpart}="";
- $ntchunk_size = 0;
+ $taper_name{$hostpart} = $name;
+ $worker_to_serial{$name} = $serial;
+ $tapedsize{$hostpart} = 0;
}
elsif($line[6] eq "PORT-WRITE") {
#7:name 8:handle 9:host 10:disk 11:level 12:datestamp 13:splitsize 14:diskbuffer 15:fallback_splitsize
+ $name=$line[7];
$serial=$line[8];
$host=$line[9];
$partition=$line[10];
$taper_finished{$hostpart}=0;
$taper_time{$hostpart}=$current_time;
$taper_error{$hostpart}="";
+ $taper_name{$hostpart} = $name;
+ $worker_to_serial{$name} = $serial;
+ $tapedsize{$hostpart} = 0;
$size{$hostpart} = 0;
- $ntchunk_size = 0;
+ }
+ elsif($line[6] eq "TAKE-SCRIBE-FROM") {
+ #7:name1 #8:handle #9:name2
+ $name1=$line[7];
+ $serial=$line[8];
+ $name2=$line[9];
+ $hostpart=$serial{$serial};
+ $taper_nb{$name1} = $taper_nb{$name2};
+ $taper_nb{$name2} = 0;
+ if (defined $hostpart) {
+ $error{$hostpart} = $olderror{$hostpart};
+ }
}
}
}
#print "result: " , $line[5] . " " . $line[6] . " " . $line[7] . "\n" if defined $line[5] && defined $line[6] && defined $line[7];
$current_time = $line[3];
if($line[5] =~ /dumper\d+/) {
+ if($line[6] eq "(eof)") {
+ $line[6] = "FAILED";
+ $line[7] = $dumper_to_serial{$line[5]};
+ $line[8] = "dumper CRASH";
+ }
if($line[6] eq "FAILED" || $line[6] eq "TRY-AGAIN") {
#7:handle 8:message
$serial = $line[7];
}
}
elsif($line[5] =~ /chunker\d+/) {
+ if($line[6] eq "(eof)") {
+ $line[6] = "FAILED";
+ $line[7] = $chunker_to_serial{$line[5]};
+ $line[8] = "chunker CRASH";
+ }
if($line[6] eq "DONE" || $line[6] eq "PARTIAL") {
#7:handle 8:size
$serial=$line[7];
}
}
elsif($line[5] eq "taper") {
- if($line[6] eq "DONE" || $line[6] eq "PARTIAL") {
+ if($line[6] eq "(eof)") {
+ # all worker fail
+ foreach $worker (keys %worker_to_serial) {
+ $serial = $worker_to_serial{$worker};
+ $hostpart=$serial{$serial};
+ if(defined $hostpart) {
+ $error= "taper CRASH";
+ $taper_finished{$hostpart} = -2;
+ $status_taper = $error;
+ $busy_time{"taper"}+=($current_time-$taper_time{$hostpart});
+ $taper_time{$hostpart}=$current_time;
+ $error{$hostpart}="$error";
+ undef $worker_to_serial{$worker};
+ }
+ undef $taper_status_file{$hostpart};
+ }
+ }
+ elsif($line[6] eq "DONE" || $line[6] eq "PARTIAL") {
#DONE: 7:handle 8:label 9:filenum 10:errstr
#PARTIAL: 7:handle 8:INPUT-* 9:TAPE-* 10:errstr 11:INPUT-MSG 12:TAPE-MSG
$serial=$line[7];
if(!defined $size{$hostpart}) {
$size{$hostpart}=$size;
}
- $ntpartition{$nb_tape}++;
- $ntsize{$nb_tape} += $size{$hostpart} - $ntchunk_size;
- if(defined $esize{$hostpart} && $esize{$hostpart} > 1) {
- $ntesize{$nb_tape} += $esize{$hostpart} - $ntchunk_size;
- }
- else {
- $ntesize{$nb_tape} += $size{$hostpart} - $ntchunk_size;
- }
+ $ntape = $taper_nb{$taper_name{$hostpart}};
+ $ntpartition{$ntape}++ if defined $ntape;
if ($line[6] eq "PARTIAL") {
$partial{$hostpart} = 1;
if ($line[9] eq "TAPE-ERROR") {
else {
$partial{$hostpart} = 0;
}
- if ($ntchunk_size > 0) {
- $ntchunk{$nb_tape}++;
- }
- undef $taper_status_file;
+ undef $taper_status_file{$hostpart};
+ undef $worker_to_serial{$taper_name{$hostpart}};
}
elsif($line[6] eq "PARTDONE") {
#7:handle 8:label 9:filenum 10:ksize 11:errstr
#$size=$1 / $unitdivisor;
$size=$line[10] / $unitdivisor;
$tapedsize{$hostpart} += $size;
- $ntchunk{$nb_tape}++;
- $ntsize{$nb_tape} += $size;
- $ntesize{$nb_tape} += $size;
- $ntchunk_size += $size;
+ $ntape = $taper_nb{$taper_name{$hostpart}};
+ $ntchunk{$ntape}++;
+ $ntsize{$ntape} += $size;
+ $ntesize{$ntape} += $size;
}
elsif($line[6] eq "REQUEST-NEW-TAPE") {
#7:serial
$old_status_taper = $status_taper;
$status_taper = "Asking for a new tape";
$hostpart=$serial{$serial};
- if (defined $hostpart) {
+ if (defined $hostpart and
+ !defined($olderror{$hostpart})) {
$olderror{$hostpart} = $error{$hostpart};
$error{$hostpart} = "waiting for a new tape";
}
$serial=$line[7];
$status_taper = $old_status_taper;
$hostpart=$serial{$serial};
+ $nb_tape++;
+ $taper_nb{$taper_name{$hostpart}} = $nb_tape;
+ $label = $line[8];
+ $ntlabel{$nb_tape} = $label;
+ $ntpartition{$nb_tape} = 0;
+ $ntsize{$nb_tape} = 0;
+ $ntesize{$nb_tape} = 0;
if (defined $hostpart) {
$error{$hostpart} = $olderror{$hostpart};
}
$error=$line[8];
$status_taper = $error;
$exit_status |= $STATUS_TAPE;
- undef $taper_status_file;
+ undef $taper_status_file{$hostpart};
}
elsif($line[6] eq "FAILED") {
#7:handle 8:INPUT- 9:TAPE- 10:input_message 11:tape_message
- $serial=$line[7];
+ $serial=$line[7];
$hostpart=$serial{$serial};
if(defined $hostpart) {
if($line[9] eq "TAPE-ERROR") {
$error=$line[11];
$taper_finished{$hostpart} = -2;
$status_taper = $error;
- }
- else {
- $error=$line[10];
+ } elsif($line[9] eq "TAPE-CONFIG") {
+ $tape_config{$hostpart} = $error;
+ $error=$line[11];
+ $tape_config{$hostpart} = $error;
+ $taper_finished{$hostpart} = -2;
+ $status_taper = $error;
+ } else { # INPUT-ERROR
+ $error = $line[10];
+ $error = $error{$hostpart} if defined $error{$hostpart};
$taper_finished{$hostpart} = -1;
$status_taper = "Idle";
}
$taper_time{$hostpart}=$current_time;
$error{$hostpart}="$error";
}
- undef $taper_status_file;
+ undef $taper_status_file{$hostpart};
+ undef $worker_to_serial{$taper_name{$hostpart}};
}
}
}
}
}
}
- elsif($line[1] eq "FINISHED") {
+ elsif($line[1] eq "FINISHED") {
$driver_finished = 1;
}
}
elsif($line[0] eq "taper") {
if($line[1] eq "wrote") {
#1:"wrote" 2:"label" 3:label
- $nb_tape++;
- $label = $line[3];
- $ntlabel{$nb_tape} = $label;
- $ntpartition{$nb_tape} = 0;
- $ntsize{$nb_tape} = 0;
- $ntesize{$nb_tape} = 0;
+ #$nb_tape++;
+ #$label = $line[3];
+ #$ntlabel{$nb_tape} = $label;
+ #$ntpartition{$nb_tape} = 0;
+ #$ntsize{$nb_tape} = 0;
+ #$ntesize{$nb_tape} = 0;
}
elsif($line[1] eq "status" && $line[2] eq "file") {
#1:"status" #2:"file:" #3:hostname #4:diskname #5:filename
- $taper_status_file = $line[5];
+ #$host = $line[3];
+ #$partition = $line[4];
+ #Which datestamp to use?
+ #$hostpart=&make_hostpart($host,$partition,$datestamp);
+ #assume $hostpart is already set.
+ $taper_status_file{$hostpart} = $line[5];
}
}
elsif($line[0] eq "splitting" &&
$ntchunk{$nb_tape}++;
$ntsize{$nb_tape} += $size / $unitdivisor;
$ntesize{$nb_tape} += $size / $unitdivisor;
- $ntchunk_size += $size / $unitdivisor;
}
else {
#print "Ignoring: $lineX\n";
$in_flush=1;
}
if(defined $taper_started{$hostpart} &&
- $taper_started{$hostpart}==1 &&
- $dump_finished{$hostpart}!=-3) {
+ $taper_started{$hostpart}==1) {
if(defined $dump_started{$hostpart} &&
$dump_started{$hostpart} == 1 &&
$dump_finished{$hostpart} == -1) {
}
print " dumping to tape";
$size = $tapedsize{$hostpart};
- if ($taper_status_file && -f $taper_status_file &&
- open FF, "<$taper_status_file") {
+ if ($taper_status_file{$hostpart} && -f $taper_status_file{$hostpart} &&
+ open FF, "<$taper_status_file{$hostpart}") {
$line = <FF>;
if (defined $line) {
chomp $line;
$exit_status |= $STATUS_FAILED;
}
if($in_flush == 0) {
- print " dump done," if defined $dump_finished{$hostpart} && $dump_finished{$hostpart} == 1;
+ if (defined $dump_finished{$hostpart}) {
+ if ($dump_finished{$hostpart} == 1) {
+ print " dump done,";
+ } else {
+ $exit_status |= $STATUS_FAILED;
+ print " dump failed: ", $error{$hostpart}, ",";
+ $fpartition++;
+ $fsize+=$esize{$hostpart};
+ }
+ }
print " writing to tape";
}
else {
print " flushing to tape";
}
$size = $tapedsize{$hostpart};
- if ($taper_status_file && -f $taper_status_file &&
- open FF, "<$taper_status_file") {
+ if ($taper_status_file{$hostpart} && -f $taper_status_file{$hostpart} &&
+ open FF, "<$taper_status_file{$hostpart}") {
$line = <FF>;
if (defined $line) {
chomp $line;
}
close FF;
}
- if(defined($size)) {
+ if(defined($size) and defined($size{$hostpart}) and $size{$hostpart} > 0) {
printf " (%d$unit done (%0.2f%%))", $size, 100.0 * $size/$size{$hostpart};
}
if( defined $starttime ) {
print " (", &showtime($taper_time{$hostpart}), ")";
}
print ", ", $error{$hostpart} if (defined($error{$hostpart}) &&
- $error{$hostpart} ne "");
+ $error{$hostpart} ne "" &&
+ (!defined $dump_finished{$hostpart} ||
+ $dump_finished{$hostpart} != -3));
print "\n";
}
$tapartition++;
printf "%8s ", $datestamp if defined $opt_date;
printf "%-${maxnamelength}s%2d ", "$host:$qpartition", $level{$hostpart};
printf "%9d$unit", $xsize;
- print " dump done," if defined $dump_finished{$hostpart} && $dump_finished{$hostpart} == 1;
+ print " dump done," if defined $dump_finished{$hostpart} && $dump_finished{$hostpart} == 1;
if($in_flush == 0) {
- print " failed to tape";
+ if ($tape_config{$hostpart}) {
+ print " taping delayed because of config";
+ } else {
+ print " failed to tape";
+ }
}
else {
- print " failed to flush";
+ if ($tape_config{$hostpart}) {
+ print " flushing delayed because of config";
+ } else {
+ print " failed to flush";
+ }
}
print ": ",$error{$hostpart} if defined $error{$hostpart};
printf "%-${maxnamelength}s%2d ", "$host:$qpartition", $level{$hostpart};
printf "%9d$unit", $size{$hostpart};
if($in_flush == 0) {
+ if (defined $dump_finished{$hostpart} && $dump_finished{$hostpart} == -3) {
+ $exit_status |= $STATUS_FAILED;
+ print " dump failed: ", $error{$hostpart}, ",";
+ $fpartition++;
+ $fsize+=$esize{$hostpart};
+ }
print " finished";
}
else {
sub showtime() {
- my($delta)=shift;
- my($oneday)=24*60*60;
+ my($delta) = shift;
+ my($oneday) = 24*60*60;
+
+ my @starttime = localtime($starttime);
+ my @now = localtime($starttime+$delta);
+ $now_yday = $now[7];
+
+ # leap year
+ if ($starttime[5] < $now[5]) {
+ my $days_in_year = 364;
+ my $startime1 = $starttime;
+ while ($startime1 < $starttime+$delta) {
+ my @starttime1 = localtime($starttime);
+ if ($starttime1[7] > $days_in_year) {
+ $days_in_year = $starttime1[7];
+ }
+ $startime1 += $oneday;
+ }
+ $now_yday += $days_in_year+1;
+ }
- @now=localtime($starttime+$delta);
- if($delta > $oneday) {
- $result=sprintf("%d+",$delta/$oneday);
+ if ($starttime[7] < $now_yday) {
+ $result=sprintf("%d+", $now_yday - $starttime[7]);
} else {
$result="";
}
#! @PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
return;
} elsif ($err->volinuse and defined $err->{'slot'}) {
$last_slot = $err->{'slot'};
+ print STDERR sprintf("slot %3s: in use\n", $last_slot);
+ } elsif ($err->empty and defined $err->{'slot'}) {
+ $last_slot = $err->{'slot'};
+ print STDERR sprintf("slot %3s: empty\n", $last_slot);
} else {
return failure($err, $finished_cb) if $err;
}
} else {
print STDERR sprintf("slot %3s: %s\n", $last_slot, $dev->error_or_status());
}
- } else {
- print STDERR sprintf("slot %3s: in use\n", $last_slot);
}
if ($res) {
for my $sl (@$inv) {
my $line = "slot $sl->{slot}:";
+ my $tle;
if (!defined($sl->{device_status}) && !defined($sl->{label})) {
$line .= " unknown state";
} elsif ($sl->{'state'} == Amanda::Changer::SLOT_EMPTY) {
} else {
if (defined $sl->{label}) {
$line .= " label $sl->{label}";
- my $tle = $tl->lookup_tapelabel($sl->{label});
- if ($tle->{'meta'}) {
- $line .= " ($tle->{'meta'})";
+ $tle = $tl->lookup_tapelabel($sl->{label});
+ if (defined $tle) {
+ if ($tle->{'meta'}) {
+ $line .= " ($tle->{'meta'})";
+ }
}
} elsif ($sl->{'device_status'} == $DEVICE_STATUS_VOLUME_UNLABELED) {
$line .= " blank";
if ($sl->{'current'}) {
$line .= " (current)";
}
+ if (defined $tle) {
+ if (defined $sl->{'barcode'} and
+ defined $tle->{'barcode'} and
+ $sl->{'barcode'} ne $tle->{'barcode'}) {
+ $line .= " MISTMATCH barcode in tapelist: $tle->{'barcode'}";
+ }
+ }
# note that inventory goes to stdout
print "$line\n";
sub failure {
my ($msg, $finished_cb) = @_;
- print STDERR "ERROR: $msg\n";
+ if ($msg->isa("Amanda::Changer::Error") and defined $msg->{'slot'}) {
+ print STDERR "ERROR: Slot: $msg->{'slot'}: $msg\n";
+ } else {
+ print STDERR "ERROR: $msg\n";
+ }
$exit_status = 1;
$finished_cb->();
}
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
#! @PERL@
# Copyright (c) 2008-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
my $xfers_finished = sub {
my ($err) = @_;
- $self->failure($err) if $err;
+ return $self->failure($err) if $err;
$self->quit(0);
};
Usage: amvault [-o configoption...] [-q] [--quiet] [-n] [--dry-run]
[--fulls-only] [--export] [--src-timestamp src-timestamp]
+ [--exact-match]
--label-template label-template --dst-changer dst-changer
[--autolabel autolabel-arg...]
config
my $opt_quiet = 0;
my $opt_dry_run = 0;
my $opt_fulls_only = 0;
+my $opt_exact_match = 0;
my $opt_export = 0;
my $opt_autolabel = {};
my $opt_autolabel_seen = 0;
'q|quiet' => \$opt_quiet,
'n|dry-run' => \$opt_dry_run,
'fulls-only' => \$opt_fulls_only,
+ 'exact-match' => \$opt_exact_match,
'export' => \$opt_export,
'label-template=s' => \&set_label_template,
'autolabel=s' => \&add_autolabel,
usage("not enough arguments") unless (@ARGV >= 1);
my $config_name = shift @ARGV;
-my @opt_dumpspecs = parse_dumpspecs(\@ARGV, $CMDLINE_PARSE_DATESTAMP|$CMDLINE_PARSE_LEVEL)
+my $cmd_flags = $CMDLINE_PARSE_DATESTAMP|$CMDLINE_PARSE_LEVEL;
+$cmd_flags |= $CMDLINE_EXACT_MATCH if $opt_exact_match;
+my @opt_dumpspecs = parse_dumpspecs(\@ARGV, $cmd_flags)
if (@ARGV);
usage("no --label-template given") unless $opt_autolabel->{'template'};
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
enum { ARG_GET_HOST, ARG_GET_DISK, ARG_GET_DATESTAMP, ARG_GET_LEVEL } arg_state = ARG_GET_HOST;
while (optind < argc) {
+ char *new_name = NULL;
name = argv[optind];
+ if (flags & CMDLINE_EXACT_MATCH && *name != '=') {
+ new_name = g_strconcat("=", name, NULL);
+ name = new_name;
+ }
switch (arg_state) {
case ARG_GET_HOST:
arg_state = ARG_GET_DISK;
arg_state = ARG_GET_HOST;
if (!(flags & CMDLINE_PARSE_LEVEL)) continue;
if (name[0] != '\0'
+ && !(flags & CMDLINE_EXACT_MATCH)
&& (errstr=validate_regexp(name)) != NULL) {
error(_("bad level regex \"%s\": %s\n"), name, errstr);
}
dumpspec->level = stralloc(name);
break;
}
+ amfree(new_name);
optind++;
}
/*
* Copyright (c) 2007-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
*
* All strings in this struct are independently malloc()ed.
*/
-typedef struct dumpspec_s {
+typedef struct dumpspec_t {
char *host;
char *disk;
char *datestamp;
# define CMDLINE_PARSE_LEVEL (1<<1)
/* an empty argv should result in a wildcard dumpspec */
# define CMDLINE_EMPTY_TO_WILDCARD (1<<2)
+ /* use exact match instead of host and disk expression */
+# define CMDLINE_EXACT_MATCH (1<<3)
/*
* Formatting
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
amfree(hostname);
return (-1);
}
- if ((dtype = lookup_dumptype(dumptype)) == NULL) {
+ if (lookup_dumptype(dumptype) == NULL) {
diskdevice = dumptype;
skip_whitespace(s, ch);
if(ch == '\0' || ch == '#') {
char *
match_disklist(
disklist_t *origqp,
+ gboolean exact_match,
int sargc,
char ** sargv)
{
int prev_match;
disk_t *dp_skip;
disk_t *dp;
+ char **new_sargv = NULL;
if(sargc <= 0)
return NULL;
+ if (exact_match) {
+ new_sargv = g_new0(char *, sargc+1);
+ for (i=0; i<sargc; i++) {
+ if (*sargv[i] == '=') {
+ new_sargv[i] = g_strdup(sargv[i]);
+ } else {
+ new_sargv[i] = g_strconcat("=", sargv[i], NULL);
+ }
+ }
+ sargv = new_sargv;
+ }
+
+
for(dp = origqp->head; dp != NULL; dp = dp->next) {
if(dp->todo == 1)
dp->todo = -1;
dp->todo = 0;
}
+ if (new_sargv) {
+ for (i=0; i<sargc; i++)
+ g_free(new_sargv[i]);
+ g_free(new_sargv);
+ }
return errstr;
}
gboolean
match_dumpfile(
dumpfile_t *file,
+ gboolean exact_match,
int sargc,
char ** sargv)
{
dl.head = dl.tail = &d;
- (void)match_disklist(&dl, sargc, sargv);
+ (void)match_disklist(&dl, exact_match, sargc, sargv);
return d.todo;
}
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
*/
void disable_skip_disk(disklist_t *origqp);
-char *match_disklist(disklist_t *origqp, int sargc, char **sargv);
-gboolean match_dumpfile(dumpfile_t *file, int sargc, char **sargv);
+char *match_disklist(disklist_t *origqp, gboolean exact_match, int sargc,
+ char **sargv);
+gboolean match_dumpfile(dumpfile_t *file, gboolean exact_match, int sargc,
+ char **sargv);
void free_disklist(disklist_t *dl);
netif_t *disklist_netifs(void);
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
static void continue_port_dumps(void);
static void update_failed_dump(disk_t *);
static int no_taper_flushing(void);
+static int active_dumper(void);
typedef enum {
TAPE_ACTION_NO_ACTION = 0,
identlist_t il;
unsigned long reserve = 100;
char *conf_diskfile;
- char **result_argv = NULL;
char *taper_program;
char *conf_tapetype;
tapetype_t *tape;
amfree(dumper_program);
amfree(taper_program);
- if (result_argv)
- g_strfreev(result_argv);
dbclose();
enqueue_disk(&directq, diskp);
diskp->to_holdingdisk = HOLD_NEVER;
}
- if (empty(*rq)) force_flush = 1;
+ if (empty(*rq) && active_dumper() == 0) { force_flush = 1;}
}
} else if (client_constrained(diskp)) {
free_assignedhd(holdp);
sched(diskp)->level);
dumper_cmd(dumper, PORT_DUMP, diskp, NULL);
}
- diskp->host->start_t = now + 15;
- if (empty(*rq)) force_flush = 1;
+ diskp->host->start_t = now + 5;
+ if (empty(*rq) && active_dumper() == 0) { force_flush = 1;}
if (result_argv)
g_strfreev(result_argv);
taper_nb_wait_reply++;
taper_cmd(PORT_WRITE, diskp, NULL, sched(diskp)->level,
sched(diskp)->datestamp);
- diskp->host->start_t = now + 15;
+ diskp->host->start_t = now + 5;
state_changed = TRUE;
}
disklist_t newq;
off_t est_full_size;
char *qname;
+ taper_t *taper;
+
+ if (need_degraded == 0) {
+ for(taper = tapetable;
+ taper < tapetable+conf_taper_parallel_write;
+ taper++) {
+ if (!(taper->state & TAPER_STATE_DONE))
+ return;
+ }
+ need_degraded = 1;
+ }
+
+ if (!schedule_done || degraded_mode) {
+ return;
+ }
+
+ if (need_degraded == 0) {
+ for(taper = tapetable;
+ taper < tapetable+conf_taper_parallel_write;
+ taper++) {
+ if (!(taper->state & TAPER_STATE_DONE))
+ return;
+ }
+ need_degraded = 1;
+ }
newq.head = newq.tail = 0;
amfree(qname);
break;
}
- if (strcmp(result_argv[3], "TAPE-ERROR") == 0) {
+ if (strcmp(result_argv[3], "TAPE-ERROR") == 0 ||
+ strcmp(result_argv[3], "TAPE-CONFIG") == 0) {
taper->state &= ~TAPER_STATE_TAPE_STARTED;
taper->tape_error = newstralloc(taper->tape_error, result_argv[5]);
taper->result = FAILED;
amfree(qname);
break;
}
- if (strcmp(result_argv[3], "TAPE-ERROR") == 0) {
+ if (strcmp(result_argv[3], "TAPE-ERROR") == 0 ||
+ strcmp(result_argv[3], "TAPE-CONFIG") == 0) {
taper->state &= ~TAPER_STATE_TAPE_STARTED;
taper->tape_error = newstralloc(taper->tape_error, result_argv[6]);
taper->result = FAILED;
s = strstr(result_argv[4], " kb ");
if (s) {
s += 4;
- sched(dp)->dumpsize = atol(s);
+ sched(dp)->dumpsize = OFF_T_ATOI(s);
} else {
s = strstr(result_argv[4], " bytes ");
if (s) {
s += 7;
- sched(dp)->dumpsize = atol(s)/1024;
+ sched(dp)->dumpsize = OFF_T_ATOI(s)/1024;
}
}
s = strstr(result_argv[5], " kb ");
if (s) {
s += 4;
- partsize = atol(s);
+ partsize = OFF_T_ATOI(s);
} else {
s = strstr(result_argv[5], " bytes ");
if (s) {
s += 7;
- partsize = atol(s)/1024;
+ partsize = OFF_T_ATOI(s)/1024;
}
}
taper->left -= partsize;
if (strcmp(result_argv[1], "SETUP") == 0) {
taper_nb_wait_reply = 0;
taper_nb_scan_volume = 0;
+ need_degraded = 1;
} else {
taper = taper_from_name(result_argv[1]);
taper->state = TAPER_STATE_DONE;
taper_nb_scan_volume--;
}
if (taper_nb_wait_reply == 0) {
+ need_degraded = 1;
event_release(taper_ev_read);
taper_ev_read = NULL;
}
- need_degraded = 1;
- if (schedule_done && !degraded_mode) {
- start_degraded_mode(&runq);
- }
+ start_degraded_mode(&runq);
start_some_dumps(&runq);
break;
sched(dp)->level);
/* tell the dumper to dump to a port */
dumper_cmd(dumper, PORT_DUMP, dp, NULL);
- dp->host->start_t = time(NULL) + 15;
+ dp->host->start_t = time(NULL) + 5;
amfree(dp->dataport_list);
taper->state |= TAPER_STATE_DUMP_TO_TAPE;
file_taper_result(taper->disk);
}
}
-
}
taper = NULL;
taper_ev_read = NULL;
taper_nb_wait_reply = 0;
}
+ need_degraded = 1;
start_degraded_mode(&runq);
tapeq.head = tapeq.tail = NULL;
aclose(taper_fd);
amfree(inpline);
if(line == 0)
log_add(L_WARNING, _("WARNING: got empty schedule from planner"));
- if(need_degraded==1) start_degraded_mode(&runq);
schedule_done = 1;
+ start_degraded_mode(&runq);
run_server_global_scripts(EXECUTE_ON_PRE_BACKUP, get_config_name());
if (empty(runq)) force_flush = 1;
start_some_dumps(&runq);
int dump_to_disk_terminated;
int nb_taper_active = nb_sent_new_tape;
int nb_taper_flushing = 0;
- int dle_free = 0;
+ int dle_free = 0; /* number of dle that fit on started tape */
+ int new_dle = 0; /* number of dle that doesn't fit on started tape */
+ off_t new_data = 0; /* size of dle that doesn't fit on started tape */
off_t data_next_tape = 0;
off_t data_free = 0;
off_t data_lost = 0;
off_t data_lost_next_tape = 0;
- gboolean allow_size_or_number;
+ gboolean taperflush_criteria;
+ gboolean flush_criteria;
+ driver_debug(2, "tape_action: ENTER %p\n", taper);
dumpers_size = 0;
for(dumper = dmptable; dumper < (dmptable+inparallel); dumper++) {
if (dumper->busy && !sched(dumper->dp)->taper)
}
/* Add what is currently written to tape and in the go. */
+ new_data = 0;
for (taper1 = tapetable; taper1 < tapetable+conf_taper_parallel_write;
taper1++) {
if (taper1->state & TAPER_STATE_TAPE_STARTED) {
- tapeq_size -= taper1->left;
+ if (taper1->nb_dle < conf_max_dle_by_volume) {
+ tapeq_size -= taper1->left;
+ }
dle_free += (conf_max_dle_by_volume - taper1->nb_dle);
}
if (taper1->disk) {
off_t data_to_go;
+ off_t t_size;
if (taper1->dumper) {
- data_to_go = sched(taper1->disk)->est_size - taper1->written;
+ t_size = sched(taper1->disk)->est_size;
} else {
- data_to_go = sched(taper1->disk)->act_size - taper1->written;
+ t_size = sched(taper1->disk)->act_size;
}
+ data_to_go = t_size - taper1->written;
if (data_to_go > taper1->left) {
data_next_tape += data_to_go - taper1->left;
data_lost += taper1->written + taper1->left;
if (taper1->state & TAPER_STATE_TAPE_STARTED) {
- dle_free--;
+ dle_free -= (conf_max_dle_by_volume - taper1->nb_dle) + 1;
} else {
- dle_free += conf_max_dle_by_volume - 2;
+ dle_free -= 2;
+ new_data += t_size;
}
} else {
+ if (!(taper1->state & TAPER_STATE_TAPE_STARTED)) {
+ dle_free--;
+ new_data += t_size;
+ }
data_free += taper1->left - data_to_go;
}
tapeq_size += data_to_go;
}
}
- data_lost_next_tape = tape_length + data_free - data_next_tape - runq_size - directq_size - tapeq_size;
+
+ new_dle = queue_length(tapeq) - dle_free;
driver_debug(2, _("dle_free: %d\n"), dle_free);
+ driver_debug(2, _("new_dle: %d\n"), new_dle);
+ if (new_dle > 0) {
+ if (taperflush == 0 &&
+ flush_threshold_dumped == 0 &&
+ flush_threshold_scheduled == 0) {
+ /* shortcut, will trigger taperflush_criteria and/or flush_criteria */
+ new_data += 1;
+ } else {
+ /* sum the size of the first new-dle in tapeq */
+ /* they should be the reverse taperalgo */
+ for (dp = tapeq.head;
+ dp != NULL && new_dle > 0;
+ dp = dp->next, new_dle--) {
+ new_data += sched(dp)->act_size;
+ }
+ }
+ if (tapeq_size < new_data) {
+ tapeq_size = new_data;
+ }
+ }
+ driver_debug(2, _("new_data: %lld\n"), (long long)new_data);
+ data_lost_next_tape = tape_length + data_free - data_next_tape - runq_size - directq_size - tapeq_size;
driver_debug(2, _("data_lost: %lld\n"), (long long)data_lost);
driver_debug(2, _("data_free: %lld\n"), (long long)data_free);
driver_debug(2, _("data_next_tape: %lld\n"), (long long)data_next_tape);
}
}
- allow_size_or_number = (flush_threshold_dumped < tapeq_size &&
- flush_threshold_scheduled < sched_size) ||
- (dle_free < (queue_length(runq) +
- queue_length(directq) +
- queue_length(tapeq)));
+ taperflush_criteria = (taperflush < tapeq_size &&
+ (force_flush == 1 || dump_to_disk_terminated));
+ flush_criteria = (flush_threshold_dumped < tapeq_size &&
+ flush_threshold_scheduled < sched_size) ||
+ taperflush_criteria;
+
+ driver_debug(2, "taperflush %lld\n", (long long)taperflush);
+ driver_debug(2, "flush_threshold_dumped %lld\n", (long long)flush_threshold_dumped);
+ driver_debug(2, "flush_threshold_scheduled %lld\n", (long long)flush_threshold_scheduled);
+ driver_debug(2, "force_flush %d\n", force_flush);
+ driver_debug(2, "dump_to_disk_terminated %d\n", dump_to_disk_terminated);
driver_debug(2, "queue_length(runq) %d\n", queue_length(runq));
driver_debug(2, "queue_length(directq) %d\n", queue_length(directq));
driver_debug(2, "queue_length(tapeq) %d\n", queue_length(tapeq));
- driver_debug(2, "allow_size_or_number %d\n", allow_size_or_number);
+ driver_debug(2, "taperflush_criteria %d\n", taperflush_criteria);
+ driver_debug(2, "flush_criteria %d\n", flush_criteria);
// Changing conditionals can produce a driver hang, take care.
- //
+ //
// when to start writting to a new tape
if (taper->state & TAPER_STATE_TAPE_REQUESTED) {
driver_debug(2, "tape_action: TAPER_STATE_TAPE_REQUESTED\n");
nb_taper_active == 0) {
*why_no_new_tape = g_strdup_printf(_("%d tapes filled; runtapes=%d "
"does not allow additional tapes"), current_tape, conf_runtapes);
+ driver_debug(2, "tape_action: TAPER_STATE_TAPE_REQUESTED return TAPE_ACTION_NO_NEW_TAPE\n");
result |= TAPE_ACTION_NO_NEW_TAPE;
} else if (current_tape < conf_runtapes &&
taper_nb_scan_volume == 0 &&
- (allow_size_or_number ||
+ (flush_criteria ||
(data_lost > data_lost_next_tape) ||
nb_taper_active == 0) &&
(last_started_taper == NULL ||
last_started_taper == taper)) {
+ driver_debug(2, "tape_action: TAPER_STATE_TAPE_REQUESTED return TAPE_ACTION_SCAN\n");
result |= TAPE_ACTION_SCAN;
} else {
+ driver_debug(2, "tape_action: TAPER_STATE_TAPE_REQUESTED return TAPE_ACTION_MOVE\n");
result |= TAPE_ACTION_MOVE;
}
} else if ((taper->state & TAPER_STATE_WAIT_FOR_TAPE) &&
!empty(directq) || // if a dle is waiting for a dump to tape
!empty(roomq) || // holding disk constraint
idle_reason == IDLE_NO_DISKSPACE || // holding disk constraint
- allow_size_or_number ||
- (data_lost > data_lost_next_tape) ||
- (taperflush < tapeq_size && // taperflush
- (force_flush == 1 || // if force_flush
- dump_to_disk_terminated)) // or all dump to disk terminated
+ flush_criteria || // flush criteria
+ data_lost > data_lost_next_tape
)) {
driver_debug(2, "tape_action: TAPER_STATE_WAIT_FOR_TAPE return TAPE_ACTION_NEW_TAPE\n");
result |= TAPE_ACTION_NEW_TAPE;
(taper->state & TAPER_STATE_TAPE_STARTED || // tape already started
!empty(roomq) || // holding disk constraint
idle_reason == IDLE_NO_DISKSPACE || // holding disk constraint
- allow_size_or_number ||
- (force_flush == 1 && taperflush < tapeq_size))) { // taperflush if force_flush
+ flush_criteria)) { // flush
if (nb_taper_flushing == 0) {
+ driver_debug(2, "tape_action: TAPER_STATE_IDLE return TAPE_ACTION_START_A_FLUSH\n");
result |= TAPE_ACTION_START_A_FLUSH;
} else {
+ driver_debug(2, "tape_action: TAPER_STATE_IDLE return TAPE_ACTION_START_A_FLUSH_FIT\n");
result |= TAPE_ACTION_START_A_FLUSH_FIT;
}
+ } else {
+ driver_debug(2, "tape_action: TAPER_STATE_IDLE return TAPE_ACTION_NO_ACTION\n");
}
}
return result;
return 1;
}
+static int
+active_dumper(void)
+{
+ int i, nidle=0;
+
+ for(i = 0; i < inparallel; i++) if(!dmptable[i].busy) nidle++;
+ return inparallel - nidle;
+}
#if 0
static void
dump_state(
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
}
/* copy the header in a file on the index dir */
- {
+ if (ISSET(status, HEADER_DONE)) {
FILE *a;
char *s;
char *f = getheaderfname(hostname, diskname, dumper_timestamp, level);
default:
assert(buf != NULL);
add_msg_data(buf, (size_t)size);
- security_stream_read(streams[MESGFD].fd, read_mesgfd, cookie);
break;
}
* Reset the timeout for future reads
*/
timeout(conf_dtimeout);
-
- security_stream_read(streams[DATAFD].fd, read_datafd, cookie);
}
/*
log_add(L_INFO, _("Index corrupted for %s:%s"), hostname, qdiskname);
}
}
- security_stream_read(streams[INDEXFD].fd, read_indexfd, cookie);
}
static void
char *b, *p;
gint64 len;
- event_release(filter->event);
-
if (filter->buffer == NULL) {
/* allocate initial buffer */
filter->buffer = g_malloc(2048);
filter->allocated_size - filter->first - filter->size - 2);
if (nread <= 0) {
+ event_release(filter->event);
aclose(filter->fd);
if (filter->size > 0 && filter->buffer[filter->first + filter->size - 1] != '\n') {
/* Add a '\n' at end of buffer */
if (nread <= 0) {
g_free(filter->buffer);
g_free(filter);
- } else {
- filter->event = event_register((event_id_t)filter->fd, EV_READFD,
- handle_filter_stderr, filter);
}
}
* Startup a timeout in the event handler. If the arg is 0,
* then remove the timeout.
*/
+static event_handle_t *ev_timeout = NULL;
+static time_t timeout_time;
+
static void
timeout(
time_t seconds)
{
- static event_handle_t *ev_timeout = NULL;
+ timeout_time = time(NULL) + seconds;
/*
- * First, remove a timeout if one is active.
+ * remove a timeout if seconds is 0
*/
- if (ev_timeout != NULL) {
- event_release(ev_timeout);
- ev_timeout = NULL;
+ if (seconds == 0) {
+ if (ev_timeout != NULL) {
+ event_release(ev_timeout);
+ ev_timeout = NULL;
+ }
+ return;
}
/*
- * Now, schedule a new one if 'seconds' is greater than 0
+ * schedule a timeout if it not already scheduled
*/
- if (seconds > 0)
- ev_timeout = event_register((event_id_t)seconds, EV_TIME, timeout_callback, NULL);
+ if (ev_timeout == NULL) {
+ ev_timeout = event_register((event_id_t)seconds, EV_TIME,
+ timeout_callback, NULL);
+ }
}
/*
timeout_callback(
void * unused)
{
+ time_t now = time(NULL);
(void)unused; /* Quiet unused parameter warning */
+ if (ev_timeout != NULL) {
+ event_release(ev_timeout);
+ ev_timeout = NULL;
+ }
+
+ if (timeout_time > now) { /* not a data timeout yet */
+ ev_timeout = event_register((event_id_t)(timeout_time-now), EV_TIME,
+ timeout_callback, NULL);
+ return;
+ }
+
assert(unused == NULL);
errstr = newstralloc(errstr, _("data timeout"));
dump_result = 2;
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
}
if(rename(logfile, fname) == -1) {
- error(_("could not rename \"%s\" to \"%s\": %s"),
+ g_debug(_("could not rename \"%s\" to \"%s\": %s"),
logfile, fname, strerror(errno));
- /*NOTREACHED*/
}
amfree(fname);
FILE * logf)
{
static char *logline = NULL;
+ static size_t line_size = 0;
+ char *lline;
+ size_t loffset = 0;
char *logstr, *progstr;
char *s;
int ch;
+ int n;
- amfree(logline);
- while ((logline = agets(logf)) != NULL) {
- if (logline[0] != '\0')
- break;
- amfree(logline);
+ if (!logline) {
+ line_size = 256;
+ logline = g_malloc(line_size);
+ }
+
+ logline[0] = '\0';
+ while(1) {
+ lline = fgets(logline + loffset, line_size - loffset, logf);
+ if (lline == NULL) {
+ break; /* EOF */
+ }
+ if (strlen(logline) == line_size -1 &&
+ logline[strlen(logline)-1] != '\n') {
+ line_size *= 2;
+ logline = g_realloc(logline, line_size);
+ loffset = strlen(logline);
+ } else if (strlen(logline) == 0 ||
+ (strlen(logline) == 1 && logline[0] == '\n')) {
+ } else {
+ break; /* good line */
+ }
+ logline[loffset] = '\0';
}
- if (logline == NULL) return 0;
+ if (logline[0] == '\0')
+ return 0;
+
+ /* remove \n */
+ n = strlen(logline);
+ if (logline[n-1] == '\n') logline[n-1] = '\0';
+
curlinenum++;
s = logline;
ch = *s++;
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
int exit_status = EXIT_SUCCESS;
gboolean no_taper = FALSE;
gboolean from_client = FALSE;
+ gboolean exact_match = FALSE;
if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) {
printf("planner-%s\n", VERSION);
from_client = TRUE;
diskarg_offset += 1;
}
+ if (argc - diskarg_offset > 0 && g_str_equal(argv[diskarg_offset],
+ "--exact_match")) {
+ exact_match = TRUE;
+ diskarg_offset += 1;
+ }
run_server_global_scripts(EXECUTE_ON_PRE_ESTIMATE, get_config_name());
g_fprintf(stderr, _("%s: timestamp %s\n"),
get_pname(), planner_timestamp);
- errstr = match_disklist(&origq, argc-diskarg_offset,
+ errstr = match_disklist(&origq, exact_match, argc-diskarg_offset,
argv+diskarg_offset);
if (errstr) {
g_fprintf(stderr,"%s",errstr);
/* see if this matches the command-line arguments */
if (conf_autoflush == 1 &&
- !match_dumpfile(&file, argc-diskarg_offset,
+ !match_dumpfile(&file, exact_match, argc-diskarg_offset,
argv+diskarg_offset)) {
continue;
}
* reported.
*/
log_add(L_ERROR, "%s", errbuf);
+ for(dp = hostp->disks; dp != NULL; dp = dp->hostnext) {
+ if (dp->todo) {
+ qname = quote_string(dp->name);
+ est(dp)->state = DISK_DONE;
+ remove_disk(&waitq, dp);
+ enqueue_disk(&failq, dp);
+
+ est(dp)->errstr = g_strdup(errbuf);
+ g_fprintf(stderr, _("error result for host %s disk %s: %s\n"),
+ dp->host->hostname, qname, errbuf);
+ amfree(qname);
+ }
+ }
}
hostp->up = HOST_DONE;
amfree(errbuf);
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
tape_t *tp = NULL;
char *s, *s1;
int ch;
+ char *cline;
*status = 0;
return NULL;
}
+ cline = g_strdup(line);
tp = g_new0(tape_t, 1);
s1 = s - 1;
}
if (*(s - 1) == '#') {
tp->comment = stralloc(s); /* skip leading '#' */
+ } else if (*(s-1)) {
+ g_critical("Bogus line in the tapelist file: %s", cline);
}
return tp;
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
#! @PERL@
# Copyright (c) 2009-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2009-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vim:ft=automake
# Copyright (c) 2007-2012 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amlibdir)"
LTLIBRARIES = $(amlib_LTLIBRARIES)
libamxfer_la_DEPENDENCIES = ../common-src/libamanda.la
$(LDFLAGS) -o $@
SOURCES = $(libamxfer_la_SOURCES) $(xfer_test_SOURCES)
DIST_SOURCES = $(libamxfer_la_SOURCES) $(xfer_test_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
@list='$(amlib_LTLIBRARIES)'; test -n "$(amlibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(amlibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(amlibdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(amlibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(amlibdir)"; \
}
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libamxfer.la: $(libamxfer_la_OBJECTS) $(libamxfer_la_DEPENDENCIES)
+libamxfer.la: $(libamxfer_la_OBJECTS) $(libamxfer_la_DEPENDENCIES) $(EXTRA_libamxfer_la_DEPENDENCIES)
$(libamxfer_la_LINK) -rpath $(amlibdir) $(libamxfer_la_OBJECTS) $(libamxfer_la_LIBADD) $(LIBS)
clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-xfer-test$(EXEEXT): $(xfer_test_OBJECTS) $(xfer_test_DEPENDENCIES)
+xfer-test$(EXEEXT): $(xfer_test_OBJECTS) $(xfer_test_DEPENDENCIES) $(EXTRA_xfer_test_DEPENDENCIES)
@rm -f xfer-test$(EXEEXT)
$(LINK) $(xfer_test_OBJECTS) $(xfer_test_LDADD) $(LIBS)
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
if test "$$failed" -eq 0; then \
- echo "$$grn$$dashes"; \
+ col="$$grn"; \
else \
- echo "$$red$$dashes"; \
+ col="$$red"; \
fi; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes$$std"; \
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
test "$$failed" -eq 0; \
else :; fi
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
/*
* Copyright (c) 2008-2012 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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY