HDDS-1630. Copy default configuration files to the writeable directory (#888)

This commit is contained in:
Elek, Márton 2019-06-11 20:07:12 +02:00 committed by Anu Engineer
parent cef996659f
commit 3f6d7a6ce2
1 changed files with 13 additions and 1 deletions

View File

@ -96,7 +96,19 @@ if [ -n "$KERBEROS_ENABLED" ]; then
sed "s/SERVER/$KERBEROS_SERVER/g" "$DIR"/krb5.conf | sudo tee /etc/krb5.conf
fi
"$DIR"/envtoconf.py --destination "${HADOOP_CONF_DIR:-/opt/hadoop/etc/hadoop}"
CONF_DESTINATION_DIR="${HADOOP_CONF_DIR:-/opt/hadoop/etc/hadoop}"
#Try to copy the defaults
set +e
if [[ -d "/opt/ozone/etc/hadoop" ]]; then
cp /opt/hadoop/etc/hadoop/* "$CONF_DESTINATION_DIR/" > /dev/null 2>&1
elif [[ -d "/opt/hadoop/etc/hadoop" ]]; then
cp /opt/hadoop/etc/hadoop/* "$CONF_DESTINATION_DIR/" > /dev/null 2>&1
fi
set -e
"$DIR"/envtoconf.py --destination "$CONF_DESTINATION_DIR"
if [ -n "$ENSURE_NAMENODE_DIR" ]; then
CLUSTERID_OPTS=""