summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authormark <mark>2012-01-29 06:15:22 +0000
committermark <mark>2012-01-29 06:15:22 +0000
commit93f780d25cc63f7934308e7c5a8dd8a807216151 (patch)
treecea8f5e4ce4e5f2ae0336eb02dba4d9795360d8e /FS
parent396e18e8b0b43fd6b7bf4c2f1e0465d16371441f (diff)
don't try to run empty export commands on replace, #16143
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_export/shellcommands.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm
index 418ff14ac..59146306d 100644
--- a/FS/FS/part_export/shellcommands.pm
+++ b/FS/FS/part_export/shellcommands.pm
@@ -353,6 +353,7 @@ sub _export_command {
$locale = shell_quote $locale;
my $command_string = eval(qq("$command"));
+
my @ssh_cmd_args = (
user => $self->option('user') || 'root',
host => $self->machine,
@@ -377,6 +378,7 @@ sub _export_command {
sub _export_replace {
my($self, $new, $old ) = (shift, shift, shift);
my $command = $self->option('usermod');
+ return '' if $command =~ /^\s*$/;
my $stdin = $self->option('usermod_stdin');
no strict 'vars';
{