- enable hv_kvp_daemon if run in a hv guest [fate#312213]
OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=3
This commit is contained in:
parent
08459eed5d
commit
fc0fbf96a9
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 16 11:12:06 CEST 2011 - ohering@suse.de
|
||||
|
||||
- enable hv_kvp_daemon if run in a hv guest [fate#312213]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 21 17:18:20 CEST 2011 - ohering@suse.de
|
||||
|
||||
|
25
hyper-v.spec
25
hyper-v.spec
@ -35,7 +35,7 @@ Group: System/Kernel
|
||||
AutoReqProv: on
|
||||
Summary: Microsoft Hyper-V drivers
|
||||
Url: http://www.kernel.org
|
||||
Version: 0
|
||||
Version: 1
|
||||
Release: %(bash %_sourcedir/get_release_number.sh)
|
||||
Source: Module.supported
|
||||
Source1: hyperv_pvdrivers.conf
|
||||
@ -122,6 +122,29 @@ install -m644 %SOURCE1 $RPM_BUILD_ROOT/etc/modprobe.d/hyperv_pvdrivers.conf
|
||||
/usr/sbin/hv_kvp_daemon
|
||||
|
||||
%post
|
||||
if test -d /sys/class/dmi/id
|
||||
then
|
||||
cd /sys/class/dmi/id
|
||||
board_vendor=
|
||||
if test -r board_vendor
|
||||
then
|
||||
board_vendor="`cat board_vendor`"
|
||||
fi
|
||||
if test "${board_vendor}" = "Microsoft Corporation"
|
||||
then
|
||||
product_name=
|
||||
if test -r product_name
|
||||
then
|
||||
product_name="`cat product_name`"
|
||||
fi
|
||||
if test "${product_name}" = "Virtual Machine"
|
||||
then
|
||||
echo "Enabling hv_kvp_daemon on '${product_name}' from '${board_vendor}'"
|
||||
%{fillup_and_insserv -Y hv_kvp_daemon}
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
%{fillup_and_insserv hv_kvp_daemon}
|
||||
|
||||
%preun
|
||||
|
Loading…
x
Reference in New Issue
Block a user