]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh: proper return get_fs_env() and get_fs_type()
authorHarald Hoyer <harald@redhat.com>
Thu, 29 Mar 2012 12:37:41 +0000 (14:37 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 29 Mar 2012 12:37:41 +0000 (14:37 +0200)
dracut-functions.sh

index 8d31215d21aa7bbf32fe1cd8244a15d5c400a6eb..563669ef1cc786f82793e4d2d0f97ad045d0b627 100755 (executable)
@@ -174,7 +174,7 @@ get_fs_env() {
         | while read line; do
             [[ "$line" =~ 'ID_FS_(TYPE|UUID)=' ]] && echo $line;
             done)
-    [[ $ID_FS_TYPE ]] && return
+    [[ $ID_FS_TYPE ]] && return 0
 
     if [[ -x /lib/udev/vol_id ]]; then
         eval $(/lib/udev/vol_id --export $1)
@@ -206,11 +206,11 @@ get_fs_type() (
         || [[ $1 != ${1#/dev/block/nfs3:} ]] \
         || [[ $1 != ${1#/dev/block/nfs4:} ]]; then
         echo "nfs"
-        return
+        return 0
     fi
     if get_fs_env $1; then
         echo $ID_FS_TYPE
-        return
+        return 0
     fi
     find_dev_fstype $1
 )