From 4ad8c497de815693d06e94c77e1abd5fe5b6a2cb Mon Sep 17 00:00:00 2001 From: "debian@x.ray.net" Date: Fri, 15 Feb 2008 19:41:33 +0100 Subject: configure_network(): do nothing if device already configured This patch is part of three patches (initramfs-tools, cryptsetup, dropbear) which enable mkinitramfs to create initramfs that provide the ability to log in and unlock a cryptroot during the boot process from remote via ssh. Calling configure_networking from /scripts/functions might appear more than once, so just try if it hasn't been done/wasn't successful yet. Check that by testing for existence of /tmp/net-$DEVICE.conf which is created by ipconfig. --- scripts/functions | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index fdd808f..b4bd8cd 100644 --- a/scripts/functions +++ b/scripts/functions @@ -273,6 +273,9 @@ parse_numeric() { configure_networking() { + # networking already configured thus bail out + [ -e /tmp/net-${DEVICE}.conf ] && return 0 + # support ip options see linux sources Documentation/nfsroot.txt case ${IPOPTS} in none|off) -- cgit v1.2.3