summaryrefslogtreecommitdiff
blob: 0066d3e8752fdd6b8c5a52358c7b7f860efe1b7c (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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
Index: bin/rc-status
===================================================================
--- bin/rc-status	(revision 1628)
+++ bin/rc-status	(working copy)
@@ -206,6 +206,7 @@
 	boot_crit="checkroot hostname modules checkfs localmount clock"
 fi
 
+broken=""
 for level in ${runlevelidxs} ; do
 	echo "Runlevel: ${HILITE}${level}${NORMAL}"
 	for service in ${runlevels[${arridx}]} ; do
@@ -214,6 +215,7 @@
 			]] && [[ ${level} != "${BOOTLEVEL}" \
 			|| " ${boot_crit} " != *" ${service} "* ]]; then
 			print_msg "${service}" "${BAD}" 'broken  '
+			broken="${broken} ${service}"
 		elif [[ -n ${inactive} && $(in_list "${inactive}" "${service}") -eq 1 ]] ; then
 			print_msg "${service}" "${WARN}" 'inactive'
 		elif [[ $(in_list "${started}" "${service}") -eq 1 ]] ; then
@@ -229,3 +231,9 @@
 	let "arridx += 1"
 	[ -n "${UNUSED}" ] && exit 0
 done
+
+if [[ -n ${broken} ]]; then
+    eerror "You have some broken symbolic links as reported by the broken"
+    eerror "status above. This can be fixed by removing the broken service"
+    eerror "from its runlevel and re-adding it back using rc-update."
+fi
Index: lib/rcscripts/net.modules.d/pump
===================================================================
--- lib/rcscripts/net.modules.d/pump	(revision 1628)
+++ lib/rcscripts/net.modules.d/pump	(working copy)
@@ -82,7 +82,7 @@
 	[[ ! -d "${statedir}/${iface}" ]] && mkdir -m 0755 -p "${statedir}/${iface}"
 
 	opts="${opts} --win-client-ident --etc-dir=${statedir}/${iface}"
-	opts="${opts} --script /lib/rcscripts/net.modules.d/helpers.d/pump-wrapper"
+	opts="${opts} --script \"${svclib}/net.modules.d/helpers.d/pump-wrapper\""
 	opts="${opts} --keep-up --interface ${iface}"
 
 	# Bring up DHCP for this interface (or alias)
Index: lib/rcscripts/net.modules.d/dhcpcd
===================================================================
--- lib/rcscripts/net.modules.d/dhcpcd	(revision 1628)
+++ lib/rcscripts/net.modules.d/dhcpcd	(working copy)
@@ -111,7 +111,7 @@
 	[[ -n ${!metric} && ${!metric} != "0" ]] && opts="${opts} -m ${!metric}"
 
 	# Instruct dhcpcd to use our wrapper 
-	opts="${opts} -c \"/lib/rcscripts/net.modules.d/helpers.d/dhcpcd-wrapper\""
+	opts="${opts} -c \"${svclib}/net.modules.d/helpers.d/dhcpcd-wrapper\""
 
 	# Instruct dhcpcd to create it's files in our state dir
 	opts="${opts} -e \"${statedir}/${iface}\""
Index: lib/rcscripts/net.modules.d/iwconfig
===================================================================
--- lib/rcscripts/net.modules.d/iwconfig	(revision 1628)
+++ lib/rcscripts/net.modules.d/iwconfig	(working copy)
@@ -130,7 +130,7 @@
 	local mode=$( iwconfig_get_mode "${iface}" )
 	if [[ ${mode} == "master" ]]; then
 		m="as"
-	else
+	elif [[ ${mode} != "ad-hoc" ]]; then
 		mac=$( iwconfig_get_ap_mac_address "${iface}" )
 		[[ -n ${mac} ]] && mac=" at ${mac}"
 	fi
@@ -752,7 +752,7 @@
 
 	# Setup ad-hoc mode?
 	x="mode_${ifvar}"
-	x=$( echo "${!mode:-managed}" | tr '[:upper:]' '[:lower:]' )
+	x=$( echo "${!x:-managed}" | tr '[:upper:]' '[:lower:]' )
 	if [[ ${x} == "ad-hoc" || ${x} == "master" ]]; then
 		iwconfig_setup_specific "${iface}" "${x}"
 		return $?
