Fix bug parsing menu files on remote system

This commit is contained in:
Jamie Cameron
2010-08-16 17:17:59 -07:00
parent 0f5d57314a
commit 3be0ea28e5
2 changed files with 5 additions and 5 deletions

View File

@@ -376,13 +376,13 @@ for($i=0; defined($name = $in{"name_$i"}); $i++) {
}
}
# set_parameter_envs(&command, command-str, &uinfo, [set-in])
# set_parameter_envs(&command, command-str, &uinfo, [set-in], [skip-menu-check])
# Sets $ENV variables based on parameter inputs, and returns the list of
# environment variable commands, the export commands, the command string,
# and the command string to display.
sub set_parameter_envs
{
local ($cmd, $str, $uinfo, $setin) = @_;
local ($cmd, $str, $uinfo, $setin, $skipfound) = @_;
$setin ||= \%in;
local $displaystr = $str;
local ($env, $export, @vals);
@@ -414,7 +414,7 @@ foreach my $a (@{$cmd->{'args'}}) {
foreach my $l (&read_opts_file($a->{'opts'})) {
$found++ if ($l->[0] eq $setin->{$n});
}
$found || &error($text{'run_eopt'});
$found || $skipfound || &error($text{'run_eopt'});
$rv = $setin->{$n};
}
elsif ($a->{'type'} == 10) {
@@ -439,7 +439,7 @@ foreach my $a (@{$cmd->{'args'}}) {
foreach my $l (@opts) {
$found++ if ($l->[0] eq $v);
}
$found || &error($text{'run_eopt'});
$found || $skipfound || &error($text{'run_eopt'});
}
$rv = join(" ", @vals);
}

View File

@@ -60,7 +60,7 @@ foreach $h (@hosts) {
"custom-lib.pl");
&remote_foreign_call($server->{'host'}, "custom",
"set_parameter_envs", $cmd, $cmd->{'cmd'},
\@user_info, \%in);
\@user_info, \%in, 1);
($got, $out, $timeout) = &remote_foreign_call(
$server->{'host'}, "custom", "execute_custom_command",
$cmd, $env, $export, $str);