From: initramfs mailing list Subject: [PATCH 45/50] Really die if a library is not found. Date: Mon, 16 Feb 2009 14:07:14 -0500 Message-ID: <200902161907.n1GJ7E60028889@hera.kernel.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Sender: initramfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Gitweb: http://git.kernel.org/?p=linux/kernel/git/davej/dracut.git;a=commit;h=aeaaa812d256e9d4b431d301b9a81dc6e103c349 Commit: aeaaa812d256e9d4b431d301b9a81dc6e103c349 Parent: 955f8b09ad8766dbe593361205268f43ca938029 Author: Victor Lowther AuthorDate: Fri Feb 13 04:43:19 2009 -0800 Committer: Dave Jones CommitDate: Mon Feb 16 13:56:42 2009 -0500 [PATCH 45/50] Really die if a library is not found. Also explain how to find it. --- dracut-functions | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dracut-functions b/dracut-functions index 62038f6..e80d786 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 } -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html