summaryrefslogtreecommitdiff
blob: 20c0cf41c7424cf2dfdf3621fe452f7a5bf6d932 (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
--- ../tags/baselayout-1.12.5/ChangeLog	2006-09-14 11:11:35 +0100
+++ ChangeLog	2006-09-26 16:17:55 +0100
@@ -1,6 +1,21 @@
 # ChangeLog for Gentoo System Intialization ("rc") scripts
 # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPLv2
 
+  26 Sep 2006; Roy Marples <uberlord@gentoo.org>:
+
+    Don't wait for scheduled services to restart when a service is
+    started in the background as this may tie up the calling daemon, #148700.
+
+    Give ppp at least 30 seconds to die, #147490, thanks to Alin Nastac.
+
+  25 Sep 2006; Roy Marples <uberlord@gentoo.org>:
+
+    Don't rename bridged or bonded interfaces either, #145581.
+
+  19 Sep 2006; Roy Marples <uberlord@gentoo.org>:
+
+    Start scheduled services in the correct order, #148011.
+
   06 Sep 2006; Roy Marples <uberlord@gentoo.org>:
 
     Fix PPPoA usage, #144194 thanks to Giampaolo Tomassoni.
--- ../tags/baselayout-1.12.5/etc/conf.d/rc	2006-09-14 11:11:34 +0100
+++ etc/conf.d/rc	2006-09-24 11:04:58 +0100
@@ -88,7 +88,7 @@
 RC_BOOTLOG="no"
 
 # Set to "yes" if you want to benchmark system boot with bootchart.
-# You'll need to emerge the app-benchmark/bootchart package for this to work.
+# You'll need to emerge the app-benchmarks/bootchart package for this to work.
 
 RC_BOOTCHART="no"
 
@@ -143,7 +143,7 @@
 # RC_DMESG_LEVEL sets the level at which logging of messages is done to the
 # console.  See dmesg(8) for more info.
 
-RC_DMESG_LOGLEVEL="1"
+RC_DMESG_LEVEL="1"
 
 
 
--- ../tags/baselayout-1.12.5/lib/rcscripts/net/iwconfig.sh	2006-09-14 11:11:34 +0100
+++ lib/rcscripts/net/iwconfig.sh	2006-09-27 13:34:20 +0100
@@ -452,7 +452,7 @@
 
 	# Sleep if required
 	x="sleep_scan_${ifvar}"
-	[[ -z ${!x} || ${!x} -gt 0 ]] && sleep "${!x:-1}"
+	[[ -z ${!x} || ${!x} -gt 0 ]] && sleep "${!x:-2}"
 
 	local error=true i=-1 line=
 	local -a mac=() essid=() enc=() qual=() mode=() freq=() chan=()
--- ../tags/baselayout-1.12.5/lib/rcscripts/net/pppd.sh	2006-09-14 11:11:35 +0100
+++ lib/rcscripts/net/pppd.sh	2006-09-26 16:15:15 +0100
@@ -227,8 +227,10 @@
 
 	[[ ! -s ${pidfile} ]] && return 0
 
+	# Give pppd at least 30 seconds do die, #147490
 	einfo "Stopping pppd on ${iface}"
-	start-stop-daemon --stop --exec /usr/sbin/pppd --pidfile "${pidfile}"
+	start-stop-daemon --stop --exec /usr/sbin/pppd 
+		--pidfile "${pidfile}" --retry 30
 	eend $?
 }
 
--- ../tags/baselayout-1.12.5/lib/rcscripts/net/rename.sh	2006-09-14 11:11:34 +0100
+++ lib/rcscripts/net/rename.sh	2006-09-25 15:52:17 +0100
@@ -28,15 +28,15 @@
 	newname="rename_${ifvar}"
 	[[ -z ${!newname} || ${iface} == "${!newname}" ]] && return 0
 
-	# We cannot rename vlan interfaces as /proc/net/vlan/config always
-	# returns the old interface name. We don't bail out though as it's
-	# not critical that the interface gets renamed.
-	if [[ -d /proc/net/vlan/config ]] ; then
-		if grep -q "^${iface} " /proc/net/vlan/config ; then
-			eerror "Cannot rename VLAN interfaces"
-			return 0
+	# We don't work on bonded, bridges, tun/tap or vlan
+	for f in bonding bridge tuntap vlan ; do
+		if is_function "${f}_exists" ; then
+			if ${f}_exists "${iface}" ; then
+				veinfo "Cannot rename a ${f} interface"
+				return 0
+			fi
 		fi
-	fi
+	done
 
 	ebegin "Renaming \"${iface}\" to \"${!newname}\""
 
--- ../tags/baselayout-1.12.5/sbin/rc	2006-09-14 11:11:34 +0100
+++ sbin/rc	2006-09-24 11:04:58 +0100
@@ -288,9 +288,9 @@
 		esac
 
 		# Check udev prerequisites and kernel params
-		if [ "${udev}" = "yes" ] && has_addon udev
+		if [ "${udev}" = "yes" ]
 		then
-			if get_bootparam "noudev" || \
+			if get_bootparam "noudev" || ! has_addon udev-start.sh || \
 			   [ ${devfs_automounted} = "yes" ] || \
 			   [ "$(get_KV)" -lt "$(KV_to_int '2.6.0')" ]
 			then
@@ -299,9 +299,10 @@
 		fi
 
 		# Check devfs prerequisites and kernel params
-		if [ "${devfs}" = "yes" ] && has_addon devfs
+		if [ "${devfs}" = "yes" ]
 		then
-			if get_bootparam "nodevfs" || [ "${udev}" = "yes" ]
+			if get_bootparam "nodevfs" || [ "${udev}" = "yes" ] || \
+			   ! has_addon devfs-start.sh
 			then
 				devfs="no"
 			fi
--- ../tags/baselayout-1.12.5/sbin/runscript.sh	2006-09-14 11:11:34 +0100
+++ sbin/runscript.sh	2006-09-26 19:57:44 +0100
@@ -154,11 +154,20 @@
 	[[ ! -d "${svcdir}/scheduled/${SVCNAME}" ]] && return
 	local x= services=
 
+	# If we're being started in the background, then don't
+	# tie up the daemon that called us starting our scheduled services
+	if [[ ${IN_BACKGROUND} == "true" || ${IN_BACKGROUND} == "1" ]] ; then
+		unset IN_BACKGROUND
+		svc_start_scheduled &
+		export IN_BACKGROUND=true
+		return
+	fi
+
 	for x in $(dolisting "${svcdir}/scheduled/${SVCNAME}/") ; do
 		services="${services} ${x##*/}"
 	done
 		
-	for x in ${services} ; do
+	for x in $(trace_dependencies ${services}) ; do
 		service_stopped "${x}" && start_service "${x}"
 		rm -f "${svcdir}/scheduled/${SVCNAME}/${x}"
 	done
@@ -668,7 +677,10 @@
 		service_started "${SVCNAME}" && svc_start_scheduled
 
 		# Wait for services to come up
-		[[ ${RC_PARALLEL_STARTUP} == "yes" ]] && wait
+		if [[ ${IN_BACKGROUND} != "true" \
+		&& ${IN_BACKGROUND} != "1" ]] ; then
+			[[ ${RC_PARALLEL_STARTUP} == "yes" ]] && wait
+		fi
 
 		svcrestart="no"
 		;;