diff options
Diffstat (limited to 'package/libvirt/files')
-rwxr-xr-x | package/libvirt/files/libvirt.init | 27 | ||||
-rw-r--r-- | package/libvirt/files/libvirt.postinst | 3 |
2 files changed, 30 insertions, 0 deletions
diff --git a/package/libvirt/files/libvirt.init b/package/libvirt/files/libvirt.init new file mode 100755 index 000000000..fe83686dc --- /dev/null +++ b/package/libvirt/files/libvirt.init @@ -0,0 +1,27 @@ +#!/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 -d + ;; +stop) + kill $(pgrep -f /usr/sbin/libvirtd) + ;; +restart) + sh $0 stop + sleep 2 + 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 |