From: "Amadeusz Żołnowski" <aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 1/2] dracut: lib and usr/lib dirs detection
Date: Wed, 18 Aug 2010 20:06:44 +0200 [thread overview]
Message-ID: <20100818200644.4e1e79de@aidecoe.name> (raw)
[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]
First we check if $libdir and $usrlibdir vars are already set in config
file. If not we perform simple detect. Vars are exported - to be useful
in module/check scripts.
---
dracut | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/dracut b/dracut
index a50e14a..86855c9 100755
--- a/dracut
+++ b/dracut
@@ -186,6 +186,17 @@ fi
dracutfunctions=$dracutbasedir/dracut-functions
export dracutfunctions
+# Detect lib paths
+[[ $libdir ]] || for libdir in /lib64 /lib; do
+ [[ -d $libdir ]] && break
+done || {
+ derror 'No lib directory?!!!'
+ exit 1
+}
+[[ $usrlibdir ]] || for usrlibdir in /usr/lib64 /usr/lib; do
+ [[ -d $usrlibdir ]] && break
+done || dwarning 'No usr/lib directory!'
+
# This is kinda legacy -- eventually it should go away.
case $dracutmodules in
""|auto) dracutmodules="all" ;;
@@ -240,7 +251,7 @@ chmod 755 "$initdir"
export initdir hookdirs dracutbasedir dracutmodules drivers \
fw_dir drivers_dir debug beverbose no_kernel kernel_only \
add_drivers mdadmconf lvmconf filesystems ignore_kmodules \
- use_fstab
+ use_fstab libdir usrlibdir
if [[ $kernel_only != yes ]]; then
# Create some directory structure first
--
1.7.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2010-08-18 18:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 18:06 Amadeusz Żołnowski [this message]
[not found] ` <20100818200644.4e1e79de-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2010-08-18 18:11 ` [PATCH 2/2] use $libdir and $usrlibdir instead of individual detect with ldd Amadeusz Żołnowski
2010-08-23 10:41 ` [PATCH 1/2] dracut: lib and usr/lib dirs detection Harald Hoyer
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=20100818200644.4e1e79de@aidecoe.name \
--to=aidecoe-2qtfh70ttyba5ebddlwbiw@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