4047e4 Do not touch /etc/resolv.conf on upgrades

Authored and Committed by Zbigniew Jędrzejewski-Szmek 2 years ago
1 file changed. 8 lines added. 1 lines removed.
    Do not touch /etc/resolv.conf on upgrades
    
        
file modified
+8 -1
systemd.spec CHANGED
@@ -921,7 +921,8 @@ if [ $1 -eq 0 ] ; then
921
921
fi
922
922
923
923
%post resolved
924
- [ $1 -gt 1 ] && exit 0
924
+ [ $1 -eq 1 ] || exit 0
925
+ # Initial installation
925
926
926
927
# Related to https://bugzilla.redhat.com/show_bug.cgi?id=1943263
927
928
if ls /usr/lib/systemd/libsystemd-shared-24[0-8].so &>/dev/null; then
@@ -932,6 +933,9 @@ fi
932
933
%systemd_post systemd-resolved.service
933
934
934
935
%posttrans resolved
936
+ [ $1 -eq 1 ] || exit 0
937
+ # Initial installation
938
+
935
939
# Create /etc/resolv.conf symlink.
936
940
# We would also create it using tmpfiles, but let's do this here
937
941
# too before NetworkManager gets a chance. (systemd-tmpfiles invocation above
@@ -1014,6 +1018,9 @@ fi
1014
1018
%files standalone-sysusers -f .file-list-standalone-sysusers
1015
1019
1016
1020
%changelog
1021
+ * Tue Apr 12 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 251~rc1-2
1022
+ - Do not touch /etc/resolv.conf on upgrades (#2074122)
1023
+
1017
1024
* Mon Apr 4 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 251~rc1-2
1018
1025
- Merge libsystemd-core back into individual binaries and drop the
1019
1026
private shared library suffix (this should server as a work-around