Skip to content

Commit

Permalink
Check for presence of /tmp/net-${device}.conf before sourcing it [Clo…
Browse files Browse the repository at this point in the history
…ses: issue1196]

Quoting Marc from issue1196:

| in recent busyboxes, sourcing a non-existent file makes busybox
| (silently?) exit, which in case of scripts/live leads to an immediate kernel
| panic since the root fs is not yet mounted.

Thanks: Marc 'Zugschlus' Haber for the bugreport and debugging this issue
  • Loading branch information
mika committed Jul 23, 2012
1 parent a98122b commit 6d32dfe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions debian/patches/27_support_static_ip.patch
Expand Up @@ -79,7 +79,7 @@
fi

# split args of ethdevice=eth0,eth1 into "eth0 eth1"
@@ -374,38 +397,27 @@
@@ -374,38 +397,29 @@
devlist="$devlist $device"
done

Expand Down Expand Up @@ -110,7 +110,9 @@
- export DEVICE="$dev"
- break
+ IPV4ADDR="0.0.0.0"
+ . /tmp/net-${device}.conf
+ if [ -e "/tmp/net-${device}.conf" ]; then
+ . /tmp/net-${device}.conf
+ fi
+ if [ "${IPV4ADDR}" != "0.0.0.0" ]; then
+ export DEVICE="$dev $DEVICE"
+ # break # exit loop as we just use the irst
Expand Down

0 comments on commit 6d32dfe

Please sign in to comment.