X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famserverconfig.pl;h=919c71072f2f7a05770c85d20fe84278b4966531;hb=HEAD;hp=ec8675fcc0e25d41676c1d84ef57937a1403a06a;hpb=79cdc4b6ea8848b21ba4a0e7d2fd3bc401e0bebe;p=debian%2Famanda diff --git a/server-src/amserverconfig.pl b/server-src/amserverconfig.pl index ec8675f..919c710 100755 --- a/server-src/amserverconfig.pl +++ b/server-src/amserverconfig.pl @@ -1,10 +1,11 @@ #!@PERL@ # -# Copyright (c) 2005-2008 Zmanda Inc. All Rights Reserved. +# 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 @@ -15,7 +16,7 @@ # 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 Mathlida Ave, Suite 300 +# Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com # @@ -23,17 +24,20 @@ use lib '@amperldir@'; use Getopt::Long; use Time::Local; use File::Copy; +use File::Path; use Socket; # for gethostbyname use Amanda::Paths; +use Amanda::Util qw( :constants ); +use Amanda::Constants; my $confdir="$CONFIG_DIR"; my $tmpdir="$AMANDA_DBGDIR"; -my $amandahomedir="$localstatedir/lib/amanda"; +my $amandahomedir="$localstatedir/amanda"; my $templatedir="$amdatadir/template.d"; #rpm install template files here my $def_tapedev="file:$amandahomedir/vtapes"; -my $amanda_user="@CLIENT_LOGIN@"; -my $def_config="@DEFAULT_CONFIG@"; +my $amanda_user="$Amanda::Constants::CLIENT_LOGIN"; +my $def_config="$Amanda::Constants::DEFAULT_CONFIG"; my $def_dtimeout="1800"; my $def_ctimeout="30"; my $def_etimeout="300"; @@ -46,17 +50,13 @@ my $holding_err=0; my $template_only=0; my $parentdir; my $host; -# Get the version suffix. -my $USE_VERSION_SUFFIXES = '@USE_VERSION_SUFFIXES@'; -my $suf = ''; -if ( $USE_VERSION_SUFFIXES =~ /^yes$/i ) { - $suf='-@VERSION@'; -} +my @pw = getpwuid($<); +my $dumpuser = $pw[0]; #usage sub usage { - print "$0 $suf\n"; + print "$0\n"; print "\t\t [--template