mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-06-18 01:20:46 +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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user