- update postun to run restart_on_update

- use rpmmacro for daemon name

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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jun 17 10:33:50 CEST 2011 - ohering@suse.de
- update postun to run restart_on_update
- use rpmmacro for daemon name
-------------------------------------------------------------------
Fri Jun 17 08:10:12 CEST 2011 - ohering@suse.de

View File

@ -21,6 +21,7 @@
%if %{with_kmp}
%define with_drivers_in_kmp 0
%endif
%define hv_kvp_daemon hv_kvp_daemon
Name: hyper-v
%if %{with_kmp}
@ -77,7 +78,7 @@ This package contains the Microsoft Hyper-V drivers.
%setup -Tc
%build
gcc $RPM_OPT_FLAGS -g %{S:10} -o hv_kvp_daemon
gcc $RPM_OPT_FLAGS -g %{S:10} -o %{hv_kvp_daemon}
%if %{with_kmp}
for flavor in %flavors_to_build; do
%if %{with_drivers_in_kmp}
@ -104,10 +105,10 @@ for flavor in %flavors_to_build; do
done
%endif
mkdir -p $RPM_BUILD_ROOT/usr/sbin
install -m755 hv_kvp_daemon $RPM_BUILD_ROOT/usr/sbin
install -m755 %{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/hv_kvp_daemon
ln -sfvbn ../..//etc/init.d/hv_kvp_daemon $RPM_BUILD_ROOT/usr/sbin/rchv_kvp_daemon
install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon}
ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin/rc%{hv_kvp_daemon}
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
install -m644 %SOURCE1 $RPM_BUILD_ROOT/etc/modprobe.d/hyperv_pvdrivers.conf
@ -117,9 +118,9 @@ install -m644 %SOURCE1 $RPM_BUILD_ROOT/etc/modprobe.d/hyperv_pvdrivers.conf
%dir /etc/modprobe.d
%config /etc/modprobe.d/hyperv_pvdrivers.conf
%endif
/etc/init.d/hv_kvp_daemon
/usr/sbin/rchv_kvp_daemon
/usr/sbin/hv_kvp_daemon
/etc/init.d/%{hv_kvp_daemon}
/usr/sbin/rc%{hv_kvp_daemon}
/usr/sbin/%{hv_kvp_daemon}
%post
board_vendor=
@ -138,16 +139,17 @@ then
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}
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}
%{fillup_and_insserv %{hv_kvp_daemon}}
fi
%preun
%stop_on_removal
%postun
%%restart_on_update %{hv_kvp_daemon}
%insserv_cleanup
%changelog