diff --git a/ufw.spec b/ufw.spec index 0ea2386..58870bd 100644 --- a/ufw.spec +++ b/ufw.spec @@ -31,8 +31,11 @@ BuildArch: noarch BuildRequires: iptables BuildRequires: python-base >= 2.7 BuildRequires: python-devel + +%if 0%{?suse_version} > 1140 BuildRequires: systemd %systemd_requires +%endif #Requires: %description @@ -74,9 +77,10 @@ install -m 644 $RPM_SOURCE_DIR/ufw.service $RPM_BUILD_ROOT/lib/systemd/system/uf %endif %post -#insserv /etc/init.d/ufw %if 0%{?suse_version} > 1140 %service_add_post ufw.service +%else +insserv /etc/init.d/ufw %endif %preun @@ -86,10 +90,11 @@ install -m 644 $RPM_SOURCE_DIR/ufw.service $RPM_BUILD_ROOT/lib/systemd/system/uf %endif %postun -#%insserv_cleanup /etc/init.d/ufw %restart_on_update %if 0%{?suse_version} > 1140 %service_del_postun ufw.service +%else +%insserv_cleanup /etc/init.d/ufw %endif %files