diff --git a/hyper-v.changes b/hyper-v.changes index b78671d..619dec8 100644 --- a/hyper-v.changes +++ b/hyper-v.changes @@ -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 diff --git a/hyper-v.spec b/hyper-v.spec index 2005179..c4b37ee 100644 --- a/hyper-v.spec +++ b/hyper-v.spec @@ -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