+ my( $command_string, $stdin_string ) =
+ $self->_export_subvars( $svc_acct, $command, $stdin );
+
+ $self->ssh_or_queue( $svc_acct, $command_string, $stdin_string );
+}
+
+sub ssh_or_queue {
+ my( $self, $svc_acct, $command_string, $stdin_string ) = @_;
+
+ my @ssh_cmd_args = (
+ user => $self->option('user') || 'root',
+ host => $self->svc_machine($svc_acct),
+ command => $command_string,
+ stdin_string => $stdin_string,
+ ignored_errors => $self->option('ignored_errors') || '',
+ ignore_all_errors => $self->option('ignore_all_errors'),
+ fail_on_output => $self->option('fail_on_output'),
+ );
+
+ if ( $self->option($action. '_no_queue') ) {
+ # discard return value just like freeside-queued.
+ eval { ssh_cmd(@ssh_cmd_args) };
+ $error = $@;
+ $error = $error->full_message if ref $error; # Exception::Class::Base
+ return $error.
+ ' ('. $self->exporttype. ' to '. $self->svc_machine($svc_acct). ')'
+ if $error;
+ } else {
+ $self->shellcommands_queue( $svc_acct->svcnum, @ssh_cmd_args );
+ }
+}
+
+sub _export_subvars {
+ my( $self, $svc_acct, $command, $stdin ) = @_;
+