diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2011-10-19 09:52:45 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2011-10-19 09:52:45 +0200 |
commit | 794a4a75d2e2c513e55b8962ad9e8e470dd82ba8 (patch) | |
tree | 451fd95b4cc5397612a38a13326dc24add046fb1 /package/libvirt/files | |
parent | 2f172e3c8d13eb5810d39b3e86c5fae388ba2bfa (diff) |
make virsh, virt-install and kvm usable on shuttle pc
Diffstat (limited to 'package/libvirt/files')
-rwxr-xr-x | package/libvirt/files/libvirt.init | 26 | ||||
-rw-r--r-- | package/libvirt/files/libvirt.postinst | 3 |
2 files changed, 29 insertions, 0 deletions
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 |