summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authordebian@x.ray.net <debian@x.ray.net>2008-02-15 19:41:33 +0100
committermaximilian attems <max@stro.at>2008-02-15 19:59:41 +0100
commit4ad8c497de815693d06e94c77e1abd5fe5b6a2cb (patch)
treea935e425f114e5d1e82f53aad7f9d4905a30b45c /scripts/functions
parentcaa6893258b4262c898807227a7d2a03b9ba6f4a (diff)
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.
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions3
1 files changed, 3 insertions, 0 deletions
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)