forked from pool/net-snmp
Accepting request 1003790 from home:schubi2:logrotate
- 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/1003790 OBS-URL: https://build.opensuse.org/package/show/network:utilities/net-snmp?expand=0&rev=50
This commit is contained in:
parent
f005ed495d
commit
074cb150e1
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 1 07:27:27 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 Jul 12 14:18:13 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
|
Tue Jul 12 14:18:13 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
@ -320,6 +320,20 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
|||||||
|
|
||||||
%pre
|
%pre
|
||||||
%service_add_pre snmpd.service snmptrapd.service
|
%service_add_pre snmpd.service snmptrapd.service
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
# Prepare for migration to /usr/etc; save any old .rpmsave
|
||||||
|
for i in logrotate.d/net-snmp ; do
|
||||||
|
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||:
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%posttrans
|
||||||
|
# Migration to /usr/etc, restore just created .rpmsave
|
||||||
|
for i in logrotate.d/net-snmp ; do
|
||||||
|
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%fillup_only -n snmpd
|
%fillup_only -n snmpd
|
||||||
|
Loading…
Reference in New Issue
Block a user