Don't start/stop parameterized systemd units in pre/post actions. These units

cannot be used in such a way and the attempt leads to a confusing "failed to
try-restart" error message. [bsc#1089088]

OBS-URL: https://build.opensuse.org/package/show/network/vsftpd?expand=0&rev=128
This commit is contained in:
Peter Simons 2018-05-16 15:29:38 +00:00 committed by Git OBS Bridge
parent b45538659a
commit a8573409c6
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed May 16 15:25:02 UTC 2018 - psimons@suse.com
- Don't start/stop parameterized systemd units in pre/post actions.
These units cannot be used in such a way and the attempt leads to
a confusing "failed to try-restart" error message. [bsc#1089088]
-------------------------------------------------------------------
Wed Apr 25 06:32:25 UTC 2018 - psimons@suse.com

View File

@ -185,19 +185,19 @@ install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/s
%pre
getent passwd ftpsecure >/dev/null || useradd -r -g nobody -s /bin/false -c "Secure FTP User" -d %{_localstatedir}/lib/empty ftpsecure
%if %{with_systemd}
%service_add_pre %{name}.service %{name}@.service %{name}.socket
%service_add_pre %{name}.service %{name}.socket
%endif
%preun
%if %{with_systemd}
%service_del_preun %{name}.service %{name}@.service %{name}.socket
%service_del_preun %{name}.service %{name}.socket
%else
%stop_on_removal %{name}
%endif
%post
%if %{with_systemd}
%service_add_post %{name}.service %{name}@.service %{name}.socket
%service_add_post %{name}.service %{name}.socket
%else
%insserv_cleanup
%restart_on_update %{name}
@ -208,7 +208,7 @@ getent passwd ftpsecure >/dev/null || useradd -r -g nobody -s /bin/false -c "Sec
%postun
%if %{with_systemd}
%service_del_postun %{name}.service %{name}@.service %{name}.socket
%service_del_postun %{name}.service %{name}.socket
%else
%insserv_cleanup
%restart_on_update %{name}