From 065c061641bd20bc6de255d289429f31b8674e902d29c32e02a6489e629b8c6f Mon Sep 17 00:00:00 2001 From: luce johann Date: Wed, 17 Oct 2012 10:44:17 +0000 Subject: [PATCH] Accepting request 138485 from home:jluce2:branches:security -fix systemd tag to start automaticaly ufw OBS-URL: https://build.opensuse.org/request/show/138485 OBS-URL: https://build.opensuse.org/package/show/security/ufw?expand=0&rev=6 --- ufw.changes | 5 +++++ ufw.spec | 24 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/ufw.changes b/ufw.changes index 5957a95..ebd9f2a 100644 --- a/ufw.changes +++ b/ufw.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 16 14:53:10 UTC 2012 - johann.luce@wanadoo.fr + +-fix systemd tag to start automaticaly ufw + ------------------------------------------------------------------- Mon Sep 17 12:53:01 UTC 2012 - johann.luce@wanadoo.fr diff --git a/ufw.spec b/ufw.spec index df3ea6f..da5c41d 100644 --- a/ufw.spec +++ b/ufw.spec @@ -62,20 +62,34 @@ ln -s /usr/sbin/ufw $RPM_BUILD_ROOT/usr/bin/ufw mkdir -p $RPM_BUILD_ROOT/lib/systemd/ mkdir -p $RPM_BUILD_ROOT/lib/systemd/system install -m 644 $RPM_SOURCE_DIR/ufw.service $RPM_BUILD_ROOT/lib/systemd/system/ufw.service -mkdir -p $RPM_BUILD_ROOT/etc/systemd/ -mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/ -mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/multi-user.target.wants -ln -s /lib/systemd/system/ufw.service $RPM_BUILD_ROOT/etc/systemd/system/multi-user.target.wants/ufw.service +#mkdir -p $RPM_BUILD_ROOT/etc/systemd/ +#mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/ +#mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/multi-user.target.wants +#ln -s /lib/systemd/system/ufw.service $RPM_BUILD_ROOT/etc/systemd/system/multi-user.target.wants/ufw.service + +%pre +%if 0%{?suse_version} > 1140 +%service_add_pre ufw.service +%endif %post insserv /etc/init.d/ufw +%if 0%{?suse_version} > 1140 +%service_add_post ufw.service +%endif %preun %stop_on_removal ufw +%if 0%{?suse_version} > 1140 +%service_del_preun ufw.service +%endif %postun %insserv_cleanup /etc/init.d/ufw %restart_on_update +%if 0%{?suse_version} > 1140 +%service_del_postun ufw.service +%endif %files %defattr(-,root,root) @@ -94,9 +108,7 @@ insserv /etc/init.d/ufw %config/etc/ufw %config/etc/ufw/applications.d %config/etc/default/ufw - %config/etc/systemd/system/multi-user.target.wants/ufw.service /lib/systemd/system/ufw.service - /etc/systemd/system/multi-user.target.wants /lib/ufw /usr/lib/python%python_version/site-packages/ufw /usr/share/ufw