diff options
author | hongbo tian <hongbo.tianhongbo@huawei.com> | 2017-03-30 07:41:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-03-30 07:41:14 +0000 |
commit | 7142d98c73a477e077f1148117316ef12273f412 (patch) | |
tree | 8391f5bb0fbc8362902a58509bf6b5a3c4d20123 | |
parent | d2a04a76f9f03ca4c34cfed335c14d7c3319c634 (diff) | |
parent | 38faec3d879696191f9dba04508c616699c62445 (diff) |
Merge "dovetail tool: support centos 7"
-rwxr-xr-x | utils/launch_db.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/utils/launch_db.sh b/utils/launch_db.sh index 008c9600..f3681665 100755 --- a/utils/launch_db.sh +++ b/utils/launch_db.sh @@ -82,9 +82,20 @@ echo "=================================" echo "Upload default project info to DB" echo "=================================" -# install python packages -sudo apt-get update > /dev/null -sudo apt-get install -y python-pip > /dev/null +# For Ubuntu, there is file /etc/lsb-release +# For Centos and redhat, there is file /etc/redhat-release +if [ -f /etc/lsb-release ]; then + sudo apt-get update > /dev/null + sudo apt-get install -y python-pip > /dev/null +elif [ -f /etc/redhat-release ]; then + sudo yum -y update > /dev/null + sudo yum -y install epel-release > /dev/null + sudo yum -y install python-pip > /dev/null +else + echo "This operating system is not currently supported." + exit 1 +fi + pip install requests > /dev/null echo "Init DB info..." |