Lines 70-79
Link Here
|
70 |
|
70 |
|
71 |
# Gentoo |
71 |
# Gentoo |
72 |
elif [ -f /etc/gentoo-release ]; then |
72 |
elif [ -f /etc/gentoo-release ]; then |
73 |
script=/etc/init.d/net.$INTERFACE |
73 |
# block interface startup in system/admin runlevels |
|
|
74 |
if [ -x /sbin/runlevel ]; then |
75 |
RLEVEL=$(/sbin/runlevel) |
76 |
case "$RLEVEL" in |
77 |
unknown|sysinit|boot|nonetwork|single|??[Ss0126]) |
78 |
mesg "Refusing to activate $INTERFACE: This appears to be a boot, system, or administrative runlevel, it's not safe." |
79 |
exit 0 |
80 |
;; |
81 |
*) |
82 |
mesg "setting $INTERFACE to activate." |
83 |
script=/etc/init.d/net.$INTERFACE |
84 |
;; |
85 |
esac |
86 |
else |
87 |
# fall back on the old way of doing things |
88 |
script=/etc/init.d/net.$INTERFACE |
89 |
fi |
90 |
|
74 |
if [ -x "$script" ]; then |
91 |
if [ -x "$script" ]; then |
75 |
debug_mesg invoke \"$script\" --quiet start |
92 |
debug_mesg invoke \"$script\" start |
76 |
exec "$script" --quiet start |
93 |
exec "$script" start |
77 |
fi |
94 |
fi |
78 |
else |
95 |
else |
79 |
mesg "how do I bring interfaces up on this distro?" |
96 |
mesg "how do I bring interfaces up on this distro?" |
Lines 96-103
Link Here
|
96 |
if [ -f /etc/gentoo-release ]; then |
113 |
if [ -f /etc/gentoo-release ]; then |
97 |
script=/etc/init.d/net.$INTERFACE |
114 |
script=/etc/init.d/net.$INTERFACE |
98 |
if [ -x "$script" ]; then |
115 |
if [ -x "$script" ]; then |
99 |
debug_mesg invoke "$script" --quiet stop |
116 |
debug_mesg invoke "$script" stop |
100 |
exec "$script" --quiet stop |
117 |
exec "$script" stop |
101 |
fi |
118 |
fi |
102 |
fi |
119 |
fi |
103 |
;; |
120 |
;; |