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

[ -e /etc/conf.d/udev ] && . /etc/conf.d/udev

. /lib/udev/shell-compat.sh

compat_volume_nodes()
{
	# Only do this for baselayout-1*
	if [ ! -e /lib/librc.so ]; then

		# Create nodes that udev can't
		[ -x /sbin/lvm ] && \
			/sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null
		# Running evms_activate on a LiveCD causes lots of headaches
		[ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \
			/sbin/evms_activate -q &>/dev/null
	fi
}

start_initd()
{
	(
		. /etc/init.d/"$1"
		_start
	)
}

# mount tmpfs on /dev
start_initd udev-mount || exit 1

# load device tarball
start_initd udev-dev-tarball

# run udevd
start_initd udev || exit 1

compat_volume_nodes

# inject into boot runlevel
IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>&1

# udev started successfully
exit 0