From 0be33fd9e1185426d3b7bf2c6349a0361942441b Mon Sep 17 00:00:00 2001 From: mellor Date: Tue, 18 Dec 2007 19:07:58 +0000 Subject: [PATCH] fixed relocatable dir for ca scripts git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@188 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/share/xcat/scripts/setup-xcat-ca.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xCAT-server-2.0/share/xcat/scripts/setup-xcat-ca.sh b/xCAT-server-2.0/share/xcat/scripts/setup-xcat-ca.sh index 2fb03dc39..fea1b4203 100755 --- a/xCAT-server-2.0/share/xcat/scripts/setup-xcat-ca.sh +++ b/xCAT-server-2.0/share/xcat/scripts/setup-xcat-ca.sh @@ -1,5 +1,8 @@ #XCATDIR=`gettab key=xcatconfdir site.value` # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html +if [ -z "$XCATROOT" ]; then + XCATROOT=/opt/xcat +fi if [ -z "$XCATDIR" ]; then XCATDIR=/etc/xcat fi @@ -23,8 +26,8 @@ if [ -e $XCATDIR/ca ]; then else mkdir -p $XCATDIR/ca fi -sed -e "s@##XCATCADIR##@$XCATCADIR@" /usr/share/xcat/ca/openssl.cnf.tmpl > $XCATCADIR/openssl.cnf -cp /usr/share/xcat/ca/Makefile $XCATCADIR/ +sed -e "s@##XCATCADIR##@$XCATCADIR@" $XCATROOT/share/xcat/ca/openssl.cnf.tmpl > $XCATCADIR/openssl.cnf +cp $XCATROOT/share/xcat/ca/Makefile $XCATCADIR/ cd $XCATCADIR make init openssl req -nodes -config openssl.cnf -days 2650 -x509 -newkey rsa:2048 -out ca-cert.pem -outform PEM -subj /CN="$CNA"