diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2008-07-17 13:48:40 -0400 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2008-07-17 17:57:53 -0400 |
commit | 142478c941841b34b20448e1e9bccd193aea1d45 (patch) | |
tree | fc519939e05ab2669bf1213e2f4dd876c86dff5a /genome-autostarter/genome-autostarter.sh | |
parent | 7eba082b3e877d2cfd9e9085c83d51961ec5d518 (diff) | |
download | tools-142478c941841b34b20448e1e9bccd193aea1d45.tar.gz tools-142478c941841b34b20448e1e9bccd193aea1d45.tar.xz tools-142478c941841b34b20448e1e9bccd193aea1d45.zip |
The autostarter now supports kvm
Diffstat (limited to 'genome-autostarter/genome-autostarter.sh')
-rw-r--r-- | genome-autostarter/genome-autostarter.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/genome-autostarter/genome-autostarter.sh b/genome-autostarter/genome-autostarter.sh new file mode 100644 index 0000000..1555d05 --- /dev/null +++ b/genome-autostarter/genome-autostarter.sh @@ -0,0 +1,12 @@ +#!/bin/bash +uname -a | grep -i xen +if [ $? == 0 ]; then + # We're using Xen + find /etc/xen/auto -name "*" -type l | xargs -n1 basename 2> /dev/null | xargs -n1 virsh start &> /dev/null +else + # We're using kvm + for vm_xml in `find /etc/libvirt/qemu/autostart -name "*" -type l`; do + vm=`basename $vm_xml .xml` # Chop of the extension + virsh start $vm &> /dev/null + done +fi |