Index: lib/rcscripts/net.modules.d/iproute2
===================================================================
--- lib/rcscripts/net.modules.d/iproute2	(revision 1628)
+++ lib/rcscripts/net.modules.d/iproute2	(working copy)
@@ -72,7 +72,7 @@
 iproute2_is_up() {
 	local check="\<UP\>" addr="${2:-false}"
 	${addr} && check="${check}.*inet "
-	ip addr show "$1" | grep -Eq "${check}" && return 0
+	ip addr show "$1" | xargs | grep -Eq "${check}" && return 0
 	return 1
 }
 
Index: lib/rcscripts/net.modules.d/helpers.d/pump-wrapper
===================================================================
--- lib/rcscripts/net.modules.d/helpers.d/pump-wrapper	(revision 1628)
+++ lib/rcscripts/net.modules.d/helpers.d/pump-wrapper	(working copy)
@@ -9,8 +9,10 @@
 action="$1"
 interface="$2"
 
+. /sbin/functions.sh
+
 if [[ ${action} == "up" ]]; then
-	. /lib/rcscripts/net.modules.d/helpers.d/module-loader
+	. "${svclib}/net.modules.d/helpers.d/module-loader"
 
 	# Map MAC address variables to interface variables
 	macnet_pre_start "${interface}" 1>/dev/null
@@ -25,6 +27,6 @@
 	system_dns_extra "${interface}" "${statedir}/${interface}/resolv.conf" 
 fi
 
-. /lib/rcscripts/net.modules.d/helpers.d/dhcp-state
+. "${svclib}/net.modules.d/helpers.d/dhcp-state"
 
 # vim:ts=4
Index: lib/rcscripts/net.modules.d/helpers.d/pppd-wrapper
===================================================================
--- lib/rcscripts/net.modules.d/helpers.d/pppd-wrapper	(revision 1628)
+++ lib/rcscripts/net.modules.d/helpers.d/pppd-wrapper	(working copy)
@@ -7,7 +7,8 @@
 action="$1"
 interface="$2"
 export IN_BACKGROUND="true"
-. /lib/rcscripts/net.modules.d/helpers.d/module-loader
+. /sbin/functions.sh
+. "${svclib}/net.modules.d/helpers.d/module-loader"
 resolv="${statedir}/${interface}/resolv.conf"
 
 if [[ ${action} == "up" ]]; then
Index: lib/rcscripts/net.modules.d/helpers.d/dhcpcd-wrapper
===================================================================
--- lib/rcscripts/net.modules.d/helpers.d/dhcpcd-wrapper	(revision 1628)
+++ lib/rcscripts/net.modules.d/helpers.d/dhcpcd-wrapper	(working copy)
@@ -13,7 +13,8 @@
 	action="up"
 fi
 
-. /lib/rcscripts/net.modules.d/helpers.d/module-loader
+. /sbin/functions.sh
+. "${svclib}/net.modules.d/helpers.d/module-loader"
 
 # Map MAC address variables to interface variables
 macnet_pre_start "${interface}" 1>/dev/null
@@ -55,6 +56,6 @@
 fi
 [[ -x ${exe} ]] && ( ${exe} "$@" 1>/dev/null )
 
-. /lib/rcscripts/net.modules.d/helpers.d/dhcp-state
+. "${svclib}/net.modules.d/helpers.d/dhcp-state"
 
 # vim:ts=4
Index: lib/rcscripts/net.modules.d/helpers.d/udhcpc-wrapper
===================================================================
--- lib/rcscripts/net.modules.d/helpers.d/udhcpc-wrapper	(revision 1628)
+++ lib/rcscripts/net.modules.d/helpers.d/udhcpc-wrapper	(working copy)
@@ -15,6 +15,7 @@
 export nis_domain_${interface}="${nisdomain}"
 export nis_servers_${interface}="${nissrv}"
 
-/lib/rcscripts/net.modules.d/helpers.d/dhcp "$@"
+. /sbin/functions.sh
+"${svclib}/net.modules.d/helpers.d/dhcp" "$@"
 
 # vim:ts=4
