Accepting request 1000447 from home:schubi2

- Migration to /usr/etc: Saving user changed configuration files
  in /etc and restoring them while an RPM update.

OBS-URL: https://build.opensuse.org/request/show/1000447
OBS-URL: https://build.opensuse.org/package/show/Base:System/syslogd?expand=0&rev=160
This commit is contained in:
2022-09-12 13:43:44 +00:00
committed by Git OBS Bridge
parent 9e82517e22
commit f07065156c
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