Respecting media timeout even when specificing media device manually.
authorDaniel Baumann <daniel@debian.org>
Thu, 12 Mar 2009 06:12:21 +0000 (07:12 +0100)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:48:04 +0000 (17:48 +0100)
scripts/live

index eb04d27..5d5b978 100755 (executable)
@@ -1391,21 +1391,21 @@ find_livefs ()
 {
        timeout="${1}"
 
-       # first look at the one specified in the command line
-       if [ ! -z "${LIVE_MEDIA}" ]
+       # don't start autodetection before timeout has expired
+       if [ -n "${LIVE_MEDIA_TIMEOUT}" ]
        then
-               if check_dev "null" "${LIVE_MEDIA}" "skip_uuid_check"
+               if [ "${timeout}" -lt "${LIVE_MEDIA_TIMEOUT}" ]
                then
-                       return 0
+                       return 1
                fi
        fi
 
-       # don't start autodetection before timeout has expired
-       if [ -n "${LIVE_MEDIA_TIMEOUT}" ]
+       # first look at the one specified in the command line
+       if [ ! -z "${LIVE_MEDIA}" ]
        then
-               if [ "${timeout}" -lt "${LIVE_MEDIA_TIMEOUT}" ]
+               if check_dev "null" "${LIVE_MEDIA}" "skip_uuid_check"
                then
-                       return 1
+                       return 0
                fi
        fi