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

Bug#570100: marked as done ([patch] please call udevadm settle in scripts/init-premount/select_eth_device)



Your message dated Sun, 14 Mar 2010 22:47:40 +0000
with message-id <E1Nqway-00062e-89@ries.debian.org>
and subject line Bug#570100: fixed in live-initramfs 1.173.5-1
has caused the Debian Bug report #570100,
regarding [patch] please call udevadm settle in scripts/init-premount/select_eth_device
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.)


-- 
570100: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570100
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: live-initramfs
Version: 1.173.1-1
Severity: wishlist

Hello,

when select_eth_device is run before udevadm settle has been run, it
will not find any devices, which will lead to a kernel panic when
ipconfig is run in scripts/live. Normally udevadm settle is run by
scripts/init-premount/udev, but the udev package from Ubuntu does not do
so. The attached patch adds udevadm calls to select_eth_device and also
fixes some indentation inconsistencies. Set severity to whishlist as it
is quite unusual to use udev from Ubuntu in Debian, but I think it is
useful to ensure udevadm settle has been called. I'd also like to point
out that this may be a timing issue, so it may be hard to reproduce.

Thanks,

Andreas

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

diff --git a/scripts/init-premount/select_eth_device b/scripts/init-premount/select_eth_device
index 6ab8bfe..4323880 100755
--- a/scripts/init-premount/select_eth_device
+++ b/scripts/init-premount/select_eth_device
@@ -3,8 +3,6 @@
 # Original script by Andreas Teuchert <ant+dl@hsg-kl.de>
 # Modified by Frédéric Boiteux <fboiteux@calistel.com>
 
-
-
 PREREQ="blacklist udev"
 
 prereqs()
@@ -25,16 +23,28 @@ bootconf=$(egrep '^BOOT=' /conf/initramfs.conf | tail -1)
 
 # can be superseded by command line (used by Debian-Live's netboot for example)
 for ARGUMENT in $(cat /proc/cmdline); do
-    case "${ARGUMENT}" in
-        netboot=*)
-        NETBOOT="${ARGUMENT#netboot=}"
-        ;;
-    esac
+	case "${ARGUMENT}" in
+		netboot=*)
+			NETBOOT="${ARGUMENT#netboot=}"
+			;;
+	esac
 done
 
 if [ "$bootconf" != "BOOT=nfs" ] && [ "$NETBOOT" = "" ]; then
-    # Not a net boot : nothing to do
-    exit 0
+	# Not a net boot : nothing to do
+	exit 0
+fi
+
+# be sure this has been run (*should* be done by scripts/init-premount/udev)
+if [ -x /sbin/udevadm ]
+then
+	# lenny
+	udevadm trigger
+	udevadm settle
+else
+	# etch
+	udevtrigger
+	udevsettle
 fi
 
 # we want to do some basic IP
@@ -44,34 +54,35 @@ modprobe -q af_packet
 l_interfaces=$(cd /sys/class/net/ && ls -d eth* 2>/dev/null)
 
 if [ $(echo $l_interfaces | wc -w) -lt 2 ]; then
-    # only one interface : no choice
-    echo "DEVICE=$l_interfaces" >> /conf/param.conf
-    exit 0
+	# only one interface : no choice
+	echo "DEVICE=$l_interfaces" >> /conf/param.conf
+	exit 0
 fi
 
 while true; do
-        echo -n "Looking for a connected Ethernet interface ..."
+	echo -n "Looking for a connected Ethernet interface ..."
 
 	for interface in $l_interfaces; do
 		# ATTR{carrier} is not set if this is not done
-                echo -n " $interface ?"
+		echo -n " $interface ?"
 		ipconfig -c none -d $interface -t 1 >/dev/null 2>&1
-        done
-        echo ''
+	done
+
+	echo ''
 
