Skip to content

Commit

Permalink
FIX: EL 9.5 installation
Browse files Browse the repository at this point in the history
This PR is aimed to fix the use of Enterprise Linux 9.5

Signed-off-by: Vinícius Ferrão <[email protected]>
  • Loading branch information
viniciusferrao committed Jan 8, 2025
1 parent 6b8c669 commit c6a364c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion xCAT-server/share/xcat/netboot/rh/genimage
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ if($onlyinitrd){

my $yumcmd = "yum $non_interactive -c /tmp/genimage.$$.yum.conf --installroot=$rootimg_dir/ --disablerepo=* ";

if ($osver =~ /^rhel\D*(\d*)[.\d]*.*$/) {
if ($osver =~ /^(?:rhel|rocky)\D*(\d*)[.\d]*.*$/) {
$majorrel = $1;
if ($majorrel > 7) {
$yumcmd .= "--releasever=" . $majorrel . " ";
Expand Down
2 changes: 1 addition & 1 deletion xCAT-server/share/xcat/scripts/setup-dockerhost-cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if [ ! -e $XCATDOCKERCADIR/certs ]; then
fi

openssl genrsa -out ca/dockerhost-key.pem 2048
openssl req -config ca/openssl.cnf -new -key ca/dockerhost-key.pem -out cert/dockerhost-req.pem -extensions server -subj "/CN=$CNA"
openssl req -config ca/openssl.cnf -new -key ca/dockerhost-key.pem -out cert/dockerhost-req.pem -subj "/CN=$CNA"
mv cert/dockerhost-req.pem ca/$CNA\.csr
cd -
cd $XCATDOCKERCADIR
Expand Down
4 changes: 2 additions & 2 deletions xCAT-server/share/xcat/scripts/setup-local-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ mkdir -p $USERHOME/.xcat
cd $USERHOME/.xcat
openssl genrsa -out client-key.pem 2048
if [ $FORCE -eq 0 ]; then
openssl req -config $XCATCADIR/openssl.cnf -new -key client-key.pem -out client-req.pem -extensions usr_cert -subj "/CN=$CNA"
openssl req -config $XCATCADIR/openssl.cnf -new -key client-key.pem -out client-req.pem -subj "/CN=$CNA"
else
openssl req -config $XCATCADIR/openssl.cnf -new -key client-key.pem -out client-req.pem -extensions usr_cert -subj "/CN=$CNA" -batch
openssl req -config $XCATCADIR/openssl.cnf -new -key client-key.pem -out client-req.pem -subj "/CN=$CNA" -batch
fi
cp client-req.pem $XCATDIR/ca/root.csr
cd - >/dev/null
Expand Down
2 changes: 1 addition & 1 deletion xCAT-server/share/xcat/scripts/setup-server-cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mkdir -p $XCATDIR/cert
cd $XCATDIR/cert
sed -i "s/#XCATCASAN#/DNS.1 = `hostname --long`\nDNS.2 = `hostname --short`/g" $XCATCADIR/openssl.cnf
openssl genrsa -out server-key.pem 2048
openssl req -config $XCATCADIR/openssl.cnf -new -key server-key.pem -out server-req.pem -extensions server -subj "/CN=$CNA"
openssl req -config $XCATCADIR/openssl.cnf -new -key server-key.pem -out server-req.pem -subj "/CN=$CNA"
cp server-req.pem $XCATDIR/ca/`hostname`.csr
cd -
cd $XCATDIR/ca
Expand Down
2 changes: 1 addition & 1 deletion xCAT-server/share/xcat/scripts/setup-xcat-ca.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cp $XCATROOT/share/xcat/ca/Makefile $XCATCADIR/
touch $XCATCADIR/index.attr
cd $XCATCADIR
make init
#openssl req -nodes -config openssl.cnf -days 7300 -x509 -newkey rsa:2048 -out ca-cert.pem -extensions v3_ca -outform PEM -subj /CN="$CNA"
#openssl req -nodes -config openssl.cnf -days 7300 -x509 -newkey rsa:2048 -out ca-cert.pem -outform PEM -subj /CN="$CNA"
openssl genrsa -out private/ca-key.pem 2048
chmod 600 private/ca-key.pem
openssl req -new -key private/ca-key.pem -config openssl.cnf -out ca-req.csr -subj /CN="$CNA" -outform PEM
Expand Down

0 comments on commit c6a364c

Please sign in to comment.