diff --git a/xCAT-server/lib/xcat/plugins/FTPsn.pm b/xCAT-server/lib/xcat/plugins/FTPsn.pm index c31acf28b..4e07c4d4e 100644 --- a/xCAT-server/lib/xcat/plugins/FTPsn.pm +++ b/xCAT-server/lib/xcat/plugins/FTPsn.pm @@ -125,10 +125,10 @@ sub setup_FTP mkpath($installdir); } $cmd = "usermod -d $installdir ftp"; - system $cmd; - if ($? > 0) { + my $outref = xCAT::Utils->runcmd($cmd,0); + if ($::RUNCMD_RC) { - xCAT::MsgUtils->message("S", "Error from command:$cmd"); + xCAT::MsgUtils->message("S", "Error from command:$cmd"); } # restart tftp