2013-08-27 15:14:44 +04:00
|
|
|
#!/bin/bash
|
|
|
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: kvm-stop-all
|
2015-08-20 07:58:17 +04:00
|
|
|
# Required-Start:
|
|
|
|
# Required-Stop:
|
|
|
|
# Should-Start:
|
2013-08-27 15:14:44 +04:00
|
|
|
# Should-Stop: libvirt kvm $remote_fs $network $syslog $named
|
2015-08-20 07:58:17 +04:00
|
|
|
# Default-Start:
|
2013-08-27 15:14:44 +04:00
|
|
|
# Default-Stop: 0 1 6
|
|
|
|
# X-Interactive: true
|
|
|
|
# Short-Description: stops kvm virtual machines
|
|
|
|
# Description: stops kvm virtual machines
|
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin:@@dest@@
|
|
|
|
VIRSH_DEFAULT_CONNECT_URI=qemu:///system
|
|
|
|
LANG=fr_FR.UTF-8
|
|
|
|
UTOOLS_NO_COLORS=1
|
|
|
|
export PATH VIRSH_DEFAULT_CONNECT_URI LANG UTOOLS_NO_COLORS
|
|
|
|
|
|
|
|
. /lib/lsb/init-functions
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
log_action_msg "Stopping kvm virtual machines..."
|
|
|
|
SKvm --stop-all
|
|
|
|
log_end_msg 0
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
log_action_msg "Usage: /etc/init.d/$NAME {start|stop}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|