From: Ward Vandewege Date: Tue, 1 Mar 2022 21:57:07 +0000 (-0500) Subject: 18785: avoid error when /etc/cloud/cloud.cfg.d does not exist. X-Git-Tag: 2.4.0~69^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/954b1655ac49576a4a8aae5daffe4a84c43f1fc5 18785: avoid error when /etc/cloud/cloud.cfg.d does not exist. Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- diff --git a/tools/salt-install/provision.sh b/tools/salt-install/provision.sh index f467c77e78..644b87cbbf 100755 --- a/tools/salt-install/provision.sh +++ b/tools/salt-install/provision.sh @@ -784,8 +784,10 @@ echo '\pset pager off' >> /root/.psqlrc salt-call --local state.apply -l ${LOG_LEVEL} # Finally, make sure that /etc/hosts is not overwritten on reboot -# TODO: will this work on CentOS? -sed -i 's/^manage_etc_hosts: true/#manage_etc_hosts: true/g' /etc/cloud/cloud.cfg.d/* +if [ -d /etc/cloud/cloud.cfg.d ]; then + # TODO: will this work on CentOS? + sed -i 's/^manage_etc_hosts: true/#manage_etc_hosts: true/g' /etc/cloud/cloud.cfg.d/* +fi # FIXME! #16992 Temporary fix for psql call in arvados-api-server if [ "x${DELETE_PSQL}" = "xyes" ]; then