dracut/0013-dm-check-for-presence-of-dmsetup.patch
Harald Hoyer 18c19d34cc dracut-019-16.git20120611
new upstream version
2012-06-11 17:19:26 +02:00

38 lines
1000 B
Diff

From df96787019aadea63f6398a8ca8ba0a1e4d10202 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 8 Jun 2012 12:41:49 +0200
Subject: [PATCH] dm: check for presence of dmsetup
---
modules.d/90dm/dm-shutdown.sh | 7 ++++++-
modules.d/90dm/module-setup.sh | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules.d/90dm/dm-shutdown.sh b/modules.d/90dm/dm-shutdown.sh
index 80d80d0..bf97637 100755
--- a/modules.d/90dm/dm-shutdown.sh
+++ b/modules.d/90dm/dm-shutdown.sh
@@ -13,4 +13,9 @@ _do_dm_shutdown() {
fi
return $ret
}
-_do_dm_shutdown $1
+
+if command -v dmsetup >/dev/null; then
+ _do_dm_shutdown $1
+else
+ :
+fi
diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh
index bac854a..4209537 100755
--- a/modules.d/90dm/module-setup.sh
+++ b/modules.d/90dm/module-setup.sh
@@ -3,6 +3,7 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
+ type -P dmsetup >/dev/null || return 1
return 255
}