2fb2422da8
Following the latest dib-lint reporting, make sure almost all the scripts are enabling -e, -u, and pipefail. This eases the discovery of failing commands, and the usage of unset variables. There are few exceptions with flags not set: * elements/hadoop-hdp/install.d/40-install-hdp, set -e when installing HDP 2.0, it tries to install tez, which does not seem to exist in Hortonworks' repositories * elements/ssh/install.d/33-ssh, set -e the version of augtool (part of augeas 0.10) in older Ubuntu versions (like Precise, needed by the cloudera plugin) exits with wrong return values in autosave mode * elements/storm/install.d/60-storm, set -e It tries to change the permission of /etc/supervisord.conf, which does not seem to exist Change-Id: Ic1314639dfc6a66c48ca87b6820707a2b0cb1dbd Partial-Bug: #1435306
20 lines
328 B
Bash
Executable File
20 lines
328 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
mkdir -p /opt/repos
|
|
mv /etc/yum.repos.d/* /opt/repos
|
|
cat >> /etc/yum.repos.d/fedora.repo <<EOF
|
|
[Local-Repository]
|
|
name=Fedora \$releasever - \$basearch - Local
|
|
baseurl=$FEDORA_MIRROR
|
|
enabled=1
|
|
gpgcheck=0
|
|
priority=1
|
|
EOF
|
|
yum makecache
|