support de libvirt sur jessie

This commit is contained in:
Jephté Clain 2017-02-13 10:58:36 +04:00
parent fa3d3b48b1
commit feb00bcf11
1 changed files with 7 additions and 2 deletions

View File

@ -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