X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=env%2Fubuntu%2Fbootloader-env%2F02_clean_bootloader_package_req.sh;h=1f6c474e69fb5ba38f5af2f61be2a37d3025b65f;hb=d97c70768d15571872233922caf17c4a4c34065b;hp=9c20cf26c5ca5a0accdb3bfa03e48450955d4e05;hpb=71cde293d4753a07a5da01f410a7c3f94b600ace;p=icn.git diff --git a/env/ubuntu/bootloader-env/02_clean_bootloader_package_req.sh b/env/ubuntu/bootloader-env/02_clean_bootloader_package_req.sh index 9c20cf2..1f6c474 100755 --- a/env/ubuntu/bootloader-env/02_clean_bootloader_package_req.sh +++ b/env/ubuntu/bootloader-env/02_clean_bootloader_package_req.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -ex +set -eux -o pipefail source $(dirname $PWD)/../lib/common.sh source $(dirname $PWD)/../lib/logging.sh @@ -17,17 +17,21 @@ function autoremove { function clean_essential_packages { apt-get update for package in crudini curl dnsmasq figlet golang nmap patch psmisc \ - python-pip python-requests python-setuptools vim wget; do + python3-pip python3-requests python3-setuptools vim wget; do apt-get remove $package -y done + update-alternatives --remove python /usr/bin/python3 + update-alternatives --remove pip /usr/bin/pip3 autoremove } function check_prerequisite { if !(which pip); then - apt-get install python-pip -y + apt-get install python3-pip -y fi + update-alternatives --install /usr/bin/python python /usr/bin/python3 1 + update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 if !(which curl); then apt-get install curl -y @@ -39,9 +43,9 @@ function check_prerequisite { } function clean_ironic_packages { - for package in python-ironicclient \ - python-ironic-inspector-client \ - python-openstackclient genisoimage; do + for package in python3-ironicclient \ + python3-ironic-inspector-client \ + python3-openstackclient genisoimage; do apt-get remove $package -y done }