[PATCH 06/16] Flatten our check to ensure that depmod works.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No need for a nested if here.

---
 dracut |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/dracut b/dracut
index 184b0c1..bfef92c 100755
--- a/dracut
+++ b/dracut
@@ -270,11 +270,10 @@ unset moddir
 ## final stuff that has to happen
 
 # generate module dependencies for the initrd
-if [[ -d $initdir/lib/modules/$kernel ]]; then
-    if ! depmod -a -b "$initdir" $kernel; then
-        derror "\"depmod -a $kernel\" failed."
-        exit 1
-    fi
+if [[ -d $initdir/lib/modules/$kernel ]] && \
+    ! depmod -a -b "$initdir" $kernel; then
+    derror "\"depmod -a $kernel\" failed."
+    exit 1
 fi
 
 if [[ $include_src && $include_target ]]; then
-- 
1.7.2.1

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux