From: Victor Lowther Date: Fri, 13 Feb 2009 12:43:19 +0000 (-0800) Subject: [PATCH 45/50] Really die if a library is not found. X-Git-Tag: 0.1~433 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aeaaa812d256e9d4b431d301b9a81dc6e103c349;p=thirdparty%2Fdracut.git [PATCH 45/50] Really die if a library is not found. Also explain how to find it. --- diff --git a/dracut-functions b/dracut-functions index 62038f6d3..e80d786a0 100755 --- a/dracut-functions +++ b/dracut-functions @@ -68,10 +68,11 @@ inst_binary() { [[ -f $initdir$target ]] && return 0 # I love bash! while read line; do - [[ $line =~ '([^ ]*/lib/[^ ]*\.so[^ ]*)' ]] || continue + [[ $line =~ '([^ ]*/lib/[^ ]*\.so[^ ]*|not found)' ]] || continue FILE=${BASH_REMATCH[1]} - [[ $FILE = not || $NAME = not ]] && { + [[ $FILE = 'not found' ]] && { echo "Missing a shared library required by $bin." >&2 + echo "Run \"ldd $bin\" to find out what it is." >&2 echo "dracut cannot create an initrd." >&2 exit 1 }