From 7d39bfe3dd236bba57a926f0af422e70ccb3d5c9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 16 Aug 2014 14:09:57 +0000 Subject: [PATCH] Add systemd units macros since fedora 18 --- xorg-x11-drv-nvidia.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec index ed06425..1291183 100644 --- a/xorg-x11-drv-nvidia.spec +++ b/xorg-x11-drv-nvidia.spec @@ -319,7 +319,11 @@ fi || : %post libs -p /sbin/ldconfig -%post cuda -p /sbin/ldconfig +%post cuda +/sbin/ldconfig +%if 0%{?rhel} > 6 || 0%{?fedora} >= 18 +%systemd_post nvidia-persistenced.service +%endif %posttrans [ -f %{_sysconfdir}/X11/xorg.conf ] || \ @@ -351,9 +355,18 @@ if [ "$1" -eq "0" ]; then mv %{_sysconfdir}/X11/xorg.conf %{_sysconfdir}/X11/xorg.conf.%{name}_uninstalled &>/dev/null fi ||: +%if 0%{?rhel} > 6 || 0%{?fedora} >= 18 +%preun cuda +%systemd_preun nvidia-persistenced.service +%endif + %postun libs -p /sbin/ldconfig -%postun cuda -p /sbin/ldconfig +%postun cuda +/sbin/ldconfig +%if 0%{?rhel} > 6 || 0%{?fedora} >= 18 +%systemd_postun_with_restart nvidia-persistenced.service +%endif %files %defattr(-,root,root,-)