Code Review
/
releng
/
builder.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
(from parent 1:
aa1302e
)
Merge "Fix for UnKnownHost exception"
author
Sam Hague
<shague@redhat.com>
Fri, 20 Oct 2017 00:36:10 +0000
(
00:36
+0000)
committer
Gerrit Code Review
<gerrit@opendaylight.org>
Fri, 20 Oct 2017 00:36:10 +0000
(
00:36
+0000)
packer/provision/baseline.sh
patch
|
blob
|
history
diff --git
a/packer/provision/baseline.sh
b/packer/provision/baseline.sh
index 2fa3473766d0aa1316776b60be5c0716141625e6..c1ce0bbaeab85be7b614808827a8626c5e1a1806 100644
(file)
--- a/
packer/provision/baseline.sh
+++ b/
packer/provision/baseline.sh
@@
-440,6
+440,11
@@
all_systems() {
echo "No extra steps for $FACTER_OS"
;;
esac
+
+ # Update /etc/nss-switch.conf to map hostname with IP instead of using `localhost`
+ # from /etc/hosts which is required by some of the Java API's to avoid
+ # Java UnknownHostException: "Name or service not known" error.
+ sed -i "/^hosts:/s/$/ myhostname/" /etc/nsswitch.conf
}
echo "---> Attempting to detect OS"