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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
--- /home/benni/gentoo_ev/baselayout/etc/init.d.old/net.eth0 2003-09-08 02:11:54.000000000 +0200
+++ /home/benni/gentoo_ev/baselayout/etc/init.d.new/net.eth0 2003-12-22 01:32:54.000000000 +0100
@@ -2,6 +2,8 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo/users/beejay/baselayout/work/patches-init.d/net.eth0.patch,v 1.1 2003/12/31 20:35:54 beejay Exp $
+TEXTDOMAINDIR=/etc/gentoo/locale
+TEXTDOMAIN=baselayout
#NB: Config is in /etc/conf.d/net
@@ -15,12 +17,12 @@
checkconfig() {
if [ -z "${iface_IFACE}" ]
then
- eerror "Please make sure that /etc/conf.d/net has \$iface_$IFACE set"
+ eerror $"Please make sure that /etc/conf.d/net has \$iface_$IFACE set"
return 1
fi
if [ -n "${vlans}" -a \! -x /sbin/vconfig ]
then
- eerror "For VLAN (802.1q) support, emerge net-misc/vconfig"
+ eerror $"For VLAN (802.1q) support, emerge net-misc/vconfig"
return 1
fi
}
@@ -43,18 +45,18 @@
checkconfig || return 1
local IFACE="${1}"
- ebegin "Bringing ${IFACE} up"
+ ebegin $"Bringing ${IFACE} up"
if [ "${iface_IFACE}" != "dhcp" ]
then
/sbin/ifconfig ${IFACE} ${iface_IFACE} >/dev/null || {
retval=$?
- eend ${retval} "Failed to bring ${IFACE} up"
+ eend ${retval} $"Failed to bring ${IFACE} up"
return ${retval}
}
# ifconfig do not always return failure ..
/sbin/ifconfig ${IFACE} &> /dev/null || {
retval=$?
- eend ${retval} "Failed to bring ${IFACE} up"
+ eend ${retval} $"Failed to bring ${IFACE} up"
return ${retval}
}
else
@@ -63,7 +65,7 @@
then
/sbin/dhcpcd ${dhcpcd_IFACE} ${IFACE} >/dev/null || {
retval=$?
- eend ${retval} "Failed to bring ${IFACE} up"
+ eend ${retval} $"Failed to bring ${IFACE} up"
return ${retval}
}
fi
@@ -77,7 +79,7 @@
local aliasbcast=""
local aliasnmask=""
- ebegin " Adding aliases"
+ ebegin $" Adding aliases"
for x in ${alias_IFACE}
do
aliasbcast="$(eval echo \$\{broadcast_${iface}\} \| awk \'\{ print \$$((num + 1)) \}\')"
@@ -104,10 +106,10 @@
if [ -n "${inet6_IFACE}" ]
then
local x=""
- ebegin " Adding inet6 addresses"
+ ebegin $" Adding inet6 addresses"
for x in ${inet6_IFACE}
do
- ebegin " ${IFACE} inet6 add ${x}"
+ ebegin $" ${IFACE} inet6 add ${x}"
/sbin/ifconfig ${IFACE} inet6 add ${x} >/dev/null
eend 0
done
@@ -116,7 +118,7 @@
if [ -n "${gateway}" ] && [ "${gateway%/*}" = "${IFACE}" ]
then
- ebegin " Setting default gateway"
+ ebegin $" Setting default gateway"
# First delete any existing routes if it was setup by kernel ..
/sbin/route del default dev ${gateway%/*} &>/dev/null
/sbin/route add default gw ${gateway#*/} dev ${gateway%/*} \
@@ -124,7 +126,7 @@
local error=$?
ifconfig ${IFACE} down &>/dev/null
- eend ${error} "Failed to bring ${IFACE} up"
+ eend ${error} $"Failed to bring ${IFACE} up"
stop
return ${error}
}
@@ -148,7 +150,7 @@
setup_env ${1}
local IFACE="${1}"
- ebegin "Bringing ${IFACE} down"
+ ebegin $"Bringing ${IFACE} down"
# Also down the inet6 interfaces
if [ -n "${myinet6}" ]
@@ -183,7 +185,7 @@
done
if [ "${count}" -ge 9 ]
then
- eerror "Timed out trying to stop dhcpcd"
+ eerror $"Timed out trying to stop dhcpcd"
fi
else
/sbin/ifconfig ${IFACE} down >/dev/null
|