Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 336723 | Differences between
and this patch

Collapse All | Expand All

(-)branches/baselayout-1_12/sbin/rc (-14 / +10 lines)
Lines 218-229 Link Here
218
218
219
	# make sure /proc/ isn't full of crap #291916
219
	# make sure /proc/ isn't full of crap #291916
220
	do_mnt=1
220
	do_mnt=1
221
	if [[ -e /proc/uptime ]] ; then
221
	if is_mounted /proc; then
222
		if [[ $(stat / -c %d) == $(stat /proc -c %d) ]] ; then
222
		do_mnt=0
223
			ewarn "You have crap in your /proc/; please clean it; see #291916"
223
	elif ! is_clean /proc; then
224
		else
224
		ewarn "You have crap in your /proc/; please clean it; see #291916"
225
			do_mnt=0
226
		fi
227
	fi
225
	fi
228
226
229
	if [[ ${do_mnt} == 1 ]] ; then
227
	if [[ ${do_mnt} == 1 ]] ; then
Lines 236-242 Link Here
236
		try mount -n ${mntcmd:--t proc proc /proc -o noexec,nosuid,nodev}
234
		try mount -n ${mntcmd:--t proc proc /proc -o noexec,nosuid,nodev}
237
		eend $?
235
		eend $?
238
	else
236
	else
239
		einfo "Skipping mount of /proc as /proc/uptime exists"
237
		einfo "Skipping mount of /proc as /proc/mounts exists"
240
	fi
238
	fi
241
239
242
	# Start profiling init now we have /proc
240
	# Start profiling init now we have /proc
Lines 251-262 Link Here
251
		if [[ -d /sys ]] ; then
249
		if [[ -d /sys ]] ; then
252
			# make sure /sys/ isn't full of crap #291916
250
			# make sure /sys/ isn't full of crap #291916
253
			do_mnt=1
251
			do_mnt=1
254
			if [[ -e /sys/kernel ]] ; then
252
			if is_mounted /sys; then
255
				if [[ $(stat / -c %d) == $(stat /sys -c %d) ]] ; then
253
				do_mnt=0
256
					ewarn "You have crap in your /sys/; please clean it; see #291916"
254
			elif ! is_clean /sys; then
257
				else
255
				ewarn "You have crap in your /sys/; please clean it; see #291916"
258
					do_mnt=0
259
				fi
260
			fi
256
			fi
261
257
262
			if [[ ${do_mnt} == 1 ]] ; then
258
			if [[ ${do_mnt} == 1 ]] ; then
Lines 269-275 Link Here
269
				try mount -n ${mntcmd:--t sysfs sysfs /sys -o noexec,nosuid,nodev}
265
				try mount -n ${mntcmd:--t sysfs sysfs /sys -o noexec,nosuid,nodev}
270
				eend $?
266
				eend $?
271
			else
267
			else
272
				einfo "Skipping mount of /sys as /sys/kernel exists"
268
				einfo "Skipping mount of /sys as it's already mounted"
273
			fi
269
			fi
274
		else
270
		else
275
			ewarn "No /sys to mount sysfs needed in 2.6 and later kernels!"
271
			ewarn "No /sys to mount sysfs needed in 2.6 and later kernels!"

Return to bug 336723