Blame 0034-parse-lvm.sh-fix-for-generated-initqueue-finished-sc.patch
|
Harald Hoyer |
428fde |
From 6c706227f55161c31d17769155c179180e5be75e Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
428fde |
From: Michal Soltys <soltys@ziu.info>
|
|
Harald Hoyer |
428fde |
Date: Thu, 28 Jul 2011 14:40:10 +0200
|
|
Harald Hoyer |
428fde |
Subject: [PATCH] parse-lvm.sh: fix for generated initqueue/finished script
|
|
Harald Hoyer |
428fde |
|
|
Harald Hoyer |
428fde |
The script that was generated always returned the status of the last test
|
|
Harald Hoyer |
428fde |
condition, potentially missing any earlier non-existing devices.
|
|
Harald Hoyer |
428fde |
|
|
Harald Hoyer |
428fde |
The change assures, that the script returns 0 only if all expected
|
|
Harald Hoyer |
428fde |
devices are found.
|
|
Harald Hoyer |
428fde |
|
|
Harald Hoyer |
428fde |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
|
Harald Hoyer |
428fde |
---
|
|
Harald Hoyer |
428fde |
modules.d/90lvm/parse-lvm.sh | 2 +-
|
|
Harald Hoyer |
428fde |
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
Harald Hoyer |
428fde |
|
|
Harald Hoyer |
428fde |
diff --git a/modules.d/90lvm/parse-lvm.sh b/modules.d/90lvm/parse-lvm.sh
|
|
Harald Hoyer |
428fde |
index 2e21d82..b85a1ac 100755
|
|
Harald Hoyer |
428fde |
--- a/modules.d/90lvm/parse-lvm.sh
|
|
Harald Hoyer |
428fde |
+++ b/modules.d/90lvm/parse-lvm.sh
|
|
Harald Hoyer |
428fde |
@@ -10,7 +10,7 @@ if ! getargbool 1 rd.lvm -n rd_NO_LVM; then
|
|
Harald Hoyer |
428fde |
rm -f /etc/udev/rules.d/64-lvm*.rules
|
|
Harald Hoyer |
428fde |
else
|
|
Harald Hoyer |
428fde |
for dev in $(getargs rd.lvm.vg rd_LVM_VG=) $(getargs rd.lvm.lv rd_LVM_LV=); do
|
|
Harald Hoyer |
428fde |
- printf '[ -e "/dev/%s" ]\n' $dev \
|
|
Harald Hoyer |
428fde |
+ printf '[ -e "/dev/%s" ] || return 1\n' $dev \
|
|
Harald Hoyer |
428fde |
>> $hookdir/initqueue/finished/lvm.sh
|
|
Harald Hoyer |
428fde |
{
|
|
Harald Hoyer |
428fde |
printf '[ -e "/dev/%s" ] || ' $dev
|