2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-06-18 09:30:48 +00:00

fix: Fix installation warnings regarding egrep and grep

Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst Selli
2025-11-28 12:56:06 -03:00
parent 8c2babfe60
commit 460451cef2
2 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -319,7 +319,7 @@ MANPATH=\$XCATROOT/share/man:\$MANPATH
export XCATROOT PATH MANPATH
export PERL_BADLANG=0
# If /usr/local/share/perl5 is not already in @INC, add it to PERL5LIB
perl -e "print \"@INC\"" | egrep "(^|\W)/usr/local/share/perl5($| )" > /dev/null
perl -e "print \"@INC\"" | grep -E "(^|\W)/usr/local/share/perl5($| )" > /dev/null
if [ \$? = 1 ]; then
export PERL5LIB=/usr/local/share/perl5:\$PERL5LIB
fi
@@ -343,7 +343,7 @@ else
endif
setenv PERL_BADLANG 0
# If /usr/local/share/perl5 is not already in @INC, add it to PERL5LIB
perl -e "print \"@INC\"" | egrep "(^|\W)/usr/local/share/perl5($| )" > /dev/null
perl -e "print \"@INC\"" | grep -E "(^|\W)/usr/local/share/perl5($| )" > /dev/null
if [ \$? = 1 ]; then
setenv PERL5LIB /usr/local/share/perl5:\${PERL5LIB}
fi
@@ -351,13 +351,13 @@ EOF
chmod 755 /etc/profile.d/xcat.*
%else
if ! egrep PERL5LIB /etc/environment > /dev/null 2>&1 ; then
if ! grep -E PERL5LIB /etc/environment > /dev/null 2>&1 ; then
echo "
# xCAT Perl setup
PERL5LIB=/usr/opt/perl5/lib/5.8.2:/usr/opt/perl5/lib/5.8.2/aix-thread-multi:/usr/opt/perl5/lib/site_perl/5.8.2:/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi " >>/etc/environment
fi
if ! egrep XCATROOT /etc/environment > /dev/null 2>&1 ; then
if ! grep -E XCATROOT /etc/environment > /dev/null 2>&1 ; then
echo "
# xCAT setup
XCATROOT=$RPM_INSTALL_PREFIX0
@@ -366,7 +366,7 @@ MANPATH=\$XCATROOT/share/man:\$MANPATH
" >> /etc/environment
fi
if ! egrep XCATROOT /etc/profile > /dev/null 2>&1 ; then
if ! grep -E XCATROOT /etc/profile > /dev/null 2>&1 ; then
echo "
# xCAT setup
XCATROOT=$RPM_INSTALL_PREFIX0
+3 -3
View File
@@ -489,19 +489,19 @@ fi
%endif
#Apply the correct httpd/apache configuration file according to the httpd/apache version
if [ -n "$(httpd -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
if [ -n "$(httpd -v 2>&1 |grep -e '^Server version\s*:.*/2\.4')" ]
then
rm -rf /etc/httpd/conf.d/xcat-ws.conf
cp /etc/%httpconfigdir/conf.orig/xcat-ws.conf.apache24 /etc/httpd/conf.d/xcat-ws.conf
fi
if [ -n "$(apachectl -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
if [ -n "$(apachectl -v 2>&1 |grep -e '^Server version\s*:.*/2\.4')" ]
then
rm -rf /etc/apache2/conf.d/xcat-ws.conf
cp /etc/%httpconfigdir/conf.orig/xcat-ws.conf.apache24 /etc/apache2/conf.d/xcat-ws.conf
fi
if [ -n "$(apache2ctl -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
if [ -n "$(apache2ctl -v 2>&1 |grep -e '^Server version\s*:.*/2\.4')" ]
then
rm -rf /etc/apache2/conf.d/xcat-ws.conf
cp /etc/%httpconfigdir/conf.orig/xcat-ws.conf.apache24 /etc/apache2/conf.d/xcat-ws.conf