Accepting request 1002963 from Base:System

- Migration to /usr/etc: Saving user changed configuration files
  in /etc and restoring them while an RPM update. (forwarded request 1000447 from schubi2)

OBS-URL: https://build.opensuse.org/request/show/1002963
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/syslogd?expand=0&rev=100
This commit is contained in:
Dominique Leuenberger 2022-09-13 13:07:50 +00:00 committed by Git OBS Bridge
commit c82379a4e2
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Aug 31 12:40:57 UTC 2022 - Stefan Schubert <schubi@suse.com>
- Migration to /usr/etc: Saving user changed configuration files
in /etc and restoring them while an RPM update.
-------------------------------------------------------------------
Tue Jun 21 12:20:58 UTC 2022 - Stefan Schubert <schubi@suse.com>

View File

@ -340,6 +340,20 @@ rm -f %{_sysconfdir}/systemd/system/multi-user.target.wants/syslog.service
%pre -n syslog-service
%service_add_pre klog.service
%if 0%{?suse_version} > 1500
# Prepare for migration to /usr/etc; save any old .rpmsave
for i in logrotate.d/syslog ; do
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||:
done
%endif
%if 0%{?suse_version} > 1500
%posttrans -n syslog-service
# Migration to /usr/etc, restore just created .rpmsave
for i in logrotate.d/syslog ; do
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
done
%endif
%postun -n syslog-service
%service_del_postun klog.service