dracut-functions.sh:for_each_host_dev_fs() return a value
authorHarald Hoyer <harald@redhat.com>
Wed, 22 Feb 2012 18:06:00 +0000 (19:06 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 22 Feb 2012 18:06:00 +0000 (19:06 +0100)
for_each_host_dev_fs() now returns 0 if one func returned with 0

dracut-functions.sh

index 95d7cbb..199fca4 100755 (executable)
@@ -303,6 +303,7 @@ for_each_host_dev_fs()
     local _func="$1"
     local _dev
     local _fs
+    local _ret=1
     for f in ${host_fs_types[@]}; do
         OLDIFS="$IFS"
         IFS="|"
@@ -311,8 +312,9 @@ for_each_host_dev_fs()
         _dev="$1"
         [[ -b "$_dev" ]] || continue
         _fs="$2"
-        $_func $_dev $_fs
+        $_func $_dev $_fs && _ret=0
     done
+    return $_ret
 }
 
 # Walk all the slave relationships for a given block device.