diff --git a/.gitignore b/.gitignore index 8a6d1acaaca6984ca84bc6bf75150be50a970736..65fae8fe372832391b535186e61f72e07c6de2cb 100644 --- a/.gitignore +++ b/.gitignore @@ -114,6 +114,7 @@ # tools /tools/kvm-ifup /tools/kvm-ifup-os +/tools/xen-ifup-os /tools/burnin /tools/ensure-dirs /tools/users-setup diff --git a/Makefile.am b/Makefile.am index 5be9d1cf410ce2eed3a523c2e2e95fbf6c56a6c4..58c0310579ea248c79cdce3f38aa7a5bcbcaefe2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/tools/kvm-ifup-os.in b/tools/ifup-os.in similarity index 93% rename from tools/kvm-ifup-os.in rename to tools/ifup-os.in index b696da6fd32b1a75617a84cf3c5439d9bdca3ea4..c1d9927ca4170589c15be640c2ea0ebe24f77e9c 100644 --- a/tools/kvm-ifup-os.in +++ b/tools/ifup-os.in @@ -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