From 173c16cf4816854845c2d77a9e8019fa50cafa6a Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 23 Oct 2008 15:59:32 +0000 Subject: [PATCH] only display error from usermod git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2381 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/FTPsn.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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