Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.
This object is in archive! 

/scripts/easyapache should exit with proper code when build failed

deepunix shared this idea 11 years ago
Open Discussion

/scripts/easyapache always exits with 0 exit status irrelevant of whether the buildout was successful or not.

It should set proper exit code because our automation tools can't distinguish between a failed build and a successful one.


Steps to reproduce:


1. Run /scripts/easyapache with profile that has either wrong settings or wrong extensions selected.

2. echo $? after it. You'll see it's always "0".


For ex., here's an example of failed build. Note the ENDOFBUILD line that prints $?.


checking for Firebird support for PDO... no

checking for MySQL support for PDO... yes, shared

checking for PDO includes... checking for PDO includes... /home/cpeasyapache/src/php-5.4.17/ext

checking Oracle OCI support for PDO... no

checking for ODBC v3 support for PDO... no

checking for PostgreSQL support for PDO... no

checking for sqlite 3 support for PDO... yes

checking for PDO includes... (cached) /home/cpeasyapache/src/php-5.4.17/ext

configure: error:

You've configured extension pdo_sqlite, which depends on extension sqlite3,

but you've either not enabled sqlite3, or have disabled it.

!! './configure --disable-fileinfo --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-mbstring --enable-soap --enable-zip --prefix=/usr/local --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-curl=/opt/curlssl/ --with-freetype-dir=/usr --with-gd --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libdir=lib64 --with-libexpat-dir=/usr --with-libxml-dir=/opt/xml2 --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=/usr/bin/mysql_config --with-mysqli=mysqlnd --with-openssl=/usr --with-openssl-dir=/usr --with-pcre-regex=/opt/pcre --with-pdo-mysql=shared --with-pic --with-png-dir=/usr --with-xmlrpc --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr --without-sqlite3' failed with exit code '256' !!

!! Restoring original working apache !!

!! Executing '/scripts/initsslhttpd' !!

!! Restarting 'httpd' ... !!

!! 'httpd' restart complete. !!

Building global cache for cpanel...Done

!! Executing '/scripts/initfpsuexec' !!

!! Executing '/scripts/initsslhttpd' !!

!! Executing '/scripts/update_apachectl' !!

!! Executing '/scripts/enablefileprotect' !!

Compiling report...

Sending report. As some of the attached files may be quite large, this could take a few minutes. Thanks for your patience.

!! If you want to create a support ticket with cPanel regarding this please reference 'BuildAP Report Id': '11271877' !!

Report processed.

!! Feel free to submit a support ticket at https://tickets.cpanel.net/submit/index.cgi?reqtype=tickets !!

!! Verbose logfile is at '/usr/local/cpanel/logs/easy/apache/build.1374159892' !!

ENDOFBUILD: 0

========================================


Thanks.

Leave a Comment
 
Attach a file