View | Details | Raw Unified
Collapse All | Expand All

(-) /sbin/rc (-13 / +12 lines)
 Lines 184-191    Link Here 
	fi
	fi
	
	
	# Fix weird bug where there is a /dev/.devfsd in a unmounted /dev
	# Fix weird bug where there is a /dev/.devfsd in a unmounted /dev
	mymounts="$(awk '($3 == "devfs") { print "yes"; exit 0 }' /proc/mounts)"
	mymounts=$(< /proc/mounts)
	if [ -e "/dev/.devfsd" -a "${mymounts}" != "yes" ]
	if [ "${mymounts/devfs}" = "${mymounts}" ] && [ -e "/dev/.devfsd" ]
	then
	then
		rm -f /dev/.devfsd
		rm -f /dev/.devfsd
	fi
	fi
 Lines 218-226    Link Here 
	# With the new way, /dev can be mounted by the kernel ...
	# With the new way, /dev can be mounted by the kernel ...
	elif [ "${devfs}" = "yes" -a ! -e "/dev/.devfsd" ]
	elif [ "${devfs}" = "yes" -a ! -e "/dev/.devfsd" ]
	then
	then
		mymounts="$(awk '($2 == "devfs") { print "yes"; exit 0 }' /proc/filesystems)"
		mymounts=$(< /proc/filesystems)
		# Is devfs support compiled in?
		# Is devfs support compiled in?
		if [ "${mymounts}" = "yes" ]
		if [ "${mymounts/devfs}" != "${mymounts}" ]
		then
		then
			ebegin "Mounting devfs at /dev"
			ebegin "Mounting devfs at /dev"
			try mount -n -t devfs none /dev
			try mount -n -t devfs none /dev
 Lines 245-258    Link Here 
	# From linux-2.5.68 we need to mount /dev/pts again ...
	# From linux-2.5.68 we need to mount /dev/pts again ...
	if [ "$(get_KV)" -ge "$(KV_to_int '2.5.68')" ]
	if [ "$(get_KV)" -ge "$(KV_to_int '2.5.68')" ]
	then
	then
		have_devpts="$(awk '($2 == "devpts") { print "yes"; exit 0 }' /proc/filesystems)"
		have_devpts=$(< /proc/filesystems)
		mymounts="$(awk '($3 == "devfs") { print "yes"; exit 0 }' /proc/mounts)"
		mymounts=$(< /proc/mounts)
		if [ "${have_devpts}" = "yes" ]
		if [ "${have_devpts/devpts}" != "${have_devpts}" ]
		then
		then
			# Only try to create /dev/pts if we have /dev mounted as devfs,
			# Only try to create /dev/pts if we have /dev mounted as devfs,
			# else it might fail as / might be still mounted readonly.
			# else it might fail as / might be still mounted readonly.
			if [ ! -d /dev/pts -a -e "/dev/.devfsd" -a "${mymounts}" = "yes" ]
			if [ ! -d "/dev/pts" ] && [ -e "/dev/.devfsd" ] && [ "${mymounts/devfs}" != "${mymounts}" ]
			then
			then
				# Make sure we have /dev/pts
				# Make sure we have /dev/pts
				mkdir -p /dev/pts &>/dev/null || \
				mkdir -p /dev/pts &>/dev/null || \
 Lines 270-278    Link Here 
	fi
	fi
	# Need devfsd running now so that /dev/ram0 exists if we need it
	# Need devfsd running now so that /dev/ram0 exists if we need it
	mymounts="$(awk '($3 == "devfs") { print "yes"; exit 0 }' /proc/mounts)"
	mymounts=$(< /proc/mounts)
	if [ "${devfs}" = "yes" -a -e "/dev/.devfsd" -a \
	if [ "${devfs}" = "yes" ] && [ -e "/dev/.devfsd" ] && [ "${mymounts/devfs}" != "${mymounts}" ]
	     "${mymounts}" = "yes" ]
	then
	then
		if [ "${RC_DEVFSD_STARTUP}" != "no" ]
		if [ "${RC_DEVFSD_STARTUP}" != "no" ]
		then
		then
 Lines 761-768    Link Here 
# We want devfsd running after a change of runlevel (this is mostly if we return
# We want devfsd running after a change of runlevel (this is mostly if we return
# from runlevel 'single')
# from runlevel 'single')
if [ -z "`ps --no-heading -C 'devfsd'`" -a \
mymounts=$(< /proc/mounts)
     -n "`gawk '/\/dev devfs/ { print }' /proc/mounts 2> /dev/null`" ]
if [ -z "`ps --no-heading -C 'devfsd'`" ] && [ "${mymounts/\/dev devfs}" != "${mymounts}" ]
then
then
	if [ "${RC_DEVFSD_STARTUP}" != "no" ]
	if [ "${RC_DEVFSD_STARTUP}" != "no" ]
	then
	then