[Fusionforge-commits] r13642 - trunk/tests/lxc
Christian Bayle
cbayle at fusionforge.org
Wed Jun 29 17:10:44 CEST 2011
Author: cbayle
Date: 2011-06-29 17:10:44 +0200 (Wed, 29 Jun 2011)
New Revision: 13642
Modified:
trunk/tests/lxc/lxc-centos5
Log:
Declare localhost if not
Modified: trunk/tests/lxc/lxc-centos5
===================================================================
--- trunk/tests/lxc/lxc-centos5 2011-06-29 15:02:45 UTC (rev 13641)
+++ trunk/tests/lxc/lxc-centos5 2011-06-29 15:10:44 UTC (rev 13642)
@@ -38,6 +38,21 @@
if grep -q ^lxc.network.ipv4 $path/config
then
+ # configure localhost
+ if ! grep -q "^127.0.0.1" $rootfs/etc/hosts
+ then
+ cat <<EOF >> $rootfs/etc/hosts
+# Do not remove the following line, or various programs
+# that require network functionality will fail.
+127.0.0.1 localhost.localdomain localhost
+::1 localhost6.localdomain6 localhost6
+EOF
+ if ! grep -q "^::1" $rootfs/etc/hosts
+ then
+ cat <<EOF >> $rootfs/etc/hosts
+::1 localhost6.localdomain6 localhost6
+EOF
+ fi
# configure static network
lxc_network_ipv4=`grep ^lxc.network.ipv4 $path/config | cut -d= -f2`
address=`echo $lxc_network_ipv4 | cut -d/ -f1`
More information about the Fusionforge-commits
mailing list