All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Avoid annonying warnings when pkg-config is not installed.
@ 2012-06-06 12:27 Juan RP
  0 siblings, 0 replies; only message in thread
From: Juan RP @ 2012-06-06 12:27 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA


From 7f805792b626e10baa87554dc5efc48cc86c6e5d Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Wed, 6 Jun 2012 14:19:59 +0200
Subject: [PATCH] Avoid annonying warnings when pkg-config is not installed.

---
 dracut-functions.sh                    |    2 +-
 modules.d/95udev-rules/module-setup.sh |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index f788878..4180f03 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -531,7 +531,7 @@ inst_symlink() {
     ln -sfn $(convert_abs_rel "${_target}" "${_realsrc}") "$initdir/$_target"
 }
 
-udevdir=$(pkg-config udev --variable=udevdir)
+udevdir=$(pkg-config udev --variable=udevdir 2>/dev/null)
 if ! [[ -d "$udevdir" ]]; then
     [[ -d /lib/udev ]] && udevdir=/lib/udev
     [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
index e8c1c04..ff47021 100755
--- a/modules.d/95udev-rules/module-setup.sh
+++ b/modules.d/95udev-rules/module-setup.sh
@@ -5,13 +5,13 @@
 install() {
     local _i
 
-    systemdutildir=$(pkg-config systemd --variable=systemdutildir)
+    systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null)
     if ! [[ -d "$systemdutildir" ]]; then
         [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd
         [[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd
     fi
 
-    udevdir=$(pkg-config udev --variable=udevdir)
+    udevdir=$(pkg-config udev --variable=udevdir 2>/dev/null)
     if ! [[ -d "$udevdir" ]]; then
         [[ -d /lib/udev ]] && udevdir=/lib/udev
         [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
-- 
1.7.10.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-06 12:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 12:27 [PATCH] Avoid annonying warnings when pkg-config is not installed Juan RP

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.