Index: lib/rcscripts/net.modules.d/helpers.d/dhclient-wrapper
===================================================================
--- lib/rcscripts/net.modules.d/helpers.d/dhclient-wrapper	(revision 1628)
+++ lib/rcscripts/net.modules.d/helpers.d/dhclient-wrapper	(working copy)
@@ -34,7 +34,8 @@
 export nis_domain_${interface}="${new_nis_domain}"
 export nis_servers_${interface}="${new_nis_servers}"
 
-/lib/rcscripts/net.modules.d/helpers.d/dhcp "${action}"
+. /sbin/functions.sh
+"${svclib}/net.modules.d/helpers.d/dhcp" "${action}"
 result="$?"
 
 [[ -e /etc/dhcp/dhclient-exit-hooks ]] \
Index: lib/rcscripts/net.modules.d/helpers.d/module-loader
===================================================================
--- lib/rcscripts/net.modules.d/helpers.d/module-loader	(revision 1628)
+++ lib/rcscripts/net.modules.d/helpers.d/module-loader	(working copy)
@@ -4,10 +4,12 @@
 
 # Contributed by Roy Marples (uberlord@gentoo.org)
 
-[[ -z ${MODULES_DIR} ]] && MODULES_DIR="/lib/rcscripts/net.modules.d"
+. "${svclib}/sh/rc-services.sh"
+
+MODULES_DIR="${svclib}/net.modules.d"
 . "${MODULES_DIR}/system"
-. /lib/rcscripts/sh/rc-services.sh
 . "${MODULES_DIR}/helpers.d/functions"
+
 conf=$(add_suffix "/etc/conf.d/net")
 [[ -e ${conf} ]] && source "${conf}"
 
Index: lib/rcscripts/net.modules.d/helpers.d/dhcp-state
===================================================================
--- lib/rcscripts/net.modules.d/helpers.d/dhcp-state	(revision 1628)
+++ lib/rcscripts/net.modules.d/helpers.d/dhcp-state	(working copy)
@@ -4,9 +4,8 @@
 
 # Contributed by Roy Marples (uberlord@gentoo.org)
 
-MODULES_DIR="/lib/rcscripts/net.modules.d"
-. /lib/rcscripts/sh/rc-services.sh
-. "${MODULES_DIR}/helpers.d/functions"
+. "${svclib}/sh/rc-services.sh"
+. "${svclib}/net.modules.d/helpers.d/functions"
 conf=$(add_suffix "/etc/conf.d/net")
 [[ -e ${conf} ]] && source "${conf}"
 
Index: lib/rcscripts/net.modules.d/helpers.d/dhcp
===================================================================
--- lib/rcscripts/net.modules.d/helpers.d/dhcp	(revision 1628)
+++ lib/rcscripts/net.modules.d/helpers.d/dhcp	(working copy)
@@ -7,7 +7,8 @@
 action="$1"
 service="net.${interface}"
 
-. /lib/rcscripts/net.modules.d/helpers.d/module-loader
+. /sbin/functions.sh
+. "${svclib}/net.modules.d/helpers.d/module-loader"
 
 # Bring the interface up
 interface_is_up "${interface}" || interface_up "${interface}"
Index: init.d/net.lo
===================================================================
--- init.d/net.lo	(revision 1628)
+++ init.d/net.lo	(working copy)
@@ -23,7 +23,7 @@
 }
 
 # Define where our modules are
-MODULES_DIR="/lib/rcscripts/net.modules.d"
+MODULES_DIR="${svclib}/net.modules.d"
 
 # Some defaults
 background="${background:-no}"
Index: sbin/functions.sh
===================================================================
--- sbin/functions.sh	(revision 1628)
+++ sbin/functions.sh	(working copy)
@@ -40,7 +40,6 @@
 RC_TTY_NUMBER=${RC_TTY_NUMBER:-11}
 RC_PARALLEL_STARTUP=${RC_PARALLEL_STARTUP:-no}
 RC_NET_STRICT_CHECKING=${RC_NET_STRICT_CHECKING:-no}
-RC_VOLUME_ORDER=${RC_VOLUME_ORDER:-raid evms lvm dm}
 RC_USE_FSTAB=${RC_USE_FSTAB:-no}
 RC_USE_CONFIG_PROFILE=${RC_USE_CONFIG_PROFILE:-yes}
 RC_FORCE_AUTO=${RC_FORCE_AUTO:-no}