From 30f88577f39b5d83cb1cefe778f7dfee66493217 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 17 Jan 2011 16:13:19 +0100 Subject: [PATCH] mdadm: Implement support for mdmon to static binary Without this patch a static /sbin/mdadm binary results in an initramfs without mdmon --- gen_initramfs.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index e7d4a10..8f1c5d1 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -344,10 +344,11 @@ append_mdadm(){ then cp -a /etc/mdadm.conf "${TEMP}/initramfs-mdadm-temp/etc" \ || gen_die "Could not copy mdadm.conf!" - if [ -e '/sbin/mdadm' ] && LC_ALL="C" ldd /sbin/mdadm|grep -q 'not a dynamic executable' + if [ -e '/sbin/mdadm' ] && LC_ALL="C" ldd /sbin/mdadm | grep -q 'not a dynamic executable' \ + && [ -e '/sbin/mdmon' ] && LC_ALL="C" ldd /sbin/mdmon | grep -q 'not a dynamic executable' then - print_info 1 ' MDADM: Adding support (using local static binaries)...' - cp /sbin/mdadm "${TEMP}/initramfs-mdadm-temp/sbin/mdadm" || + print_info 1 ' MDADM: Adding support (using local static binaries /sbin/mdadm and /sbin/mdmon)...' + cp /sbin/mdadm /sbin/mdmon "${TEMP}/initramfs-mdadm-temp/sbin/mdadm" || gen_die 'Could not copy over mdadm!' else print_info 1 ' MDADM: Adding support (compiling binaries)...' -- 2.26.2