Read ipaddress from astute.yaml instead of naily.facts

Fixes bugs with setting /etc/issue after removing
/etc/naily.facts from fuelmenu.

Change-Id: Id5cb512c5b2092f5343e58ed02aeaddcb138e09e
(cherry picked from commit 5e552259eb)
Closes-bug: #1342025
This commit is contained in:
Matthew Mosesohn 2014-06-11 18:58:45 +04:00 committed by Artem Panchenko
parent 019cb348b5
commit 13e7eb6435
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ fi
. /etc/sysconfig/network
hostname "$HOSTNAME"
#Update motd for IP
primary="$(grep mnbs_internal_interface= /etc/naily.facts | cut -d'=' -f2) "
primary="$(grep "interface:" /etc/fuel/astute.yaml | cut -d':' -f2 | tr -d ' ')"
echo "sed -i \"s%\(^.*able on:\).*$%\1 http://\`ip address show $primary | awk '/inet / {print \$2}' | cut -d/ -f1 -\`:8000%\" /etc/issue" >>/etc/rc.local
sed -i "s%\(^.*able on:\).*$%\1 http://`ip address show $primary | awk '/inet / {print \$2}' | cut -d/ -f1 -`:8000%" /etc/issue
# ruby21-hiera RPM does not include /var/lib/hiera/ directory which may cause errors

View File

@ -43,7 +43,7 @@ fi
. /etc/sysconfig/network
hostname "$HOSTNAME"
#Update motd for IP
primary="$(grep mnbs_internal_interface= /etc/naily.facts | cut -d'=' -f2) "
primary="$(grep "interface:" /etc/fuel/astute.yaml | cut -d':' -f2 | tr -d ' ')"
echo "sed -i \"s%\(^.*able on:\).*$%\1 http://\`ip address show $primary | awk '/inet / {print \$2}' | cut -d/ -f1 -\`:8000%\" /etc/issue" >>/etc/rc.local
sed -i "s%\(^.*able on:\).*$%\1 http://`ip address show $primary | awk '/inet / {print \$2}' | cut -d/ -f1 -`:8000%" /etc/issue
# ruby21-hiera RPM does not include /var/lib/hiera/ directory which may cause errors