|
...
|
...
|
@@ -234,6 +234,13 @@ safe_chmod 0755 $DEST
|
|
234
|
234
|
# a basic test for $DEST path permissions (fatal on error unless skipped)
|
|
235
|
235
|
check_path_perm_sanity ${DEST}
|
|
236
|
236
|
|
|
|
237
|
+# Certain services such as rabbitmq require that the local hostname resolves
|
|
|
238
|
+# correctly. Make sure it exists in /etc/hosts so that is always true.
|
|
|
239
|
+LOCAL_HOSTNAME=`hostname -s`
|
|
|
240
|
+if [ -z "`grep ^127.0.0.1 /etc/hosts | grep $LOCAL_HOSTNAME`" ]; then
|
|
|
241
|
+ sudo sed -i "s/\(^127.0.0.1.*\)/\1 $LOCAL_HOSTNAME/" /etc/hosts
|
|
|
242
|
+fi
|
|
|
243
|
+
|
|
237
|
244
|
# Set ``OFFLINE`` to ``True`` to configure ``stack.sh`` to run cleanly without
|
|
238
|
245
|
# Internet access. ``stack.sh`` must have been previously run with Internet
|
|
239
|
246
|
# access to install prerequisites and fetch repositories.
|