From: Harald Hoyer Date: Tue, 22 May 2018 07:48:23 +0000 (+0200) Subject: cleanup empty ldconfig_paths directories X-Git-Tag: 048~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6e777ec4b1031b18b835cd34ed644ebf4a2ace6;p=thirdparty%2Fdracut.git cleanup empty ldconfig_paths directories https://bugzilla.redhat.com/show_bug.cgi?id=1324746 --- diff --git a/dracut.sh b/dracut.sh index 5b5b27e32..a4406dd94 100755 --- 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 \