From 6dbb5e2ecc9ba575b732510abf2d591706356c9addb1fefc08583a2a591bd8a0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 29 Feb 2012 07:32:57 +0000 Subject: [PATCH] systemd guards OBS-URL: https://build.opensuse.org/package/show/server:http/varnish?expand=0&rev=56 --- varnish.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/varnish.spec b/varnish.spec index 9584ffa..e3c2fc1 100644 --- a/varnish.spec +++ b/varnish.spec @@ -41,7 +41,7 @@ Prereq(post): %_sbindir/useradd %_sbindir/groupadd %if 0%{?suse_version} >= 1010 Recommends: logrotate %endif -%if 0%{?suse_version} >= 1140 +%if 0%{?suse_version} >= 1210 BuildRequires: systemd %{?systemd_requires} %endif @@ -140,7 +140,7 @@ mkdir -p "$b/%pkg_logdir" %_bindir/getent passwd varnish >/dev/null || \ %_sbindir/useradd -g varnish -s /bin/false -r -c "user for Varnish" \ -d %pkg_home varnish || : -%if 0%{?service_add_pre:1} +%if 0%{?_unitdir:1} %service_add_pre varnish.service %service_add_pre varnishlog.service %endif @@ -148,7 +148,7 @@ mkdir -p "$b/%pkg_logdir" %post %fillup_and_insserv varnish %fillup_and_insserv varnishlog -%if 0%{?service_add_post:1} +%if 0%{?_unitdir:1} %service_add_post varnish.service %service_add_post varnishlog.service %endif @@ -156,16 +156,16 @@ mkdir -p "$b/%pkg_logdir" %preun %stop_on_removal varnish %stop_on_removal varnishlog -%if 0%{?service_del_preun:1} +%if 0%{?_unitdir:1} %service_del_preun varnish.service %service_del_preun varnishlog.service %endif %postun -# Does not this very much conflict? But rpmlint wants to have it... +# Does not sysv+systemd very much conflict? But rpmlint wants to have it... %restart_on_update varnish %restart_on_update varnishlog -%if 0%{?service_del_postun:1} +%if 0%{?_unitdir:1} %service_del_postun varnish.service %service_del_postun varnishlog.service %endif