summaryrefslogtreecommitdiff
blob: 643d5dfd4b58472520adf652267ee106d8bdf733 (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
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/151-r4/udev-postmount.initd,v 1.1 2010/05/05 19:35:07 zzam Exp $

depend() {
	need localmount
	after dbus # for trigger failed
}

dir_writeable()
{
        mkdir "$1"/.test.$$ 2>/dev/null && rmdir "$1"/.test.$$
}

start() {
	# check if this system uses udev
	[ -d /dev/.udev/ ] || return 0

	# Run the events that failed at first udev trigger
	udevadm trigger --type=failed -v

	# only continue if rules-directory is writable
	dir_writeable /etc/udev/rules.d || return 0

	# store persistent-rules that got created while booting
	# when / was still read-only
	/lib/udev/move_tmp_persistent_rules.sh
}

stop() {
	:
}

# vim:ts=4