+
+ # add command line include for amrestore
+ for(my $i=1;defined $ARGV[$i]; $i++) {
+ my $param = $ARGV[$i];
+ $param =~ /^(.*)$/;
+ print INC_FILE "$1\n";
+ }
+
+ close INC_FILE;
+ } else {
+ # put all include in $self->{'include'} they will be added on
+ # command line.
+ if ($#{$self->{include_file}} >= 0) {
+ $self->{include} = [ @{$self->{include_file}} ];
+ }
+
+ foreach my $file (@{$self->{include_list}}) {
+ if (!open(FF, $file)) {
+ if ($self->{action} eq 'check' && !$self->{include_optional}) {
+ $self->print_to_server("Open of '$file' failed: $!",
+ $Amanda::Script_App::ERROR);
+ }
+ next;
+ }
+ while (<FF>) {
+ chomp;
+ push @{$self->{include}}, $_;
+ }
+ close(FF);
+ }
+
+ # add command line include for amrestore
+ if ($self->{action} eq "restore") {
+ for(my $i=1;defined $ARGV[$i]; $i++) {
+ my $param = $ARGV[$i];
+ $param =~ /^(.*)$/;
+ push @{$self->{include}}, $1;
+ }