sahara-image-elements/elements/hadoop-mapr/post-install.d/99-update-repository
Denis Egorenko db50f5ba97 Check distro name from DISTRO_NAME
Use default 'DISTRO_NAME' variable for check which distro is use
for current image build

Change-Id: Ieba71733fbcd554a1c7416efb0c4b740939d06a8
Closes-bug: #1436807
2015-03-27 17:09:35 +04:00

13 lines
242 B
Bash
Executable File

#!/bin/bash
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
if [ "$DISTRO_NAME" = "ubuntu" ]; then
apt-get update
elif [ "$DISTRO_NAME" = "centos" -o "$DISTRO_NAME" = "rhel" ]; then
yum clean all && yum repolist
fi