deployment: do not overwrite /etc/hosts if it was retrieved from mgmt system

From: Michael Prokop <mprokop@sipwise.com>
ksolomko/vlan
Michael Prokop 13 years ago
parent ec3be7ff90
commit 60ea9fd1ed

@ -1301,17 +1301,21 @@ EOF
# append hostnames of sp1/sp2 so they can talk to each other
# in the HA setup
if "$PRO_EDITION" ; then
cat >> $TARGET/etc/hosts << EOF
if "$RETRIEVE_MGMT_CONFIG" ; then
echo "Nothing to do, /etc/hosts was already set up."
else
if "$PRO_EDITION" ; then
cat >> $TARGET/etc/hosts << EOF
$IP1 sp1
$IP2 sp2
EOF
else
# otherwise 'hostname --fqdn' does not work and causes delays with exim4 startup
cat >> $TARGET/etc/hosts << EOF
else
# otherwise 'hostname --fqdn' does not work and causes delays with exim4 startup
cat >> $TARGET/etc/hosts << EOF
# required for FQDN, please adjust if needed
127.0.0.1 $TARGET_HOSTNAME
EOF
fi
fi
if [ -n "$PUPPET" ] ; then

Loading…
Cancel
Save