- update postin to work in / again when running insserv macro

OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=7
This commit is contained in:
Olaf Hering 2011-06-17 06:10:53 +00:00 committed by Git OBS Bridge
parent 619dff6162
commit 87b7374b4c
2 changed files with 18 additions and 17 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jun 17 08:10:12 CEST 2011 - ohering@suse.de
- update postin to work in / again when running insserv macro
-------------------------------------------------------------------
Thu Jun 16 15:33:49 CEST 2011 - ohering@suse.de

View File

@ -122,31 +122,27 @@ 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
board_vendor=
product_name=
if pushd /sys/class/dmi/id > /dev/null 2>/dev/null
then
pushd /sys/class/dmi/id > /dev/null
board_vendor=
if test -r board_vendor
then
board_vendor="`cat board_vendor`"
fi
if test "${board_vendor}" = "Microsoft Corporation"
if test -r product_name
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}'"
popd > /dev/null
%{fillup_and_insserv -Y hv_kvp_daemon}
exit 0
fi
product_name="`cat product_name`"
fi
popd > /dev/null
fi
if test "${board_vendor}" = "Microsoft Corporation" -a test "${product_name}" = "Virtual Machine"
then
echo "Enabling hv_kvp_daemon on '${product_name}' from '${board_vendor}'"
%{fillup_and_insserv -Y hv_kvp_daemon}
else
%{fillup_and_insserv hv_kvp_daemon}
fi
%{fillup_and_insserv hv_kvp_daemon}
%preun
%stop_on_removal