diff --git a/xCAT-server/lib/xcat/plugins/xdsh.pm b/xCAT-server/lib/xcat/plugins/xdsh.pm index d1d772aa2..2d9f92b1c 100644 --- a/xCAT-server/lib/xcat/plugins/xdsh.pm +++ b/xCAT-server/lib/xcat/plugins/xdsh.pm @@ -615,12 +615,16 @@ sub process_nodes { # have to change each file path and add the SNsynfiledir # except the last entry which is the destination on the computenode + # skip flags my $args = $newSNreq->{arg}; my $arraysize = @$args; my $i = 0; foreach my $sarg (@$args) { if ($arraysize > 1) { - if (($sarg !~ /^-/) && ( $sarg !~ /^\//)) { # just a flag, skip + if ($sarg =~ /^-/) { # just a flag, skip + $arraysize--; + $i++; + } else { my $tmpfile =$synfiledir ; $tmpfile .=$newSNreq->{arg}->[$i] ; $newSNreq->{arg}->[$i] = $tmpfile;