hello michael,

thanks for your report! :)

now that your klibc bug report is merged,
time to look again at your patch.

On Fri, 22 Feb 2008, Michal Sojka wrote:
> 
> If I want several computers to boot from the same ramdisk (with NFS
> root) and some computers have multiple network interfaces, the DEVICE
> variable can't be set to a specific value (e.g. eth0). Ipconfig from
> klibc supports a mode, where DHCP request is sent to all interfaces
> and the one receiving the first DHCP offer is used. This perfectly
> suits my needs, but it can't be used with initramfs scripts because
> the interface name in not known in advance and the DEVICE variable is
> set to something like ::::::.

ack that is currently buggy.
 
> I have used the following patch to solve it:
> 
> --- initramfs-tools-0.85h.orig/scripts/nfs      2008-02-22 21:47:43.000000000 
> +0100
> +++ initramfs-tools-0.85h/scripts/nfs   2008-02-22 21:48:48.000000000 +0100

0.85h is frozen
but thanks to providing both patches.
 
> The bug is also present in unstable, but I didn't test this patch:

yep.
 
> --- initramfs-tools-0.91e.orig/scripts/functions        2008-02-22 
> 20:15:06.000000000 +0100
> +++ initramfs-tools-0.91e/scripts/functions     2008-02-22 20:20:10.000000000 
> +0100
> @@ -302,6 +302,7 @@
>                 ;;
>         esac
> 
> -       # source relevant ipconfig output
> -       . /tmp/net-${DEVICE}.conf
> +       # source ipconfig output (if DEVICE refers to multiple
> +       # interfaces we don't know the exact name)
> +       . /tmp/net-*.conf
>  }

i don't think that this is correct either, in the usecase
that you presented with IPOFTS=:::::: reading the configure_networking()
${DEVICE} would not be set. thus bellows seems better to me,
and would keep current ${DEVICE} user happy.. ;)


diff --git a/scripts/functions b/scripts/functions
index 0648701..588e324 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -304,6 +304,12 @@ configure_networking()
                ;;
        esac
 
-       # source relevant ipconfig output
-       . /tmp/net-${DEVICE}.conf
+       # source ipconfig output
+       if [ -n "${DEVICE}" ]; then
+               # source specific bootdevice
+               . /tmp/net-${DEVICE}.conf
+       else
+               # source any interface as not exaclty specified
+               . /tmp/net-*.conf
+       fi
 }

pushing aboves for next upload.
 
best regards
maks



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to