#!/bin/bash # Atomic Secured Linux # Copyright Atomicorp, 2010-2012 # Summary: Atomic Secured Linux Lite installer # Name: asl-lite # License: Commercial, unauthorized redistribution is not permitted # All rights reserved. # TODO INSTALLER_VER=2.0.6 VERSION=1.0 SERVER=atomicorp.com ARCH=`uname -i` STATIC=0 GET=/usr/bin/wget SOURCEINSTALL=0 # Files for source installs ROOT_UID="0" #Check if run as root if [ "$UID" -ne "$ROOT_UID" ] ; then echo "You must be root to run this program." exit 1 fi if [ $0 != "sh" ]; then echo "ERROR: This program cannot be run locally. Please try again with:" echo " wget -q -O - http://www.atomicorp.com/installers/asl-lite |sh" exit 1 fi echo if [ -f /etc/redhat-release ]; then RELEASE=`cat /etc/redhat-release | awk -F\( '{print $1}'` else STATIC=1 fi # Source Install function, from the ASL installer function sourceinstall { # Module check echo -n " mod_unique_id check: " $HTTPD -l |grep -q unique RETVAL=$? if [ ! "$RETVAL" = 0 ]; then echo "failed." echo " mod_unique_id support in apache is required. You will need to" echo " rebuild apache with support to continue installing ASL." if [ $CPANEL ]; then echo " Please contact http://www.cpanel.net/additional-support-options.html" echo " if you need further assistance." fi echo echo exit 1 else echo "passed." echo fi # Clear work directory if [ -d /root/atomic ]; then rm -rf /root/atomic fi mkdir /root/atomic cd /root/atomic/ # Prep yum yum clean all # Prep dev tools yum -y --disableexcludes=all --skip-broken groupinstall "Development Tools" || exit 1 # Fix 1: Correct bash profile, move cpanel functions to a separate file if [ $CPANEL ]; then # copy over mangled bashrc $GET -q http://www.atomicorp.com/installers/cpanel/bashrc || exit 1 $GET -q http://www.atomicorp.com/installers/cpanel/profile-cpanel.sh || exit 1 # import cpanel functions to /etc/profile.d/cpanel.sh chattr -i /etc/bashrc install -m 0755 bashrc /etc/bashrc install -m 0755 profile-cpanel.sh /etc/profile.d/cpanel.sh source /etc/profile source /etc/bashrc # Fix 2: Correct /etc/init.d/mysqld script ln -sf /etc/init.d/mysql /etc/init.d/mysqld fi yum --disableexcludes=all -y install pcre pcre-devel # Fix X: Reduce spurious header files that cause conflicts if [ -f /usr/local/apache/include/pcre.h ]; then rm -f /usr/local/apache/include/pcre.h fi if [ $DIRECTADMIN ]; then # Test X: download & build mod_security if [ ! -f $MODSEC ]; then $GET http://www.atomicorp.com/installers/cpanel/$MODSEC fi yum -y install pcre pcre-devel ./configure \ --disable-pcre-match-limit \ --disable-pcre-match-limit-recursion \ --with-pcre=/usr || exit 1 # Fix their config if [ ! grep -q "Include conf.d/*.conf" $HTTP_CONF ]; then echo "Include conf.d/*.conf" > /root/atomic/httpd.conf cat $HTTP_CONF >> /root/atomic/httpd.conf cp /root/atomic/httpd.conf $HTTP_CONF fi make make install fi # TODO: Test X: Configure rule storage directory location & default config if [ ! -d /etc/httpd/modsecurity.d ]; then mkdir -p /etc/httpd/modsecurity.d fi if [ ! -d /etc/httpd/conf.d ]; then mkdir -p /etc/httpd/conf.d fi # Permissions check if [ $CPANEL ]; then chown nobody.nobody /var/asl/data/msa chown nobody.nobody /var/asl/data/audit if [ ! -d /var/asl/data/suspicious ]; then mkdir -p /var/asl/data/suspicious fi chown nobody.nobody /var/asl/data/suspicious chmod o-rx -R /var/asl/data/* chmod ug+rwx -R /var/asl/data/* # Add hook cd /root/atomic $GET http://www.atomicorp.com/installers/cpanel/template-cpanel-apache-hook install -m0755 /root/atomic/template-cpanel-apache-hook /scripts/posteasyapache # Install event /scripts/posteasyapache fi if [ ! -d /etc/httpd/conf.d ]; then mkdir /etc/httpd/conf.d fi if [ ! -d /etc/httpd/modsecurity.d ]; then mkdir /etc/httpd/modsecurity.d fi # TODO: config if [ -f /usr/local/apache/modules/mod_security2.so ]; then /usr/bin/md5sum /usr/local/apache/modules/mod_security2.so > /var/asl/data/manifest fi if [ -f /usr/lib/apache/mod_security2.so ] ;then /usr/bin/md5sum /usr/lib/apache/mod_security2.so > /var/asl/data/manifest fi } # End source install function # # Check input function # 3 vars, the message to prompt, valid responses, and default response # Example: check_input "Some question (yes/no) " "yes|no" "yes" function check_input { message=$1 validate=$2 default=$3 while [ $? -ne 1 ]; do echo -n "$message " read INPUTTEXT < /dev/tty if [ "$INPUTTEXT" == "" -a "$default" != "" ]; then INPUTTEXT=$default return 1 fi echo $INPUTTEXT | egrep -q "$validate" && return 1 echo "Invalid input" done } # Static install function staticinstall { CONFIG=0 # Back up config file if it exists if [ -f /etc/asl/config ]; then cp /etc/asl/config /etc/asl/config.bak CONFIG=1 fi # grab latest asl-lite if [ ! -d /tmp/asl-root ]; then mkdir /tmp/asl-root fi cd /tmp/asl-root wget -q http://www.atomicorp.com/installer/ASL-Lite/asl-lite.tar.gz cd / tar zxvf /tmp/asl-root/asl-lite.tar.gz rm -rf /tmp/asl-root chown -R root.root /etc/asl chown -R root.root /var/asl chmod -R 700 /var/asl chmod -R 700 /etc/asl if [ -d /usr/local/cpanel ]; then WEB_USER="nobody.nobody" else WEB_USER="apache.apache" fi chown $WEB_USER /var/asl/data/audit chown $WEB_USER /var/asl/data/msa chown $WEB_USER /var/asl/data/suspicious chmod 770 /var/asl/data/audit chmod o-rx -R /var/asl/data/* chmod ug+rwx -R /var/asl/data/* touch /etc/asl/whitelist # Restore config if [ $CONFIG == 1 ]; then cp /etc/asl/config.bak /etc/asl/config fi # Link asl-lite to /usr/bin ln -sf /var/asl/bin/asl-lite /usr/bin/asl-lite # redundancy ln -sf /var/asl/bin/asl-lite /var/asl/bin/asl ln -sf /var/asl/bin/asl-lite /usr/bin/asl } clear echo echo "This product is unsupported and is no longer maintained." echo "Its has been replaced with Atomic Secured Linux. Please see" echo "URL below:" echo echo "https://www.atomicorp.com/products/asl.html" echo echo "Press any key if you still wish to install this unsupported product" echo "or Ctrl-C to exit." read break < /dev/tty clear echo echo "Atomic Secured Linux Lite Installer (v$INSTALLER_VER)" echo "Further Documentation is available at: " echo "https://www.atomicorp.com/wiki/index.php/ASL_Lite" echo echo "This product is unsupported and is no longer maintained." echo "Its has been replaced with Atomic Secured Linux. Please see" echo "URL below:" echo echo "https://www.atomicorp.com/products/asl.html" echo echo "Hit any key to view the License agreement to install, or Ctrl-C to exit" echo read break < /dev/tty cat << EOF | less -e -M ATOMICORP MASTER END USER LICENSE AGREEMENT NOTICE: BY DOWNLOADING AND INSTALLING, COPYING OR OTHERWISE USING THE SOFTWARE, YOU AGREE TO BE BOUND BY THE TERMS OF THIS EULA. IF YOU DO NOT AGREE TO THE TERMS OF THIS EULA, YOU MAY NOT DOWNLOAD, INSTALL, COPY OR USE THE SOFTWARE, AND YOU MAY RETURN THE UNUSED SOFTWARE TO THE VENDOR FROM WHICH YOU ACQUIRED IT WITHIN THIRTY (30) DAYS AND REQUEST A REFUND OF THE LICENSE FEE, IF ANY, ALREADY PAID UPON SHOWING PROOF OF PAYMENT. "YOU" MEANS THE NATURAL PERSON OR THE ENTITY THAT IS AGREEING TO BE BOUND BY THIS EULA, THEIR EMPLOYEES AND THIRD PARTY CONTRACTORS THAT PROVIDE SERVICES TO YOU. YOU SHALL BE LIABLE FOR ANY FAILURE BY SUCH EMPLOYEES AND THIRD PARTY CONTRACTORS TO COMPLY WITH THE TERMS OF THIS AGREEMENT. 1.0 GRANT AND USE RIGHTS FOR SOFTWARE. 1.1 License. The Software is licensed, not sold. Subject to the terms of this EULA, Atomicorp hereby grants you a non-exclusive, non-transferable license, without rights to sublicense, to use the object code of the Software for the purpose as set forth in the applicable documentation for the Software and to the extent permitted by your payment of applicable license fees under an Atomicorp approved licensing model and/or your Software License Key subject to the software product specific terms specified in this EULA. Depending upon the model utilized to compute the applicable license fees paid by you to use the Software (whether per physical server, per Virtual server, per user, or any other Atomicorp approved licensing model), an applicable Software License subscription may limit your usage of the Software accordingly. You may use the documentation accompanying the Software in connection with permitted uses of the Software. 1.2 License Limitations. You may not copy the Software except for a reasonable number of machine-readable copies of the Software for backup or archival purposes and except as expressly permitted in this EULA. You may not remove any titles, trademarks or trade names, copyright notices, legends, or other proprietary markings on the Software. You are not granted any rights to any trademarks or service marks of Atomicorp. Atomicorp retains all rights not expressly granted to you. 1.3 Restrictions. You may not (i) sell, lease, license, sublicense, distribute or otherwise transfer in whole or in part the Software or the Software License subscription to another party; (ii) provide, disclose, divulge or make available to, or permit use of the Software in whole or in part by, any third party (except Designated Administrative Access) without Atomicorp's prior written consent; or (iii) modify or create derivative works based upon the Software. Except to the extent expressly permitted by applicable law, and to the extent that Atomicorp is not permitted by that applicable law to exclude or limit the following rights, you may not decompile, disassemble, reverse engineer, or otherwise attempt to derive source code from the Software, in whole or in part. You may use the Software to conduct internal performance testing and benchmarking studies, the results of which you (and not unauthorized third parties) may publish or publicly disseminate; provided that Atomicorp has reviewed and approved of the methodology, assumptions and other parameters of the study. Please contact Atomicorp at support@atomicorp.com to request such review. 1.4 GPL Software. You can redistribute and/or modify the GPL Software under the terms of the GPL. You may obtain a copy of the source code corresponding to the binaries for the GPL Software (the "GPL Source Files") by downloading the GPL Source Files from Atomicorp's Web site at http://www.atomicorp.com/download/, or by sending a request, with your name and address, to Atomicorp at the address specified under the heading "Contact Information" below, in which case Atomicorp will mail a copy of the GPL Source Files to you on a CD or equivalent physical medium. This offer to obtain a copy of the GPL Source Files is valid for one year from the date you acquired this Software product. 1.5 Audit Rights. You will maintain accurate records as to your use of the Software as authorized by this Agreement, for at least two (2) years from the last day on which support and subscription services ("Services") expired for the applicable Software. Atomicorp, or persons designated by Atomicorp, will, at any time during the period when you are obliged to maintain such records, be entitled to inspect such records and your computing devices, in order to verify that the Software is used by you in accordance with the terms of this Agreement and that you have paid the applicable license fees and Services fees for the Software; provided that Atomicorp may conduct no more than one (1) audit in any twelve (12) month period. You shall promptly pay to Atomicorp any underpayments revealed by any such audit. Any such audit will be performed at Atomicorp's expense during normal business hours, provided that you shall promptly reimburse Atomicorp for the cost of such audit and any applicable fees if such audit reveals an underpayment by you of more than five percent (5%) of the amounts payable by you to Atomicorp for the period audited. 2.0 TITLE Atomicorp retains all right, title, and interest in and to the Software and the Software License Key and in all related copyrights, trade secrets, patents, trademarks, and any other intellectual and industrial property and proprietary rights, including registrations, applications, renewals, and extensions of such rights. 3.0 SUPPORT AND SUBSCRIPTION SERVICES Atomicorp will provide email support services under this EULA. Extended support services may be negotiated with Atomicorp directly. Email support is available between the hours of 9am and 5pm EST. If you use spam filtering, please ensure that you allow support@atomicorp.com to enable us to respond to your support requests. It is your responsibility to ensure that this is allowed. By agreeing to this EULA you are accepting full risk and responsibility for communication from our support organization, and lose any any all rights of rebuke therein. This EULA does not give you any rights to any updates or upgrades to the Software or to any extensions or enhancements to the Software developed by Atomicorp outside of the Atomic Secured Linux subscription period. in the future. If you have purchased Atomicorp support and subscription services with the Software, these services are provided to you under the Support Contract Terms and Conditions posted on Atomicorp's Web site at http://www.atomicorp.com/support/ and by accepting the terms of this EULA you are accepting these Support Contract Terms and Conditions. Any supplemental software code or related materials that Atomicorp provides to you as part of any support and subscription services are to be considered part of the Software and are subject to the terms and conditions of this EULA. Atomicorp may use any technical information you provide to Atomicorp for any Atomicorp business purposes without restriction, including for product support and development. Atomicorp will not use information in a form that personally identifies you. 4.0 TERMINATION 4.1 Termination. Atomicorp may terminate this EULA immediately and without notice if you fail to comply with any term of this EULA. 4.2 Effect of Termination. In the event of termination, you must destroy all copies of the Software. In addition you must remove all copies of the Software, including all backup copies, from all computers and terminals on which it is installed. From time to time, Atomicorp may change the terms of this EULA. Atomicorp will notify you of such change. Your continued use of the Software will indicate your agreement to the change. 5. LIMITED WARRANTY AND LIMITATION OF LIABILITY 5.1 Limited Warranty. Atomicorp warrants that the media, if any, on which the Software is delivered will be free of defects and that the Software will substantially conform to the description contained in the applicable end user documentation in each case for a period of 90 days after the date of activation of the Software subscription. EXCEPT FOR THE PRECEDING EXPRESS LIMITED WARRANTY, TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, ATOMICORP AND ITS LICENSORS PROVIDE THE SOFTWARE WITHOUT ANY WARRANTIES OF ANY KIND, EXPRESS, IMPLIED, STATUTORY, OR IN ANY OTHER PROVISION OF THIS EULA OR COMMUNICATION WITH YOU, AND ATOMICORP AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON- INFRINGEMENT. 5.2 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL ATOMICORP AND ITS LICENSORS BE LIABLE FOR ANY LOST PROFITS OR BUSINESS OPPORTUNITIES, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, OR ANY OTHER INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES UNDER ANY THEORY OF LIABILITY, WHETHER BASED IN CONTRACT, TORT, NEGLIGENCE, PRODUCT LIABILITY, OR OTHERWISE. BECAUSE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE PRECEDING LIMITATION MAY NOT APPLY TO YOU. ATOMICORP AND ITS LICENSORS' LIABILITY UNDER THIS EULA WILL NOT, IN ANY EVENT, EXCEED THE LICENSE FEES, IF ANY, PAID BY YOU FOR THE SOFTWARE LICENSED TO YOU UNDER THIS EULA. THE FOREGOING LIMITATIONS SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, REGARDLESS OF WHETHER ATOMICORP OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF WHETHER ANY REMEDY FAILS OF ITS ESSENTIAL PURPOSE. 6.0 GENERAL 6.1 Entire Agreement. This Agreement sets forth Atomicorp's entire liability and your exclusive remedy with respect to the Software and supersedes the terms of any purchase orders and any other communications or advertising with respect to the Software. You acknowledge that this Agreement is a complete statement of the agreement between you and Atomicorp with respect to the Software, and that there are no other prior or contemporaneous understandings, promises, representations, or descriptions with respect to the Software. 6.2 Headings. Headings under this EULA are intended only for convenience and shall not affect the interpretation of this EULA. 6.3 Waiver and Modification. No failure of either party to exercise or enforce any of its rights under this EULA will act as a waiver of those rights. This EULA may only be modified, or any rights under it waived, by a written document executed by the party against which it is asserted. 6.4 Severability. If any provision of this EULA is found illegal or unenforceable, it will be enforced to the maximum extent permissible, and the legality and enforceability of the other provisions of this EULA will not be affected. 6.5 Governing Law. This EULA will be governed by Virginia law and the United States of America, without regard to its choice of law principles. The United Nations Convention for the International Sale of Goods shall not apply. 6.6 Government Restrictions. You may not export or re- export the Software except in compliance with the United States Export Administration Act and the related rules and regulations and similar non-U.S. government restrictions, if applicable. The Software and accompanying documentation are deemed to be "commercial computer software" and "commercial computer software documentation," respectively, pursuant to DFAR Section 227.7202 and FAR Section 12.212(b), as applicable. Any use, modification, reproduction, release, performing, displaying, or disclosing of the Software by the U.S. Government shall be governed solely by the terms of this EULA. 6.7 Contact Information. If you have any questions about this EULA, or if you want to contact Atomicorp for any reason, please direct all correspondence to: Atomicorp, Inc., 14121 Parke-long Court, Suite 220 Chantilly, Virginia 20151 or email support@atomicorp.com. 6.8 Other. Atomicorp and Atomic Secured Linux are trademarks and/or registered trademarks of Atomicorp, Inc. in the United States and/or various jurisdictions. EOF check_input "Do you agree to these terms? (yes/no) [Default: yes]" "yes|no" "yes" query=$INPUTTEXT if [ "$query" == "no" ]; then echo "Exiting" echo exit 1 fi echo "Performing Basic environment checks" if [ -d /usr/local/directadmin ] ; then DIRECTADMIN=1 SOURCEINSTALL=1 if [ -f /usr/sbin/httpd ] ; then HTTPD=/usr/sbin/httpd else echo " Path to apache could not be determined. This is a custom environment" echo " Please contact the services group at support@atomicorp.com for a custom" echo " installation quote." echo exit 1 fi # Test X: determine httpd config file location if [ -f /etc/httpd/conf/httpd.conf ]; then HTTP_CONF="/etc/httpd/conf/httpd.conf" fi fi if [ -d /usr/local/cpanel ]; then CPANEL=1 SOURCEINSTALL=1 if [ -f /usr/local/apache/bin/httpd ] ; then HTTPD=/usr/local/apache/bin/httpd else echo " Path to apache could not be determined. This is a custom environment" echo " Please contact the services group at support@atomicorp.com for a custom" echo " installation quote." echo exit 1 fi # Test X: determine httpd config file location HTTP_CONF="/usr/local/apache/conf/httpd.conf" fi if [ $STATIC == 0 ]; then if grep -q "Red Hat Linux release 9 " /etc/redhat-release ; then DIST="rh9" DIR=redhat/9 echo echo "$RELEASE is not supported at this time, you will need to configure yum manually:" echo "see http://$SERVER for instructions" echo exit 1 elif grep -q "Fedora Core release 2 " /etc/redhat-release ; then DIST="fc2" DIR=fedora/2 echo echo "$RELEASE is not supported at this time, you will need to configure yum manually:" echo "see http://$SERVER for instructions" echo exit 1 elif grep -q "Fedora Core release 3 " /etc/redhat-release ; then DIST="fc3" DIR=fedora/3 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora Core release 4 " /etc/redhat-release ; then DIST="fc4" DIR=fedora/4 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora Core release 5 " /etc/redhat-release ; then DIST="fc5" DIR=fedora/5 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora Core release 6 " /etc/redhat-release ; then DIST="fc6" DIR=fedora/6 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora release 7 " /etc/redhat-release ; then DIST="fc7" DIR=fedora/7 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora release 8 " /etc/redhat-release ; then DIST="fc8" DIR=fedora/8 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora release 9 " /etc/redhat-release ; then DIST="fc9" DIR=fedora/9 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora release 10 " /etc/redhat-release ; then DIST="fc10" DIR=fedora/10 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora release 11 " /etc/redhat-release ; then DIST="fc11" DIR=fedora/11 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora release 12 " /etc/redhat-release ; then DIST="fc12" DIR=fedora/12 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora release 13 " /etc/redhat-release ; then DIST="fc13" DIR=fedora/13 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora release 14 " /etc/redhat-release ; then DIST="fc14" DIR=fedora/14 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Fedora release 15 " /etc/redhat-release ; then DIST="fc15" DIR=fedora/15 YUMDEPS="fedora-release python-elementtree python-sqlite python-urlgrabber yum" elif grep -q "Red Hat Enterprise Linux ES release 3 " /etc/redhat-release ; then DIST="el3" DIR=redhat/3 echo echo "$RELEASE is not supported at this time, you will need to configure yum manually:" echo "see http://$SERVER for instructions" echo exit 1 elif grep -q "CentOS release 3" /etc/redhat-release ; then DIST="el3" DIR=centos/3 echo echo "$RELEASE is not supported at this time, you will need to configure yum manually:" echo "see http://$SERVER for instructions" echo exit 1 elif egrep -q "Red Hat Enterprise Linux (A|E)S release 4" /etc/redhat-release ; then DIST="el4" DIR=redhat/4 YUMDEPS="python-elementtree python-sqlite python-urlgrabber yum sqlite libxml2-python" REDHAT=1 elif grep -q "CentOS release 4" /etc/redhat-release ; then DIST="el4" DIR=centos/4 YUMDEPS="centos-release python-elementtree python-sqlite python-urlgrabber yum sqlite" elif grep -q "Red Hat Enterprise Linux Server release 5" /etc/redhat-release ; then DIST="el5" DIR=centos/5 YUMDEPS="centos-release python-elementtree python-sqlite python-urlgrabber yum sqlite m2crypto" elif egrep -q "(CentOS release 5|Scientific Linux CERN SLC release 5|Scientific Linux SL release 5|CloudLinux Server release 5)" /etc/redhat-release ; then DIST="el5" DIR=centos/5 YUMDEPS="centos-release python-elementtree python-sqlite python-urlgrabber yum sqlite m2crypto" elif egrep -q "(CentOS Linux release 6|Scientific Linux release 6|Red Hat Enterprise Linux.*release 6|CentOS release 6)" /etc/redhat-release ; then DIST="el6" DIR=centos/6 YUMDEPS="centos-release python-elementtree python-sqlite python-urlgrabber yum sqlite m2crypto" else echo "Unable to determine distribution type." echo "Would you like to install the Static build for ASL Lite?" check_input "Would you like to install the Static build for ASL Lite? (yes/no) [Default: yes" "yes|no" "yes" if [ "$INPUTTEXT" == "yes" ]; then STATIC=1 else echo "Exiting ASL Lite installer" exit 1 fi fi fi # Yum install function function installyum { CMD=$1 if [ -d atomic/yumdeps ]; then rm -rf atomic/yumdeps fi mkdir -p atomic/yumdeps/ cd atomic/yumdeps wget -q http://$SERVER/installers/yum/$DIST-$ARCH-yumdeps.tar.gz || exit 1 tar zxf $DIST-$ARCH-yumdeps.tar.gz for i in $YUMDEPS; do rpm --quiet --queryformat=%{NAME} -q $i || INSTALLDEPS="$i*rpm $INSTALLDEPS" done rpm -Uvh $CMD $INSTALLDEPS || exit 1 } if [ $STATIC != 1 ]; then echo -n "Installing the Atomic GPG key: " if [ ! -f /etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt ]; then wget -q http://www.atomicrocketturtle.com/RPM-GPG-KEY.art.txt -O /etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt 1>/dev/null 2>&1 fi #rpm -import /etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt 1>/dev/null echo "OK" if [ ! -f /usr/bin/yum ]; then echo "Yum was not detected. Attempting to resolve.. " echo # for everyone else installyum YUM=1 else YUM=1 fi echo echo echo "Installing and setting up Atomic yum respository" wget -q -O - http://www.atomicorp.com/installers/atomic |sh # Install asl lite echo "Installing ASL Lite" yum -y --disableexcludes=all install asl-lite || STATIC=1 #yum -y install asl-lite if [ ! -f /var/asl/bin/asl-lite ]; then echo "Yum could not install asl-lite on your system due to a dependency problem." echo " Falling Back on a static installation method" staticinstall else ln -sf /var/asl/bin/asl-lite /var/asl/bin/asl ln -sf /var/asl/bin/asl-lite /usr/bin/asl fi else # We're on an unknown distro staticinstall fi if [ $SOURCEINSTALL -ge 1 ]; then sourceinstall fi if [ -f /var/asl/bin/asl-lite ]; then echo echo "This product is unsupported and is no longer maintained." echo echo "ASL Lite installation has completed. To configure ASL lite run the following:" echo echo " /var/asl/bin/asl-lite -c" echo else echo "Error: ASL Lite could not be installed." exit 1 fi