resolved: fix skipping of scriptlet on upgrades
We don't want to preset and we don't want to create the symlink either.
This commit is contained in:
parent
be0f563352
commit
b764a2387b
10
systemd.spec
10
systemd.spec
@ -916,12 +916,16 @@ if [ $1 -eq 0 ] ; then
|
||||
fi
|
||||
|
||||
%post resolved
|
||||
[ $1 -gt 1 ] && exit 0
|
||||
|
||||
# Related to https://bugzilla.redhat.com/show_bug.cgi?id=1943263
|
||||
if [ $1 -eq 1 ] && ls /usr/lib/systemd/libsystemd-shared-24[0-7].so &>/dev/null; then
|
||||
if ls /usr/lib/systemd/libsystemd-shared-24[0-8].so &>/dev/null; then
|
||||
echo "Skipping presets for systemd-resolved.service, seems we are upgrading from old systemd."
|
||||
else
|
||||
%systemd_post systemd-resolved.service
|
||||
exit 0
|
||||
fi
|
||||
|
||||
%systemd_post systemd-resolved.service
|
||||
|
||||
# Create /etc/resolv.conf symlink.
|
||||
# We would also create it using tmpfiles, but let's do this here
|
||||
# too before NetworkManager gets a chance. (systemd-tmpfiles invocation above
|
||||
|
Loading…
Reference in New Issue
Block a user