-        for step in 1 2 3 4 5; do
-	        for interface in $l_interfaces; do
-                        carrier=$(cat /sys/class/net/$interface/carrier \
-                                  2>/dev/null)
-                        # link detected
-                        if [ "$carrier" = 1 ]; then
-                                echo " found $interface."
-                                # inform initrd's init script :
-                                echo "DEVICE=$interface" >> /conf/param.conf
-                                exit 0
-		        fi
-	        done
-                # wait a bit
-                sleep 1
-        done
+	for step in 1 2 3 4 5; do
+		for interface in $l_interfaces; do
+			carrier=$(cat /sys/class/net/$interface/carrier \
+				2>/dev/null)
+			# link detected
+			if [ "$carrier" = 1 ]; then
+				echo " found $interface."
+				# inform initrd's init script :
+				echo "DEVICE=$interface" >> /conf/param.conf
+				exit 0
+			fi
+		done
+		# wait a bit
+		sleep 1
+	done
 done

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Source: live-initramfs
Source-Version: 1.173.5-1

We believe that the bug you reported is fixed in the latest version of
live-initramfs, which is due to be installed in the Debian FTP archive:

live-initramfs_1.173.5-1.diff.gz
  to main/l/live-initramfs/live-initramfs_1.173.5-1.diff.gz
live-initramfs_1.173.5-1.dsc
  to main/l/live-initramfs/live-initramfs_1.173.5-1.dsc
live-initramfs_1.173.5-1_all.deb
  to main/l/live-initramfs/live-initramfs_1.173.5-1_all.deb
live-initramfs_1.173.5.orig.tar.gz
  to main/l/live-initramfs/live-initramfs_1.173.5.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 570100@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel@debian.org> (supplier of updated live-initramfs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 14 Mar 2010 23:27:57 +0100
Source: live-initramfs
Binary: live-initramfs
Architecture: source all
Version: 1.173.5-1
Distribution: unstable
Urgency: low
Maintainer: Debian Live <debian-live@lists.debian.org>
Changed-By: Daniel Baumann <daniel@debian.org>
Description: 
 live-initramfs - Debian Live initramfs hook
Closes: 521129 545842 570100 570162
Changes: 
 live-initramfs (1.173.5-1) unstable; urgency=low
 .
   [ Daniel Baumann ]
   * Updating contact information in copyright file.
   * Simplyfing initramfs triggers (Closes: #521129, #545842).
   * Wrapping fields in control file.
   * Using minimized rules file.
   * Simplifying wording in bug-presubj file.
 .
   [ Andreas Teuchert ]
   * Calling udevadm settle in scripts/init-premount/select_eth_device
     (Closes: #570100).
 .
   [ Tanguy Ortolo ]
   * Also respecting persistent-path parameter for snapshots (Closes:
     #570162).
Checksums-Sha1: 
 d488d4d00413166b680ea868b4dcc2ec7d68f8bf 1300 live-initramfs_1.173.5-1.dsc
 24f0c0060a1c6dc89fde44121e2b355d9d1b27d6 87863 live-initramfs_1.173.5.orig.tar.gz
 7f1c9e57a2e293b5c4e7ea323ded084182517f46 32548 live-initramfs_1.173.5-1.diff.gz
 cd57bfb9b31af90e506d9ca1441a80611cdfd2f5 100002 live-initramfs_1.173.5-1_all.deb
Checksums-Sha256: 
 de91bb85373dcd6cec559dfe1cbba6ae152e6cf1c930c2db49abf112d4427e84 1300 live-initramfs_1.173.5-1.dsc
 3ddd19d843f4990e64becd0208e8285fb5fd89baba1a5bf79ec8f0342ef6844a 87863 live-initramfs_1.173.5.orig.tar.gz
 03f27c8caec0dbf54d2ace623823a1412f84170f0b28ce99abf5423f618380b2 32548 live-initramfs_1.173.5-1.diff.gz
 0a97deb015484049854414700cfa7e773be97f34f14ec32e740927901724fd0e 100002 live-initramfs_1.173.5-1_all.deb
Files: 
 58f39935471678ee1db0d30d453c98c0 1300 misc optional live-initramfs_1.173.5-1.dsc
 1972b815457e9e81790092ac30313bb9 87863 misc optional live-initramfs_1.173.5.orig.tar.gz
 8009dca5f1125e72465f91857f86bd40 32548 misc optional live-initramfs_1.173.5-1.diff.gz
 cb7f4263ceed2fef359b12baca9ada12 100002 misc optional live-initramfs_1.173.5-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkudY3EACgkQ+C5cwEsrK56MxgCdGGGF8hlGmgLVtx9SGIdTLQL4
UXAAoJ0QV4uL3/P2tGtXcJGfwK7VMZxa
=LWFl
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: