1 |
On Tue, 2005-05-17 at 18:12 -0400, Zander Z365 wrote: |
2 |
> How can I configure the startup script so that networking will not be |
3 |
> started if the cable is not connected? |
4 |
|
5 |
I have the following preup() function in my /etc/conf.d/net file: |
6 |
|
7 |
preup() { |
8 |
case ${IFACE} in |
9 |
eth0) |
10 |
ebegin "Checking link on ${IFACE}" |
11 |
mii-tool ${IFACE} 2> /dev/null | grep -q 'link ok' |
12 |
eend $? |
13 |
;; |
14 |
|
15 |
*) |
16 |
;; |
17 |
esac |
18 |
} |
19 |
|
20 |
Note: this is for use with baselayout-1.11.x. |
21 |
|
22 |
Sincerely, |
23 |
Brix |
24 |
-- |
25 |
Henrik Brix Andersen <brix@g.o> |
26 |
Gentoo Linux |