From 794a4a75d2e2c513e55b8962ad9e8e470dd82ba8 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 19 Oct 2011 09:52:45 +0200 Subject: make virsh, virt-install and kvm usable on shuttle pc --- package/libvirt/files/libvirt.init | 26 ++++++++++++++++++++++++++ package/libvirt/files/libvirt.postinst | 3 +++ 2 files changed, 29 insertions(+) create mode 100755 package/libvirt/files/libvirt.init create mode 100644 package/libvirt/files/libvirt.postinst (limited to 'package/libvirt/files') diff --git a/package/libvirt/files/libvirt.init b/package/libvirt/files/libvirt.init new file mode 100755 index 000000000..2644e1a1b --- /dev/null +++ b/package/libvirt/files/libvirt.init @@ -0,0 +1,26 @@ +#!/bin/sh +#PKG libvirt +#INIT 80 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"$libvirtd" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + /usr/sbin/libvirtd -dv + ;; +stop) + kill $(pgrep -f /usr/sbin/libvirtd) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "usage: $0 {start | stop | restart}" + exit 1 +esac +exit $? diff --git a/package/libvirt/files/libvirt.postinst b/package/libvirt/files/libvirt.postinst new file mode 100644 index 000000000..4c39b14f0 --- /dev/null +++ b/package/libvirt/files/libvirt.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf libvirtd libvirtd NO -- cgit v1.2.3