Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[systemd] Fix system units which still point to /lib inside /etc/syst…
…emd/system. Fixes JB#51560
  • Loading branch information
xfade authored and Matti Kosola committed Oct 12, 2020
1 parent 8744651 commit c34cb9b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rpm/systemd.spec
Expand Up @@ -426,6 +426,12 @@ setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/ >/dev
# remove obsolete systemd-readahead file
rm -f /.readahead > /dev/null 2>&1 || :

# Make sure all symlinks in /etc/systemd/system point to the new units in
# /usr/lib/systemd/system and not in /lib/systemd/system
# This will find all broken symlinks and disable and enable each service
# JB#51560
for a in `find /etc/systemd/system -type l ! -exec test -e {} \; -print`; do stat -t -c%N $a | sed "s/'//g" | awk -F "/" '{print $NF" "$NF}' | xargs printf "systemctl disable %s; systemctl enable %s;\n" | sh; done || :


%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
Expand Down

0 comments on commit c34cb9b

Please sign in to comment.