diff --git a/xCAT-client/xCAT-client.spec b/xCAT-client/xCAT-client.spec index 8ed907edf..e216c20c7 100644 --- a/xCAT-client/xCAT-client.spec +++ b/xCAT-client/xCAT-client.spec @@ -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 diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec index 7964094ca..545020251 100644 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -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