]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
cleanup empty ldconfig_paths directories
authorHarald Hoyer <harald@redhat.com>
Tue, 22 May 2018 07:48:23 +0000 (09:48 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 22 May 2018 07:51:12 +0000 (09:51 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=1324746

dracut.sh

index 5b5b27e322c55f5ab26013e34a9981bc30e0d0c0..a4406dd94f0bf68ffc9ecfdda9c6cd019132e967 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1643,6 +1643,11 @@ if [[ $do_strip = yes ]] ; then
     done
 fi
 
+# cleanup empty ldconfig_paths directories
+for d in $(ldconfig_paths); do
+    rmdir -p --ignore-fail-on-non-empty "$initdir/$d" >/dev/null 2>&1
+done
+
 if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
     dinfo "*** Stripping files ***"
     find "$initdir" -type f \