summaryrefslogtreecommitdiff
blob: b8d832494e957be7b263789f0de30fb3defd2730 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

main() {
	local mymounts=$(awk '($2 == "devfs") { print "yes"; exit 0 }' /proc/filesystems)
	
	# Is devfs support compiled in?
	if [[ ${mymounts} == "yes" ]] ; then
		if [[ ${devfs_automounted} == "no" ]] ; then
			ebegin "Mounting devfs at /dev"
			try mount -n -t devfs devfs /dev
			eend $?
		else
			ebegin "Kernel automatically mounted devfs at /dev"
			eend 0
		fi
		ebegin "Starting devfsd"
		/sbin/devfsd /dev >/dev/null
		eend $? "Could not start /sbin/devfsd"
	else
		devfs="no"
	fi
}

main


# vim:ts=4