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
|
[ -n "$modified" ] && sleep 1
|
||||||
|
|
||||||
service=
|
service=
|
||||||
if check_sysinfos -d redhatlike; then
|
function __guess_service() {
|
||||||
for i in libvirtd libvirtd-bin; do
|
for i in libvirtd libvirtd-bin; do
|
||||||
[ -f "/etc/init.d/$i" ] && {
|
[ -f "/etc/init.d/$i" ] && {
|
||||||
service="$i"
|
service="$i"
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
done
|
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
|
elif check_sysinfos -d debianlike; then
|
||||||
service=libvirt-bin
|
service=libvirt-bin
|
||||||
fi
|
fi
|
||||||
if [ -n "$service" ]; then
|
if [ -n "$service" ]; then
|
||||||
# s'assurer que le service tourne
|
# s'assurer que le service tourne
|
||||||
service libvirt-bin startm
|
service "$service" startm
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue