From 95d97955512ce4d29c174a5fc9f1796d85fdcfb0 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 15 Apr 2008 16:10:20 +0000 Subject: [PATCH] fix copy of xcat git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1061 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/sbin/copycerts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/xCAT-server-2.0/sbin/copycerts b/xCAT-server-2.0/sbin/copycerts index 32be36095..3b918f019 100644 --- a/xCAT-server-2.0/sbin/copycerts +++ b/xCAT-server-2.0/sbin/copycerts @@ -71,7 +71,6 @@ sub copyCertstoSN { xCAT::MsgUtils->message('S', "/xcatpost/.xcat directory does not exist\n"); - return 1; } if (-d "/xcatpost/ca") @@ -91,7 +90,6 @@ sub copyCertstoSN else { xCAT::MsgUtils->message('S', "/xcatpost/ca directory does not exist\n"); - return 1; } if (-d "/xcatpost/cert") @@ -111,21 +109,31 @@ sub copyCertstoSN { xCAT::MsgUtils->message('S', "/xcatpost/cert directory does not exit\n"); - return 1; } + if (-d "/xcatpost/etc/xcat") { `cp /xcatpost/etc/xcat/cfgloc /etc/xcat/cfgloc`; chmod 0600, "/etc/xcat/cfgloc"; + } + else + { + xCAT::MsgUtils->message('S', + "/xcatpost/etc/xcat directory does not exit\n"); + + } if (-d "/xcatpost/etc/sysconfig") { + if (!(-d "/etc/sysconfig")) + { + mkdir("/etc/sysconfig", 0755); + } `cp /xcatpost/etc/sysconfig/xcat /etc/sysconfig`; chmod 0700, "/etc/sysconfig/xcat"; } else { xCAT::MsgUtils->message('S', - "/xcatpost/sysconfig directory does not exit\n"); - return 1; + "/xcatpost/etc/sysconfig directory does not exit\n"); }