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