libvirt.def: libvirt.syms
$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
printf 'EXPORTS\n' > $@-tmp && \
- sed -e '/^$$/d; /#/d; /:/d; /\}/d; /\*/d; /LIBVIRT_/d; s/[ \t]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
+ sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d; s/[ ]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
chmod a-w $@-tmp && \
mv $@-tmp libvirt.def
libvirt_qemu.def: $(srcdir)/libvirt_qemu.syms
$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
printf 'EXPORTS\n' > $@-tmp && \
- sed -e '/^$$/d; /#/d; /:/d; /\}/d; /\*/d; /LIBVIRT_/d; s/[ \t]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
+ sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d; s/[ ]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
chmod a-w $@-tmp && \
mv $@-tmp libvirt_qemu.def
$(INSTALL_DATA) $(srcdir)/network/default.xml \
$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
test -z "$(UUID)" || \
- sed -i -e "s,</name>,</name>\n <uuid>$(UUID)</uuid>," \
- $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
+ { sed -e "s,</name>,</name>\n <uuid>$(UUID)</uuid>," \
+ $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml > \
+ $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t && \
+ cp $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t \
+ $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml && \
+ rm $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t; }
test -e $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml || \
ln -s ../default.xml \
$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
#!/bin/sh
# ensure that reading a file larger than BUFSIZ works
-# Copyright (C) 2008 Red Hat, Inc.
+# Copyright (C) 2008, 2010 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
fail=0
# Output a valid definition, to be used as input.
-$abs_top_builddir/tools/virsh -c test:///default dumpxml 1 > xml || fail=1
+$abs_top_builddir/tools/virsh -c test:///default dumpxml 1 > xml.t || fail=1
# Change the VM name
-sed -i -e "s|<name>test</name>|<name>newtest</name>|g" xml
+sed -e "s|<name>test</name>|<name>newtest</name>|g" xml.t > xml
for i in before after; do
# The largest BUFSIZ I've seen is 128K. This is slightly larger.