X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fsave.pl;h=dce7b49cd5bb75b2662d215a3f1dfcb3216c6d16;hb=f91073b99369ea05c42364f9462695be7a67016d;hp=1689d38751313aeb76c58699f58a0df4c55d0580;hpb=b16824ddf487ad9f0502473d4908c7080655bde7;p=spider.git diff --git a/cmd/save.pl b/cmd/save.pl index 1689d387..dce7b49c 100644 --- a/cmd/save.pl +++ b/cmd/save.pl @@ -1,13 +1,15 @@ # # save the output of ANY command to a file # +# From an idea by Rene OZ1LQH +# # Copyright (c) 2002 Dirk Koopman G1TLH # -# $Id$ +# # my ($self, $line) = @_; -return (1, $self->msg('e5')) if $self->priv < 9 || $self->remotecmd; +return (1, $self->msg('e5')) if $self->priv < 9 || $self->remotecmd || $self->inscript; my ($date_req, $time_req); my $app_req = '>'; @@ -42,7 +44,9 @@ if ($rest =~ /^\s*\"/) { } open OF, "$app_req$fn" or return (1, $self->msg('e30', $fn)); for (@cmd) { + $self->{_nospawn} = 1; print OF map {"$_\n"} $self->run_cmd($_); + delete $self->{_nospawn}; } close OF; return (1, $self->msg('ok'));