projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
da63576
)
Make no_queue option work correctly
author
mark
<mark>
Thu, 30 Jul 2009 07:35:18 +0000
(07:35 +0000)
committer
mark
<mark>
Thu, 30 Jul 2009 07:35:18 +0000
(07:35 +0000)
FS/FS/part_export/shellcommands.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/shellcommands.pm
b/FS/FS/part_export/shellcommands.pm
index
e375302
..
11e3b7d
100644
(file)
--- a/
FS/FS/part_export/shellcommands.pm
+++ b/
FS/FS/part_export/shellcommands.pm
@@
-301,13
+301,23
@@
sub _export_command {
$ldap_password = shell_quote $ldap_password;
my $command_string = eval(qq("$command"));
$ldap_password = shell_quote $ldap_password;
my $command_string = eval(qq("$command"));
-
- $self->shellcommands_queue( $svc_acct->svcnum,
- user => $self->option('user')||'root',
- host => $self->machine,
- command => $command_string,
- stdin_string => $stdin_string,
+ my @ssh_cmd_args = (
+ user => $self->option('user') || 'root',
+ host => $self->machine,
+ command => $command_string,
+ stdin_string => $stdin_string,
);
);
+
+ if($self->options('no_queue')) {
+ # discard return value just like freeside-queued.
+ eval { ssh_cmd(@ssh_cmd_args) };
+ $error = $@;
+ return $error. ' ('. $self->exporttype. ' to '. $self->machine. ')'
+ if $error;
+ }
+ else {
+ $self->shellcommands_queue( $new->svcnum, @ssh_cmd_args );
+ }
}
sub _export_replace {
}
sub _export_replace {