You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whirr.apache.org by ab...@apache.org on 2012/08/21 15:34:12 UTC
svn commit: r1375538 - in /whirr/branches/branch-0.8: CHANGES.txt
core/src/main/resources/functions/configure_hostnames.sh
src/site/xdoc/release-notes.xml
Author: abayer
Date: Tue Aug 21 13:34:11 2012
New Revision: 1375538
URL: http://svn.apache.org/viewvc?rev=1375538&view=rev
Log:
WHIRR-635. Ensure hostname update as required by AUTO_HOSTNAME_SUFFIX is consistent for RHEL derivatives. Contributed by Graham Gear
Modified:
whirr/branches/branch-0.8/CHANGES.txt
whirr/branches/branch-0.8/core/src/main/resources/functions/configure_hostnames.sh
whirr/branches/branch-0.8/src/site/xdoc/release-notes.xml
Modified: whirr/branches/branch-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.8/CHANGES.txt?rev=1375538&r1=1375537&r2=1375538&view=diff
==============================================================================
--- whirr/branches/branch-0.8/CHANGES.txt (original)
+++ whirr/branches/branch-0.8/CHANGES.txt Tue Aug 21 13:34:11 2012
@@ -121,6 +121,10 @@ Release 0.8.0 - 2012-08-17
BUG FIXES
+ WHIRR-635. Ensure hostname update as required by
+ AUTO_HOSTNAME_SUFFIX is consistent for RHEL derivatives (Graham
+ Gear via abayer)
+
WHIRR-640. Ensure minRam is set for CDH recipes and test
properties. (abayer)
Modified: whirr/branches/branch-0.8/core/src/main/resources/functions/configure_hostnames.sh
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.8/core/src/main/resources/functions/configure_hostnames.sh?rev=1375538&r1=1375537&r2=1375538&view=diff
==============================================================================
--- whirr/branches/branch-0.8/core/src/main/resources/functions/configure_hostnames.sh (original)
+++ whirr/branches/branch-0.8/core/src/main/resources/functions/configure_hostnames.sh Tue Aug 21 13:34:11 2012
@@ -21,7 +21,12 @@ function configure_hostnames() {
if [ ! -z $AUTO_HOSTNAME_SUFFIX ]; then
PUBLIC_IP=`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
HOSTNAME=${AUTO_HOSTNAME_PREFIX}`echo $PUBLIC_IP | tr . -`${AUTO_HOSTNAME_SUFFIX}
- echo $HOSTNAME > /etc/hostname
+ if [ -f /etc/hostname ]; then
+ echo $HOSTNAME > /etc/hostname
+ fi
+ if [ -f /etc/sysconfig/network ]; then
+ sed -i -e "s/HOSTNAME=.*/HOSTNAME=$HOSTNAME/" /etc/sysconfig/network
+ fi
sed -i -e "s/$PUBLIC_IP.*/$PUBLIC_IP $HOSTNAME/" /etc/hosts
set +e
if [ -f /etc/init.d/hostname ]; then
Modified: whirr/branches/branch-0.8/src/site/xdoc/release-notes.xml
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.8/src/site/xdoc/release-notes.xml?rev=1375538&r1=1375537&r2=1375538&view=diff
==============================================================================
--- whirr/branches/branch-0.8/src/site/xdoc/release-notes.xml (original)
+++ whirr/branches/branch-0.8/src/site/xdoc/release-notes.xml Tue Aug 21 13:34:11 2012
@@ -93,6 +93,8 @@
</li>
<li>[<a href='https://issues.apache.org/jira/browse/WHIRR-640'>WHIRR-640</a>] - Recipes and tests using whirr.template should specify minRam there
</li>
+<li>[<a href='https://issues.apache.org/jira/browse/WHIRR-635'>WHIRR-635</a>] - Ensure hostname update as required by AUTO_HOSTNAME_SUFFIX is consistent for RHEL derivatives
+</li>
</ul>
<h2> Improvement