blob: 4b82262d8751e8db4edebb550ecbff4cde0cdf2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/bin/sh
echo "starting network interfaces..."
grep "root=/dev/nfs" /proc/cmdline > /dev/null
if [ $? != 0 ]; then
ifup -a
else
# We are doing nfsroot. We cannot simply call ifup -a
# here because we will run into trouble with dhcp.
# So we call ifup for every interface except the one
# we are doing nfsroot on.
#
if [ ! -f /etc/network/interfaces ]; then
exit 0
fi
ifaces=$(grep "^auto" /etc/network/interfaces)
for i in $ifaces; do
if [ "$i" = auto ]; then
continue
fi
ifconfig | grep "^$i"
if [ $? != 0 ]; then
ifup "$i"
fi
done
fi
exit 0
|