[Ovirt-devel] [PATCH-appliance 1/3] In the rc.local, attempt to contact the host we are running
Chris Lalancette
clalance at redhat.com
Wed Sep 10 06:39:45 UTC 2008
Signed-off-by: Chris Lalancette <clalance at redhat.com>
---
:100644 100644 4c4c96e... faa0bd4... M ovirt-appliance.ks
ovirt-appliance.ks | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/ovirt-appliance.ks b/ovirt-appliance.ks
index 4c4c96e..faa0bd4 100644
--- a/ovirt-appliance.ks
+++ b/ovirt-appliance.ks
@@ -25,9 +25,22 @@ set /files/etc/sysconfig/network-scripts/ifcfg-eth1/DNS1 192.168.50.2
save
EOF
+# the code to contact the host we are running on and make it configure itself
+# note that this has to be done in rc.local (as opposed to ovirt-wui-dev)
+# because when ovirt-wui-dev starts, the host-browser is not yet running
+cat >> /etc/rc.d/rc.local << \EOF
+# Try to contact the host we are running on; if we succeed, we'll use it as
+# one of the managed nodes; if not, no big deal
+exec 3<> /dev/tcp/192.168.50.1/7777
+echo "AWAKE" 1>&3
+exec 3<> /dev/tcp/192.168.50.1/7777
+echo "IDENTIFY" 1>&3
+EOF
+
# make sure to update the /etc/hosts with the list of all possible DHCP
# addresses we can hand out; dnsmasq uses this
sed -i -e 's/management\.priv\.ovirt\.org//' /etc/hosts
+echo "192.168.50.1 physical.priv.ovirt.org" >> /etc/hosts
echo "192.168.50.2 management.priv.ovirt.org" >> /etc/hosts
for i in `seq 3 252` ; do
echo "192.168.50.$i node$i.priv.ovirt.org" >> /etc/hosts
--
1.5.4.1
More information about the ovirt-devel
mailing list