]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
[PATCH 45/50] Really die if a library is not found.
authorVictor Lowther <victor.lowther@gmail.com>
Fri, 13 Feb 2009 12:43:19 +0000 (04:43 -0800)
committerDave Jones <davej@redhat.com>
Mon, 16 Feb 2009 18:56:42 +0000 (13:56 -0500)
Also explain how to find it.

dracut-functions

index 62038f6d3e5c9fc487e61bd4fa70fb779078accb..e80d786a00c4dbc95645b82c079a6d225e344127 100755 (executable)
@@ -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
        }