Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb51560' into 'master'
[systemd] Fix system units which still point to /lib inside /etc/systemd/system. Fixes JB#51560

See merge request mer-core/systemd!38
  • Loading branch information
Matti Kosola committed Oct 12, 2020
2 parents 8744651 + c34cb9b commit 8df1cc4
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 8df1cc4

Please sign in to comment.