mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Warren Togami <wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] LIBDIR detection without /proc
Date: Wed, 20 May 2009 16:22:31 -0400	[thread overview]
Message-ID: <4A146687.3020508@redhat.com> (raw)

bash-4.0# ./dracut -l -f /boot/initrd-2.6.29.3-140.fc11.i586.img 
2.6.29.3-140.fc11.i586
ldd: /proc/8072/exe: No such file or directory

modules.d/50plymouth/plymouth-populate-initrd

Could we please not rely on /proc to detect anything?  Something like 
the following would work fine.  It also has the benefit of being able to 
run without /proc mounted, which is great for building initrd's within a 
chroot.

diff --git a/modules.d/50plymouth/plymouth-populate-initrd 
b/modules.d/50plymouth/plymouth-populate-initrd
index df6e7c5..58b5b5a 100755
--- a/modules.d/50plymouth/plymouth-populate-initrd
+++ b/modules.d/50plymouth/plymouth-populate-initrd
@@ -1,5 +1,5 @@
  #!/bin/bash
-if ldd /proc/$$/exe |grep -q lib64; then
+if [ -f /usr/lib64/plymouth/text.so ]; then
      LIBDIR="/usr/lib64"
  else
      LIBDIR="/usr/lib"


Another issue, it appears this plymouth module is uncondtional? 
Shouldn't it skip plymouth install if it plymouth does not exist for the 
sake of other distributions?

Warren Togami
wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
--
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

             reply	other threads:[~2009-05-20 20:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20 20:22 Warren Togami [this message]
     [not found] ` <4A146687.3020508-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-20 20:52   ` [PATCH] LIBDIR detection without /proc Andreas Thienemann
     [not found]     ` <Pine.LNX.4.58.0905202249560.7805-bvJ793YqIODNUDpmljszgg@public.gmane.org>
2009-05-20 20:57       ` Warren Togami
     [not found]         ` <4A146EBF.5060404-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-20 21:24           ` Andreas Thienemann
     [not found]             ` <Pine.LNX.4.58.0905202309060.7805-bvJ793YqIODNUDpmljszgg@public.gmane.org>
2009-05-20 22:02               ` Warren Togami
     [not found]                 ` <4A147DF3.4070108-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-21  0:37                   ` [PATCH] Check /sbin/plymouthd for arch instead of /proc/$$/exe Warren Togami

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A146687.3020508@redhat.com \
    --to=wtogami-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox