Subversion Repositories svn LFS-FR

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1401 jmengual 1
#!/bin/sh
2
########################################################################
3
# Begin $rc_base/init.d/udev_retry
4
#
5
# Description : Udev cold-plugging script (retry)
6
#
7
# Authors     : Alexander E. Patrakov
8
#
9
# Version     : 00.02
10
#
11
# Notes       :
12
#
13
########################################################################
14
 
15
. /etc/sysconfig/rc
16
. ${rc_functions}
17
 
18
case "${1}" in
19
	start)
20
		boot_mesg "Retrying failed uevents, if any..."
21
 
22
		# From Debian: "copy the rules generated before / was mounted
23
		# read-write":
24
		for file in /dev/.udev/tmp-rules--*; do
25
			dest=${file##*tmp-rules--}
26
			[ "$dest" = '*' ] && break
27
			cat $file >> /etc/udev/rules.d/$dest
28
			rm -f $file
29
		done
30
 
31
		# Re-trigger the failed uevents in hope they will succeed now
32
		/sbin/udevadm trigger --type=failed --action=add
33
 
34
		# Now wait for udevd to process the uevents we triggered
35
		/sbin/udevadm settle
36
		evaluate_retval
37
		;;
38
 
39
	*)
40
		echo "Usage ${0} {start}"
41
		exit 1
42
		;;
43
esac
44
 
45
# End $rc_base/init.d/udev_retry