Great! Can you also rename the file to avoid kvm in the name as well?
On Tue, Apr 15, 2014 at 2:38 PM, Jose A. Lopes <[email protected]> wrote: > * 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: Jose A. Lopes <[email protected]> > --- > Makefile.am | 11 +++++++++-- > tools/kvm-ifup-os.in | 18 +++++++++--------- > 2 files changed, 18 insertions(+), 11 deletions(-) > > diff --git a/Makefile.am b/Makefile.am > index 5be9d1c..80df945 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) > @@ -1744,7 +1747,11 @@ tools/kvm-ifup: tools/kvm-ifup.in$(REPLACE_VARS_SED) > chmod +x $@ > > tools/kvm-ifup-os: tools/kvm-ifup-os.in $(REPLACE_VARS_SED) > - sed -f $(REPLACE_VARS_SED) < $< > $@ > + sed -f $(REPLACE_VARS_SED) -e "s/ifup-os:/kvm-ifup-os:/" < $< > $@ > + chmod +x $@ > + > +tools/xen-ifup-os: tools/kvm-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/kvm-ifup-os.in > index b696da6..c1d9927 100644 > --- a/tools/kvm-ifup-os.in > +++ b/tools/kvm-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 > > -- > 1.9.1.423.g4596e3a > >
