support de libvirt sur jessie
This commit is contained in:
parent
fa3d3b48b1
commit
feb00bcf11
9
EnsureVM
9
EnsureVM
|
@ -54,19 +54,24 @@ function ensure_kvm() {
|
|||
[ -n "$modified" ] && sleep 1
|
||||
|
||||
service=
|
||||
if check_sysinfos -d redhatlike; then
|
||||
function __guess_service() {
|
||||
for i in libvirtd libvirtd-bin; do
|
||||
[ -f "/etc/init.d/$i" ] && {
|
||||
service="$i"
|
||||
break
|
||||
}
|
||||
done
|
||||
}
|
||||
if check_sysinfos -d redhatlike; then
|
||||
__guess_service
|
||||
elif check_sysinfos -d debian -v jessie+; then
|
||||
__guess_service
|
||||
elif check_sysinfos -d debianlike; then
|
||||
service=libvirt-bin
|
||||
fi
|
||||
if [ -n "$service" ]; then
|
||||
# s'assurer que le service tourne
|
||||
service libvirt-bin startm
|
||||
service "$service" startm
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue