Fix some bugs in install.script.
Change-Id: I3ed6954a958563f0b8759609e6cc17ad125b69dc
This commit is contained in:
parent
a86730d5b3
commit
ec24bb4208
@ -241,11 +241,7 @@ libgt-0.3.11-1.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION_MAJOR}.${CENTOS_
|
||||
liblogging-1.0.4-1.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION_MAJOR}.${CENTOS_IMAGE_ARCH}.rpm
|
||||
rsyslog-7.6.3-1.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION_MAJOR}.${CENTOS_IMAGE_ARCH}.rpm"
|
||||
for f in $centos_ppa_repo_rsyslog_packages; do
|
||||
if [ "$REGION" == "asia" ]; then
|
||||
download http://mirrors.yun-idc.com/epel/${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/$f $f copy /var/lib/cobbler/repo_mirror/centos_ppa_repo/ || exit $?
|
||||
else
|
||||
download http://rpms.adiscon.com/v7-stable/epel-${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/RPMS/$f $f copy /var/lib/cobbler/repo_mirror/centos_ppa_repo/ || exit $?
|
||||
fi
|
||||
download http://rpms.adiscon.com/v7-stable/epel-${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/RPMS/$f $f copy /var/lib/cobbler/repo_mirror/centos_ppa_repo/ || exit $?
|
||||
done
|
||||
|
||||
# download chef client for centos ppa repo
|
||||
|
@ -58,7 +58,7 @@ export UBUNTU_IMAGE_NAME=${UBUNTU_IMAGE_NAME:-"${UBUNTU_IMAGE_TYPE}-${UBUNTU_IMA
|
||||
export UBUNTU_IMAGE_ARCH=${UBUNTU_IMAGE_ARCH:-"x86_64"}
|
||||
export UBUNTU_IMAGE_ARCH_OTHER=${UBUNTU_IMAGE_ARCH_OTHER:-"amd64"}
|
||||
export UBUNTU_IMAGE_SOURCE=${UBUNTU_IMAGE_SOURCE:-"http://releases.ubuntu.com/${UBUNTU_IMAGE_VERSION}/${UBUNTU_IMAGE_TYPE,,}-${UBUNTU_IMAGE_VERSION}${UBUNTU_IMAGE_PATCH_VERSION}-server-${UBUNTU_IMAGE_ARCH_OTHER}.iso"}
|
||||
export UBUNTU_IMAGE_SOURCE_ASIA=${UBUNTU_IMAGE_SOURCE:-"http://mirros.ustc.edu.cn/ubuntu-releases/${UBUNTU_IMAGE_VERSION}/${UBUNTU_IMAGE_TYPE,,}-${UBUNTU_IMAGE_VERSION}${UBUNTU_IMAGE_PATCH_VERSION}-server-${UBUNTU_IMAGE_ARCH_OTHER}.iso"}
|
||||
export UBUNTU_IMAGE_SOURCE_ASIA=${UBUNTU_IMAGE_SOURCE_ASIA:-"http://mirros.ustc.edu.cn/ubuntu-releases/${UBUNTU_IMAGE_VERSION}/${UBUNTU_IMAGE_TYPE,,}-${UBUNTU_IMAGE_VERSION}${UBUNTU_IMAGE_PATCH_VERSION}-server-${UBUNTU_IMAGE_ARCH_OTHER}.iso"}
|
||||
|
||||
export COBBLER_PASSWORD=${COBBLER_PASSWORD:-"cobbler"}
|
||||
|
||||
|
@ -221,7 +221,7 @@ yum-plugin-priorities-1.1.30-14.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION
|
||||
|
||||
for f in $centos_ppa_repo_packages; do
|
||||
if [ "$REGION" == "asia" ]; then
|
||||
download http://mirrors.yun-idc.com/${CENTOS_IMAGE_TYPE,,}/${CENTOS_IMAGE_VERSION}/os/${CENTOS_IMAGE_ARCH}/Packages/$f $f copy /var/lib/cobbler/repo_mirror/centos_ppa_repo/ || exit $?
|
||||
download http://mirrors.yun-idc.com/${CENTOS_IMAGE_TYPE,,}/${CENTOS_IMAGE_VERSION}/os/${CENTOS_IMAGE_ARCH}/Packages/$f $f || exit $?
|
||||
else
|
||||
download http://rpmfind.net/linux/${CENTOS_IMAGE_TYPE,,}/${CENTOS_IMAGE_VERSION}/os/${CENTOS_IMAGE_ARCH}/Packages/$f $f || exit $?
|
||||
fi
|
||||
@ -235,11 +235,7 @@ liblogging-1.0.4-1.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION_MAJOR}.${CEN
|
||||
rsyslog-7.6.3-1.${CENTOS_IMAGE_TYPE_OTHER}${CENTOS_IMAGE_VERSION_MAJOR}.${CENTOS_IMAGE_ARCH}.rpm"
|
||||
|
||||
for f in $centos_ppa_repo_rsyslog_packages; do
|
||||
if [ "$REGION" == "asia" ]; then
|
||||
download http://mirrors.yun-idc.com/epel/${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/$f $f copy /var/lib/cobbler/repo_mirror/centos_ppa_repo/ || exit $?
|
||||
else
|
||||
download http://rpms.adiscon.com/v7-stable/epel-${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/RPMS/$f $f || exit $?
|
||||
fi
|
||||
download http://rpms.adiscon.com/v7-stable/epel-${CENTOS_IMAGE_VERSION_MAJOR}/${CENTOS_IMAGE_ARCH}/RPMS/$f $f || exit $?
|
||||
done
|
||||
|
||||
download $CHEF_CLIENT `basename $CHEF_CLIENT` || exit $?
|
||||
@ -259,7 +255,9 @@ else
|
||||
fi
|
||||
|
||||
# download local repo
|
||||
download -f https://s3-us-west-1.amazonaws.com/compass-local-repo/local_repo.tar.gz local_repo.tar.gz || exit $?
|
||||
if [[ $LOCAL_REPO = "y" ]]; then
|
||||
download -f https://s3-us-west-1.amazonaws.com/compass-local-repo/local_repo.tar.gz local_repo.tar.gz || exit $?
|
||||
fi
|
||||
|
||||
# Install net-snmp
|
||||
echo "install snmp config"
|
||||
|
@ -10,6 +10,6 @@ NEXTSERVER=\${NEXTSERVER:-$NEXTSERVER}
|
||||
IP_START=\${IP_START:-$IP_START}
|
||||
IP_END=\${IP_END:-$IP_END}
|
||||
LOCAL_REPO=\${LOCAL_REPO:-$LOCAL_REPO}
|
||||
REGION=\$(REGION:-$REGION}
|
||||
REGION=\${REGION:-$REGION}
|
||||
EOF
|
||||
chmod ugo+x $SCRIPT_DIR/env.conf
|
||||
|
Loading…
Reference in New Issue
Block a user