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

Bug#700920: marked as done (improving live-media= to immediately detect medium)



Your message dated Tue, 28 May 2013 06:42:53 +0200
with message-id <51A435CD.6040107@progress-technologies.net>
and subject line Re: improving live-media= to immediately detect medium
has caused the Debian Bug report #700920,
regarding improving live-media= to immediately detect medium
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
700920: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700920
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: live-boot
Severity: wishlist
Tags: patch

If a preferred medium (device or medium type) is given with the
live-media parameter then waiting for the timeout to expire before
scaning for these devices is not necessary. Just pick the device as soon
as it appears. If a criterium would match several devices the outcome is
undefined anyway. So choosing the first one is good enough.

If no removable or removable-usb device is found after the timeout
expires, just boot any live medium available instead of panicing.

The second change makes it possible to have a non-wirteable (ISO)
live-image with the default boot parameter set to
live-media=removable-usb for machines that can't boot directly from USB
devices. If a live medium on an USB device is present it'll be
preferred, but the ISO will also boot without an USB device.

The attached patch implements a solution to both of these issues.

Gaudenz

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (800, 'testing'), (700, 'unstable'), (50, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From 50de32e9d644b09225937c0968dd7fb0095ab1d1 Mon Sep 17 00:00:00 2001
From: Gaudenz Steinlin <gaudenz@debian.org>
Date: Thu, 17 Jan 2013 16:45:27 +0100
Subject: [PATCH] Immediately detect medium from live-media parameter

If a preferred medium (device or medium type) is given with the
live-media parameter then waiting for the timeout to expire before
scaning for these devices is not necessary. Just pick the device as soon
as it appears. If a criterium would match several devices the outcome is
undefined anyway. So choosing the first one is good enough.

If no removable or removable-usb device is found after the timeout
expires, just boot any live medium available instead of panicing.
---
 scripts/boot/9990-misc-helpers.sh |   27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/scripts/boot/9990-misc-helpers.sh b/scripts/boot/9990-misc-helpers.sh
index 888eeaf..1341972 100755
--- a/scripts/boot/9990-misc-helpers.sh
+++ b/scripts/boot/9990-misc-helpers.sh
@@ -259,16 +259,10 @@ find_livefs ()
 {
 	timeout="${1}"
 
-	# don't start autodetection before timeout has expired
-	if [ -n "${LIVE_MEDIA_TIMEOUT}" ]
-	then
-		if [ "${timeout}" -lt "${LIVE_MEDIA_TIMEOUT}" ]
-		then
-			return 1
-		fi
-	fi
-
-	# first look at the one specified in the command line
+	# first look at the one specified in the command line This is OK
+	# before the timeout has expired, if more than one device matches the
+	# criteria the outcome is undefined anyway, so we can pick the first
+	# one that appears.
 	case "${LIVE_MEDIA}" in
 		removable-usb)
 			for sysblock in $(removable_usb_dev "sys")
@@ -281,7 +275,6 @@ find_livefs ()
 					fi
 				done
 			done
-			return 1
 			;;
 
 		removable)
@@ -295,7 +288,6 @@ find_livefs ()
 					fi
 				done
 			done
-			return 1
 			;;
 
 		*)
@@ -309,7 +301,16 @@ find_livefs ()
 			;;
 	esac
 
-	# or do the scan of block devices
+	# don't start autodetection before timeout has expired
+	if [ -n "${LIVE_MEDIA_TIMEOUT}" ]
+	then
+		if [ "${timeout}" -lt "${LIVE_MEDIA_TIMEOUT}" ]
+		then
+			return 1
+		fi
+	fi
+
+	# autodetection of live media
 	# prefer removable devices over non-removable devices, so scan them first
 	devices_to_scan="$(removable_dev 'sys') $(non_removable_dev 'sys')"
 
-- 
1.7.10.4


--- End Message ---
--- Begin Message ---
apparently nobody wants to work on that, moving on..

-- 
Address:        Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:          daniel.baumann@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/

--- End Message ---

Reply to: