X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Ftaper.pl;h=8422dbc39b4ae90b3de86c440e1bc703770aabbc;hb=949b8910a5e23c4285d0b1aedacfc82a14dc97a5;hp=3b1c0092f9818747fdf29356af297c44c7e84f89;hpb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;p=debian%2Famanda diff --git a/server-src/taper.pl b/server-src/taper.pl index 3b1c009..8422dbc 100644 --- a/server-src/taper.pl +++ b/server-src/taper.pl @@ -1,5 +1,5 @@ #! @PERL@ -# Copyright (c) 2009, 2010 Zmanda Inc. All Rights Reserved. +# 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 @@ -24,17 +24,20 @@ use warnings; package main; use Amanda::Util qw( :constants ); -use Amanda::Config qw( :init ); +use Amanda::Config qw( :init :getconf ); use Amanda::Logfile qw( :logtype_t log_add $amanda_log_trace_log ); -use Amanda::Debug; +use Amanda::Debug qw( debug ); use Amanda::Taper::Controller; use Getopt::Long; Amanda::Util::setup_application("taper", "server", $CONTEXT_DAEMON); my $config_overrides = new_config_overrides($#ARGV+1); + +debug("Arguments: " . join(' ', @ARGV)); Getopt::Long::Configure(qw{bundling}); GetOptions( + 'version' => \&Amanda::Util::version_opt, 'o=s' => sub { add_config_override_opt($config_overrides, $_[1]); }, ) or usage(); @@ -63,8 +66,10 @@ Amanda::Debug::add_amanda_log_handler($amanda_log_trace_log); Amanda::Util::finish_setup($RUNNING_AS_DUMPUSER); +my $tlf = Amanda::Config::config_dir_relative(getconf($CNF_TAPELIST)); +my $tl = Amanda::Tapelist->new($tlf); # transfer control to the Amanda::Taper::Controller class implemented above -my $controller = Amanda::Taper::Controller->new(); +my $controller = Amanda::Taper::Controller->new(tapelist => $tl); $controller->start(); Amanda::MainLoop::run();