Hey max, * maximilian attems <[EMAIL PROTECTED]>, [2007-06-21 12:02 +0200]: > On Mon, 28 May 2007, Emanuele Rocca wrote: > > Trying to boot with this initrd the kernel is not able to find the > > firmware for my qla2xxx, although a diff -Nur between the contents of > > the following two images yields to nothing: > > could you post the diff?
I've tried today with -rc5 after a dist-upgrade and actually there are some differences (see attached diff). I can confirm that with initramfs-tools 0.87b the initrd is created properly. ciao, ema
diff -Nur old/init new/init --- old/init 2007-06-24 13:07:47.000000000 +0200 +++ new/init 2007-06-24 13:07:56.000000000 +0200 @@ -47,7 +47,6 @@ export readonly=y export rootmnt=/root export debug= -export cryptopts=${CRYPTOPTS} export ROOTDELAY= export panic= export blacklist= @@ -80,9 +79,11 @@ ;; rootdelay=*) ROOTDELAY="${x#rootdelay=}" - ;; - cryptopts=*) - cryptopts="${x#cryptopts=}" + case ${ROOTDELAY} in + *[![:digit:].]*) + ROOTDELAY= + ;; + esac ;; nfsroot=*) NFSROOT="${x#nfsroot=}" @@ -101,6 +102,11 @@ ;; panic=*) panic="${x#panic=}" + case ${panic} in + *[![:digit:].]*) + panic= + ;; + esac ;; quiet) quiet=y Binary files old/lib/libvolume_id.so.0 and new/lib/libvolume_id.so.0 differ Binary files old/lib/udev/ata_id and new/lib/udev/ata_id differ Binary files old/lib/udev/cdrom_id and new/lib/udev/cdrom_id differ Binary files old/lib/udev/edd_id and new/lib/udev/edd_id differ diff -Nur old/lib/udev/hotplug.functions new/lib/udev/hotplug.functions --- old/lib/udev/hotplug.functions 2007-06-24 13:07:47.000000000 +0200 +++ new/lib/udev/hotplug.functions 1970-01-01 01:00:00.000000000 +0100 @@ -1,151 +0,0 @@ -# Setup and shell utility functions for use in hotplug agents. -# vim: syntax=sh - -#DEBUG=yes - -#EVENTS_LOG='/dev/hotplug.log' - -FIRMWARE_DIRS='/lib/firmware /usr/local/lib/firmware /usr/lib/hotplug/firmware' - -EVENTS_DIR='/dev/.events' - -MODPROBE='/sbin/modprobe -s -q' - -PATH='/sbin:/bin:/usr/sbin:/usr/bin' - -[ -e /etc/default/hotplug ] && . /etc/default/hotplug - - -if [ -x /usr/bin/logger ]; then - LOGGER=/usr/bin/logger -elif [ -x /bin/logger ]; then - LOGGER=/bin/logger -else - unset LOGGER -fi - -# for diagnostics -if [ -t 1 -a -z "$LOGGER" ] || [ ! -e '/dev/log' ]; then - mesg() { - echo "$@" >&2 - } -elif [ -t 1 ]; then - mesg() { - echo "$@" - $LOGGER -t "${0##*/}[$$]" "$@" - } -else - mesg() { - $LOGGER -t "${0##*/}[$$]" "$@" - } -fi - -debug_mesg() { - [ -z "$DEBUG" -o "$DEBUG" = no ] && return 0 - mesg "$@" -} - -wait_for_file() { - local file=$1 - local timeout=$2 - [ "$timeout" ] || timeout=120 - - local count=$timeout - while [ $count != 0 ]; do - [ -e "$file" ] && return 0 - sleep 1 - count=$(($count - 1)) - done - - mesg "$file did not appear before the timeout!" - exit 1 -} - -# Read a single line from file $1 in the $DEVPATH directory. -# The function must not return an error even if the file does not exist. -sysread() { - local file="$1" - [ -e "/sys$DEVPATH/$file" ] || return 0 - local value - read value < "/sys$DEVPATH/$file" || return 0 - echo "$value" -} - -sysreadlink() { - local file="$1" - [ -e "/sys$DEVPATH/$file" ] || return 0 - readlink -f /sys$DEVPATH/$file 2> /dev/null || true -} - -# returns true if a directory is writeable -writeable() { - if ln -s check $1/.is-writeable 2> /dev/null; then - rm -f $1/.is-writeable - return 0 - else - return 1 - fi -} - -############################################################################## -lock_rules_file() { - [ -e /dev/.udev/ ] || return 0 - - RULES_LOCK="/dev/.udev/.lock-${RULES_FILE##*/}" - - retry=30 - while ! mkdir $RULES_LOCK 2> /dev/null; do - if [ $retry -eq 0 ]; then - echo "Cannot lock $RULES_FILE!" >&2 - exit 2 - fi - sleep 1 - retry=$(($retry - 1)) - done -} - -unlock_rules_file() { - [ "$RULES_LOCK" ] || return 0 - rmdir $RULES_LOCK || true -} - -choose_rules_file() { - local tmp_rules_file="/dev/.udev/tmp-rules--${RULES_FILE##*/}" - [ -e "$RULES_FILE" -o -e "$tmp_rules_file" ] || PRINT_HEADER=1 - - if writeable ${RULES_FILE%/*}; then - RO_RULES_FILE='/dev/null' - else - RO_RULES_FILE=$RULES_FILE - RULES_FILE=$tmp_rules_file - fi -} - -############################################################################## -raw_find_next_available() { - local links="$1" - - local basename=${links%%[ 0-9]*} - local max=-1 - for name in $links; do - local num=${name#$basename} - [ "$num" ] || num=0 - [ $num -gt $max ] && max=$num - done - - local max=$(($max + 1)) - # "name0" actually is just "name" - [ $max -eq 0 ] && return - echo "$max" -} - -find_all_rules() { - local key="$1" - local linkre="$2" - local match="$3" - - local search='.*[[:space:],]'"$key"'"\('"$linkre"'\)"[[:space:]]*\(,.*\|\\\|\)$' - - echo $(sed -n -e "${match}s/${search}/\1/p" $RO_RULES_FILE $RULES_FILE) -} - diff -Nur old/lib/udev/ide.agent new/lib/udev/ide.agent --- old/lib/udev/ide.agent 2007-06-24 13:07:47.000000000 +0200 +++ new/lib/udev/ide.agent 1970-01-01 01:00:00.000000000 +0100 @@ -1,40 +0,0 @@ -#!/bin/sh -e -# only needed for kernels < 2.6.16 -# -# load the high level driver for IDE devices -# - -cd /lib/udev/ -. ./hotplug.functions - -if [ -z "$DEVPATH" ]; then - echo "\$DEVPATH is not set!" >&2 - exit 1 -fi - -device=${DEVPATH#/devices/*/ide?/} -drive=${device#?.} -bus=${device%.?} - -unitnum=$((96 + 1 + $drive + $bus * 2)) -name=$(printf "hd\\$(printf '%o' $unitnum)") - -procfile="/proc/ide/$name/media" - -wait_for_file $procfile - -read media < $procfile -case "$media" in - cdrom) module=ide-cd ;; - disk) module=ide-disk ;; - floppy) module=ide-floppy ;; - tape) module=ide-tape ;; - *) module=ide-generic ;; -esac - -if [ "$module" ]; then - exec $MODPROBE $module -fi - -exit 0 - diff -Nur old/lib/udev/path_id new/lib/udev/path_id --- old/lib/udev/path_id 2007-06-24 13:07:47.000000000 +0200 +++ new/lib/udev/path_id 1970-01-01 01:00:00.000000000 +0100 @@ -1,564 +0,0 @@ -#!/bin/sh - -# provide the shortest possible unique hardware path to a device -# for the Linux Persistent Device Naming scheme -# -# Copyright (C) 2005-2006 SUSE Linux Products GmbH -# Author: -# Hannes Reinecke <[EMAIL PROTECTED]> -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation version 2 of the License. -# -# to be called from a udev rule to return the name for a symlink -# DEVPATH=<devpath>; path_id -# path_id <devpath> - -# examples for all block devices on a system: -# for i in `find /sys/class/block`; do DEVPATH="`echo $i | sed -e '[EMAIL PROTECTED]/sys\|/dev@@g'`"; path_id; done - -SYSFS=/sys -RESULT=1 -TYPE= -OPWD="`pwd`" -full_sysfs_path= -full_sysfs_device_path= - -if [ -z "$DEVPATH" -a -z "$1" ] ; then - exit 1 -fi - -if [ -z "$DEVPATH" ] ; then - case "$1" in - $SYSFS/*) - DEVPATH="${1#$SYSFS}" - ;; - *) - DEVPATH=$1 - ;; - esac -fi - -if [ ! -e $SYSFS$DEVPATH/dev ] ; then - exit 1 -fi - -case "$DEVPATH" in - /devices/*) - cd "$SYSFS$DEVPATH/subsystem"; - TYPE="`pwd -P`" - cd "$OPWD" - TYPE="${TYPE##*/}" - ;; - /class/*) - TYPE="${DEVPATH#/class/}" - TYPE="${TYPE%%/*}" - ;; - /block/*) - TYPE=block - ;; - *) - exit 1 - ;; -esac - -get_port_offset () { - local type offset port - type=$1 - offset=$2 - for i in $type[0-9]* ; do - : i $i - port="${i#$type}" - if [ "$port" -lt "$offset" ] ; then offset=$port ; fi - done - echo $offset -} - -handle_pci () { - local DEV=$1 - cd -P $1 - DEV=${PWD} - pci_id=${DEV##*/} - host_dev_path=$DEV - while [ ! -z "$host_dev_path" ] ; do - case "$host_dev_path" in - */pci[0-9]*) - host_dev_path=${host_dev_path%/*} - ;; - *) - break - ;; - esac - done - d="pci-$pci_id-$d" - D="$host_dev_path" - RESULT=0 -} - -handle_platform () { - local DEV=$1 - cd -P $1 - DEV=${PWD} - platform_id=${DEV##*/} - host_dev_path=$DEV - while [ ! -z "$host_dev_path" ] ; do - case "$host_dev_path" in - */platform*) - host_dev_path=${host_dev_path%/*} - ;; - *) - break - ;; - esac - done - if [ "$d" ]; then - d="platform-$platform_id-$d" - else - d="platform-$platform_id" - fi - D="$host_dev_path" - RESULT=0 -} - -handle_serio () { - local DEV=$1 - cd -P $1 - DEV=${PWD} - serio_id=${DEV##*/serio} - host_dev_path=$DEV - while [ ! -z "$host_dev_path" ] ; do - case "$host_dev_path" in - */serio*) - host_dev_path=${host_dev_path%/*} - ;; - *) - break - ;; - esac - done - if [ "$d" ]; then - d="serio-$serio_id-$d" - else - d="serio-$serio_id" - fi - D="$host_dev_path" - RESULT=0 -} - -handle_ide () { - : handle_ide $* - local DEV=$1 - local port idedev idecontroller - # IDE - : DEV $DEV - port=${DEV##*/} - idedev=${DEV%/*} - idecontroller=${idedev%/*} - # port info if the controller has more than one interface - port="${port#ide}" - : port $port d $d - : idedev $idedev kernel_port $port - case "${port#*.}" in - 0) - channel=0 - ;; - 1) - channel=1 - ;; - *) - echo "Error: $idedev is neither master or slave" >&2 - ;; - esac - cd $idecontroller - offset="`get_port_offset ide ${port%.*}`" - cd "$OPWD" - : port offset $offset - port=$((${port%.*} - $offset)) - if [ "$d" ] ; then - d="ide-${port}:$channel-$d" - else - d="ide-${port}:$channel" - fi - D=$idecontroller - RESULT=0 -} - -handle_scsi () { - : handle_scsi $* - local DEV=$1 - local cil controller_port controller_dev - # SCSI device - cil="${DEV##*/}" - cil="${cil#*:}" - target_dev=${DEV%/*} - target_id=${target_dev##*/target} - cd "$target_dev" - target_num=0 - for tid in ${target_id}* ; do - target_num=$(( $target_num + 1 )) - done - controller_port=${target_dev%/*} - controller_dev="${controller_port%/*}" - : controller_dev $controller_dev - : controller_port $controller_port - # a host controller may have more than one interface/port - controller_port="${controller_port##*/host}" - # - cd "$controller_dev" - controller_offset=$(get_port_offset host $controller_port) - cd "$OPWD" - controller_port=$(( $controller_port - $controller_offset)) - scsi_id="scsi-${controller_port}:${cil}" - if [ "$d" ] ; then - d="${scsi_id}-$d" - else - d="$scsi_id" - fi - D="$controller_dev" - RESULT=0 -} - -handle_firewire () { - : handle_firewire $* - local DEV=$1 - if [ -f "$D/ieee1394_id" ] ; then - read ieee1394_id < $D/ieee1394_id - fi - if [ -z "$ieee1394_id" ] ; then - : no IEEE1394 ID - RESULT=1 - return - fi - fw_host_dev=${DEV%/fw-host*} - # IEEE1394 devices are always endpoints - d="ieee1394-0x$ieee1394_id" - D="$fw_host_dev" - RESULT=0 -} - -handle_fc () { - : handle_fc $* - local DEV=$1 - local cil controller_port controller_dev - # SCSI-FC device - fc_tgt_hcil="${DEV##*/}" - fc_tgt_lun="${fc_tgt_hcil##*:}" - fc_tgt_path="${DEV%/*}" - fc_tgt_num="${fc_tgt_path##*/}" - fc_tgt_dev="${fc_tgt_path}/fc_transport:${fc_tgt_num}" - if [ -e "$fc_tgt_dev/port_name" ]; then - read wwpn < $fc_tgt_dev/port_name - fi - if [ -z "$wwpn" ] ; then - : no WWPN - D= - RESULT=1 - return - fi - # Linux currently knows about 32bit luns - tmp_lun3=$(printf "%04x" $(($fc_tgt_lun & 0xFFFF))) - tmp_lun2=$(printf "%04x" $(( ($fc_tgt_lun >> 16) & 0xFFFF))) - tmp_lun1="0000" - tmp_lun0="0000" - if (($fc_tgt_lun == 0)) ; then - lun="0x0000000000000000" - else - lun="0x${tmp_lun3}${tmp_lun2}${tmp_lun1}${tmp_lun0}" - fi - controller_dev="${fc_tgt_path%/host[0-9]*}" - # FC devices are always endpoints - d="fc-${wwpn}:${lun}" - D="$controller_dev" - RESULT=0 -} - -handle_sas () { - : handle_sas $* - local DEV=$1 - local cil adapter controller_dev - # SAS device - sas_host_path="${DEV%%/port*}" - sas_phy_path="${DEV#*/host*/}" - sas_phy_path="${sas_phy_path%%/target*}" - sas_phy_id="${sas_phy_path%%/*}" - sas_phy_id="${sas_phy_id##*port-}" - sas_port_id="${sas_phy_path%%/end_device*}" - sas_port_id="${sas_port_id##*port-}" - sas_end_id="${sas_phy_path##*end_device-}" - sas_phy_dev="/sys/class/sas_phy/phy-${sas_phy_id}" - if [ -e "$sas_phy_dev/sas_address" ]; then - read phy_address < $sas_phy_dev/sas_address - read phy_id < $sas_phy_dev/phy_identifier - fi - if [ -z "$phy_address" ] ; then - : no initiator address - D= - RESULT=1 - return - fi - sas_port_dev="/sys/class/sas_port/port-${sas_port_id}" - if [ -e "$sas_port_dev/num_phys" ] ; then - read phy_port < $sas_port_dev/num_phys - fi - if [ -z "$phy_port" ] ; then - : no initiator address - D= - RESULT=1 - return - fi - sas_phy_address="$phy_address:$phy_port:$phy_id" - sas_end_dev="/sys/class/sas_device/end_device-${sas_end_id}" - if [ -e "$sas_end_dev/sas_address" ]; then - read end_address < $sas_end_dev/sas_address - read end_id < $sas_end_dev/phy_identifier - fi - if [ -z "$end_address" ] ; then - : no initiator address - D= - RESULT=1 - return - fi - sas_end_address="$end_address:$end_id" - controller_dev="${sas_host_path%/host[0-9]*}" - # SAS devices are always endpoints - d="sas-${sas_phy_address}-${sas_end_address}" - D="$controller_dev" - RESULT=0 -} - -handle_iscsi() { - local DEV=$1 - local iscsi_session_dir - local iscsi_session iscsi_session_path - local iscsi_connection iscsi_connection_path - local iscsi_scsi_lun - # iSCSI device - iscsi_session_dir="${DEV%%/target*}" - iscsi_session="${iscsi_session_dir##*/}" - iscsi_session_path=/sys/class/iscsi_session/${iscsi_session} - if [ ! -d "$iscsi_session_path" ] ; then - : no iSCSI session path - RESULT=1 - return - fi - # Currently we're not doing MC/S - for conn in ${iscsi_session_dir}/connection* ; do - iscsi_conn_num=${conn##*:} - if [ "$iscsi_conn_num" = '0' ] ; then - iscsi_connection=$(basename $conn) - fi - done - if [ -z "$iscsi_connection" ] ; then - : no iSCSI connection found - RESULT=1 - return - fi - iscsi_connection_path=/sys/class/iscsi_connection/${iscsi_connection} - if [ ! -d "$iscsi_connection_path" ] ; then - : no iSCSI connection path - RESULT=1 - return - fi - if [ -e "${iscsi_session_path}/targetname" ]; then - read iscsi_tgtname < ${iscsi_session_path}/targetname - fi - if [ -z "$iscsi_tgtname" ] ; then - : No iSCSI Targetname - RESULT=1 - return - fi - if [ -e "${iscsi_connection_path}/persistent_address" ] ; then - read iscsi_address < ${iscsi_connection_path}/persistent_address - fi - if [ -z "$iscsi_address" ] ; then - : No iSCSI Target address - RESULT=1 - return - fi - if [ -e "${iscsi_connection_path}/persistent_port" ] ; then - read iscsi_port < ${iscsi_connection_path}/persistent_port - fi - iscsi_scsi_lun="${DEV##*:}" - d="ip-${iscsi_address}:${iscsi_port}-iscsi-${iscsi_tgtname}-lun-${iscsi_scsi_lun}" - RESULT=0 -} - -handle_usb () { -: handle_usb $* - local DEV=$1 - cd -P $1 - DEV=${PWD} - port_id=${DEV##*/} - port_num=${port_id#*-} - host_dev_path=$DEV - while [ ! -z "$host_dev_path" ] ; do - case "$host_dev_path" in - */usb*) - usb_host_path=$host_dev_path - host_dev_path="${host_dev_path%/*}" - ;; - *) - break - ;; - esac - done - : host_dev_path $host_dev_path - usb_host_num=${usb_host_path##*/usb} - - cd "$host_dev_path" - usb_host_offset=$(get_port_offset usb $usb_host_num) - usb_host_port=$(($usb_host_num - $usb_host_offset)) - cd "$OPWD" - if [ "$d" ] ; then - d="usb-$usb_host_port:$port_num-${d}" - else - d="usb-$usb_host_port:$port_num" - fi - D="$host_dev_path" - RESULT=0 -} - -handle_device () { - full_sysfs_path="$SYSFS$DEVPATH" - case "$DEVPATH" in - /devices/*) - # new sysfs layout - if [ -L $full_sysfs_path/subsystem ]; then - full_sysfs_path="${full_sysfs_path%/*}" - cd "$full_sysfs_path/subsystem"; - subsys="`pwd -P`" - cd "$OPWD" - subsys="${subsys##*/}" - if [ "$subsys" = "block" ]; then - # parent is "block", it's a partition, move one up - full_sysfs_path="${full_sysfs_path%/*}" - fi - cd $full_sysfs_path - fi - ;; - *) - # old sysfs layout - if [ ! -L $full_sysfs_path/device ] ; then - if [ -f $full_sysfs_path/range ] ; then return ; fi - full_sysfs_path="${full_sysfs_path%/*}" - : full_sysfs_path "$full_sysfs_path" - if [ ! -L $full_sysfs_path/device -o ! -f $full_sysfs_path/dev ] ; then - return - fi - fi - cd $full_sysfs_path/device - ;; - esac - full_sysfs_device_path="`pwd -P`" - cd "$OPWD" - D=$full_sysfs_device_path - while [ ! -z "$D" ] ; do - case "$D" in - */ide[0-9]/[0-9].[0-9]*|*/ide[0-9][0-9]/[0-9][0-9].[0-9]*) - handle_ide "$D" - ;; - */css0/*) - if [ -r $full_sysfs_device_path/wwpn ]; then - read wwpn < $full_sysfs_device_path/wwpn - fi - if [ -r $full_sysfs_device_path/fcp_lun ]; then - read lun < $full_sysfs_device_path/fcp_lun - fi - if [ -r $full_sysfs_device_path/hba_id ]; then - read bus_id < $full_sysfs_device_path/hba_id - fi - if [ "$bus_id" -a "$wwpn" -a "$lun" ]; then - # S/390 zfcp adapter - d="ccw-$bus_id-zfcp-$wwpn:$lun" - RESULT=0 - else - # DASD devices - bus="ccw" - adapter=${D##*/} - d="$bus-$adapter" - RESULT=0 - fi - D= - ;; - */rport-[0-9]*:[0-9]*-[0-9]*/*) - handle_fc "$D" - ;; - */end_device-[0-9]*:[0-9]*:[0-9]*/*) - handle_sas "$D" - ;; - */fw-host[0-9]*/*) - handle_firewire "$D" - ;; - */session[0-9]*/*) - handle_iscsi "$D" - D= - ;; - */host[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*) - handle_scsi "$D" - ;; - */usb[0-9]*/[0-9]*/*) - handle_usb "$D" - ;; - */pci[0-9]*:[0-9]*) - handle_pci "$D" - ;; - */serio[0-9]*) - handle_serio "$D" - ;; - */platform/*) - handle_platform "$D" - ;; - */devices) - D= - ;; - *) - : not handled - RESULT=1 - return - ;; - esac - done - if [ "$TYPE" = "scsi_tape" ] ; then - devname=${full_sysfs_path##*/} - rewind="${devname%%st*}" - mode="${devname##*st}" - case "$mode" in - *l) - mode="l" - ;; - *m) - mode="m" - ;; - *a) - mode="a" - ;; - *) - mode="" - ;; - esac - if [ "$d" ]; then - d="$d-${rewind}st${mode}" - fi - fi -} - -case "$TYPE" in - block) - handle_device - echo "ID_PATH=$d" - ;; - scsi_tape) - handle_device - echo "ID_PATH=$d" - ;; - input) - handle_device - echo "ID_PATH=$d" - ;; - *) - RESULT=1 - ;; -esac - -exit $RESULT Binary files old/lib/udev/scsi_id and new/lib/udev/scsi_id differ Binary files old/lib/udev/usb_id and new/lib/udev/usb_id differ Binary files old/lib/udev/vol_id and new/lib/udev/vol_id differ diff -Nur old/scripts/init-premount/ps3 new/scripts/init-premount/ps3 --- old/scripts/init-premount/ps3 2007-06-24 13:07:47.000000000 +0200 +++ new/scripts/init-premount/ps3 2007-06-24 13:07:56.000000000 +0200 @@ -18,7 +18,7 @@ case "$DPKG_ARCH" in powerpc|ppc64) while read line; do - if [ "${line}" =! "${line#machine*PS3PF}" ]; then + if [ "${line}" != "${line#machine*PS3PF}" ]; then # For PS3's we know these devices will exist, # and that we'll need them modprobe ps3_storage diff -Nur old/scripts/local new/scripts/local --- old/scripts/local 2007-06-24 13:07:47.000000000 +0200 +++ new/scripts/local 2007-06-24 13:07:56.000000000 +0200 @@ -1,5 +1,29 @@ # Local filesystem mounting -*- shell-script -*- +# Parameter: device node to check +# Echos fstype to stdout +# Return value: indicates if an fs could be recognized +get_fstype () +{ + local FS FSTYPE FSSIZE RET + FS="${1}" + + # vol_id has a more complete list of file systems + if [ -x /lib/udev/vol_id ]; then + FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null) + else + eval $(fstype < "${FS}" 2> /dev/null) + fi + RET=$? + + if [ -z "${FSTYPE}" ]; then + FSTYPE="unknown" + fi + + echo "${FSTYPE}" + return ${RET} +} + # Parameter: Where to mount the filesystem mountroot () { @@ -9,7 +33,7 @@ # If the root device hasn't shown up yet, give it a little while # to deal with removable devices - if [ ! -e "${ROOT}" ]; then + if [ ! -e "${ROOT}" ] || ! $(get_fstype "${ROOT}" >/dev/null); then log_begin_msg "Waiting for root file system..." # Default delay is 180s @@ -23,9 +47,11 @@ fi slumber=$(( ${slumber} * 10 )) - while [ ${slumber} -gt 0 ] && [ ! -e "${ROOT}" ]; do + while [ ! -e "${ROOT}" ] \ + || ! $(get_fstype "${ROOT}" >/dev/null); do /bin/sleep 0.1 slumber=$(( ${slumber} - 1 )) + [ ${slumber} -gt 0 ] || break done if [ ${slumber} -gt 0 ]; then @@ -47,14 +73,10 @@ # Get the root filesystem type if not set if [ -z "${ROOTFSTYPE}" ]; then - eval $(fstype < ${ROOT}) + FSTYPE=$(get_fstype "${ROOT}") else FSTYPE=${ROOTFSTYPE} fi - if [ "$FSTYPE" = "unknown" ] && [ -x /lib/udev/vol_id ]; then - FSTYPE=$(/lib/udev/vol_id -t ${ROOT}) - [ -z "$FSTYPE" ] && FSTYPE="unknown" - fi [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount" run_scripts /scripts/local-premount diff -Nur old/scripts/nfs new/scripts/nfs --- old/scripts/nfs 2007-06-24 13:07:47.000000000 +0200 +++ new/scripts/nfs 2007-06-24 13:07:56.000000000 +0200 @@ -41,7 +41,13 @@ # get nfs root from dhcp if [ "x${NFSROOT}" = "xauto" ]; then - NFSROOT=${ROOTSERVER}:${ROOTPATH} + # check if server ip is part of dhcp root-path + if [ "${ROOTPATH#*:}" = "${ROOTPATH}" ]; then + NFSROOT=${ROOTSERVER}:${ROOTPATH} + else + NFSROOT=${ROOTPATH} + fi + # nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] elif [ -n "${NFSROOT}" ]; then # nfs options are an optional arg