From 5d8c27fe6959cb78cd738eb3663eb60843c94259 Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Wed, 21 May 2008 14:02:38 +0000 Subject: [PATCH] - added File:Path for mkpath - added check for /install existing git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1460 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/FTPsn.pm | 19 ++++++++++--------- xCAT-server-2.0/sbin/makenamed.conf | 4 +++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/FTPsn.pm b/xCAT-server-2.0/lib/xcat/plugins/FTPsn.pm index 6ea43d417..4a6766489 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/FTPsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/FTPsn.pm @@ -6,20 +6,21 @@ use xCAT::Table; use xCAT::Utils; use File::Basename; +use File::Path; use xCAT::MsgUtils; use Getopt::Long; #------------------------------------------------------- -=head1 - xCAT plugin package to setup vstftp on a service node +=head1 + xCAT plugin package to setup vstftp on a service node #------------------------------------------------------- -=head3 handled_commands +=head3 handled_commands -This runs on Service Node +This runs on Service Node Checks servicenode table ftpserver attribute Call setup_TFTP (actually setting up atftp) @@ -74,7 +75,7 @@ sub handled_commands #------------------------------------------------------- -=head3 process_request +=head3 process_request Process the command @@ -88,9 +89,9 @@ sub process_request #----------------------------------------------------------------------------- -=head3 setup_FTP +=head3 setup_FTP - Sets up FTP services (vstftp) + Sets up FTP services (vstftp) =cut @@ -122,8 +123,8 @@ sub setup_FTP } $cmd = "usermod -d $installdir ftp"; system $cmd; - if ($? > 0) { - + if ($? > 0) { + xCAT::MsgUtils->message("S", "Error from command:$cmd"); } diff --git a/xCAT-server-2.0/sbin/makenamed.conf b/xCAT-server-2.0/sbin/makenamed.conf index 9af8609bb..2609fce89 100755 --- a/xCAT-server-2.0/sbin/makenamed.conf +++ b/xCAT-server-2.0/sbin/makenamed.conf @@ -3,7 +3,9 @@ FILE=/etc/named.conf #unalias cp -cp -f $FILE ${FILE}.ORIG +if [ -f $FILE ]; then + cp -f $FILE ${FILE}.ORIG +fi echo "options { directory \"/var/named\";