Imported Upstream version 3.3.3
[debian/amanda] / installcheck / run-ndmp.pl
1 #! @PERL@
2 # Copyright (c) 2010-2012 Zmanda, Inc.  All Rights Reserved.
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 # for more details.
13 #
14 # You should have received a copy of the GNU General Public License along
15 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
19 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
20
21 # This utility is useful for setting up a long-running NDMP tape service while
22 # developing.  It's not used in normal Amanda operations, nor even during
23 # installchecks.  Note that you will need to run the =setupcache installcheck
24 # first, to generate the cached NDMP dump.
25
26 use lib "@top_srcdir@/installcheck";
27 use lib "@amperldir@";
28
29 use Installcheck;
30 use Installcheck::Mock;
31 use Installcheck::Config;
32 use Installcheck::Dumpcache;
33
34 die "not built with ndmp" unless
35     Amanda::Util::built_with_component("ndmp");
36
37 Installcheck::Dumpcache::load("ndmp");
38 my $ndmp = Installcheck::Mock::NdmpServer->new(no_reset => 1);
39 $ndmp->edit_config();
40
41 print "NDMP test daemon running for config TESTCONF; put this script in\n";
42 print "the background and kill it when you are finished.\n";
43
44 while (1) { sleep(100); }