From a2a786f8bad3e1e3ed089c3c68addd9619c4c1ca Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 08:55:15 +0200 Subject: mkinitramfs: check only once for existing ldd no point to recheck on every copy_exec. now copy_exec starts to get redable.. Signed-off-by: maximilian attems --- hook-functions | 4 ---- mkinitramfs | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hook-functions b/hook-functions index dddf3b1..5f00f17 100644 --- a/hook-functions +++ b/hook-functions @@ -130,10 +130,6 @@ copy_exec() { ln -s "${src}" "${DESTDIR}/${target}" # Copy the dependant libraries - if ! command -v ldd >/dev/null 2>&1 ; then - echo "WARNING: no ldd around - install libc-bin" - exit 1 - fi for x in $(ldd ${src} 2>/dev/null | sed -e ' /\//!d; /linux-gate/d; diff --git a/mkinitramfs b/mkinitramfs index 2f9ac59..d71ada3 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -256,6 +256,11 @@ if [ -n "${ROOT}" ]; then echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root fi +if ! command -v ldd >/dev/null 2>&1 ; then + echo "WARNING: no ldd around - install libc-bin" + exit 1 +fi + # module-init-tools copy_exec /sbin/modprobe /sbin copy_exec /sbin/rmmod /sbin -- cgit v1.2.3