Commit aa21546b authored by Jose A. Lopes's avatar Jose A. Lopes

Add 'xen-ifup-os' NIC script

* Generalize 'kvm-ifup-os' to be also usable by Xen
* Include a target to build the 'xen-ifup-os' NIC script from the KVM
  one, given that they are very similar.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent 9e42978e
......@@ -114,6 +114,7 @@
# tools
/tools/kvm-ifup
/tools/kvm-ifup-os
/tools/xen-ifup-os
/tools/burnin
/tools/ensure-dirs
/tools/users-setup
......
......@@ -278,6 +278,7 @@ CLEANFILES = \
$(manhtml) \
tools/kvm-ifup \
tools/kvm-ifup-os \
tools/xen-ifup-os \
tools/vif-ganeti \
tools/net-common \
tools/users-setup \
......@@ -340,7 +341,8 @@ BUILT_EXAMPLES = \
doc/examples/hooks/ipsec
dist_ifup_SCRIPTS = \
tools/kvm-ifup-os
tools/kvm-ifup-os \
tools/xen-ifup-os
nodist_pkgpython_PYTHON = \
$(built_python_base_sources) \
......@@ -1214,6 +1216,7 @@ myexeclib_SCRIPTS = \
daemons/daemon-util \
tools/kvm-ifup \
tools/kvm-ifup-os \
tools/xen-ifup-os \
tools/vif-ganeti \
tools/net-common \
$(HS_MYEXECLIB_PROGS)
......@@ -1252,7 +1255,7 @@ EXTRA_DIST = \
devel/upload \
devel/webserver \
tools/kvm-ifup.in \
tools/kvm-ifup-os.in \
tools/ifup-os.in \
tools/vif-ganeti.in \
tools/net-common.in \
tools/vcluster-setup.in \
......@@ -1743,8 +1746,12 @@ tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
chmod +x $@
tools/kvm-ifup-os: tools/kvm-ifup-os.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
tools/kvm-ifup-os: tools/ifup-os.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) -e "s/ifup-os:/kvm-ifup-os:/" < $< > $@
chmod +x $@
tools/xen-ifup-os: tools/ifup-os.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) -e "s/ifup-os:/xen-ifup-os:/" < $< > $@
chmod +x $@
tools/vif-ganeti: tools/vif-ganeti.in $(REPLACE_VARS_SED)
......
......@@ -121,9 +121,9 @@ function restart_dnsmasq {
# but... :)
if [ -z "$INTERFACE" ]
then
echo kvm-vif-bridge: Failed to configure communication mechanism \
echo ifup-os: Failed to configure communication mechanism \
interface because the \'INTERFACE\' environment variable was \
not specified to the \'kvm-vif-bridge\' script
not specified to the script
exit 1
fi
......@@ -132,9 +132,9 @@ fi
# See comment about environment variable 'INTERFACE'.
if [ -z "$MODE" ]
then
echo kvm-vif-bridge: Failed to configure communication mechanism \
echo ifup-os: Failed to configure communication mechanism \
interface because the \'MODE\' environment variable was \
not specified to the \'kvm-vif-bridge\' script
not specified to the script
exit 1
fi
......@@ -147,9 +147,9 @@ if ! is_instance_communication_tap; then exit 0; fi
# See comment about environment variable 'INTERFACE'.
if [ -z "$MAC" ]
then
echo kvm-vif-bridge: Failed to configure communication mechanism \
echo ifup-os: Failed to configure communication mechanism \
interface because the \'MAC\' environment variable was \
not specified to the \'kvm-vif-bridge\' script
not specified to the script
exit 1
fi
......@@ -158,9 +158,9 @@ fi
# See comment about environment variable 'INTERFACE'.
if [ -z "$IP" ]
then
echo kvm-vif-bridge: Failed to configure communication mechanism \
echo ifup-os: Failed to configure communication mechanism \
interface because the \'IP\' environment variable was \
not specified to the \'kvm-vif-bridge\' script
not specified to the script
exit 1
fi
......@@ -224,7 +224,7 @@ then
if [ -z "$BIND_DYNAMIC" ]
then
echo kvm-vif-bridge: dnsmasq mode \"bind-dynamic\" is not supported
echo ifup-os: dnsmasq mode \"bind-dynamic\" is not supported
exit 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment