From 954b1655ac49576a4a8aae5daffe4a84c43f1fc5 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Tue, 1 Mar 2022 16:57:07 -0500 Subject: [PATCH] 18785: avoid error when /etc/cloud/cloud.cfg.d does not exist. Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- tools/salt-install/provision.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.30.2