Gentoo Archives: gentoo-commits

From: "Matthias Schwarzott (zzam)" <zzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/udev/files/136: udev.confd udev.initd
Date: Thu, 22 Jan 2009 11:41:40
Message-Id: E1LPxwH-0002l3-8k@stork.gentoo.org
1 zzam 09/01/22 11:41:37
2
3 Modified: udev.confd udev.initd
4 Log:
5 Add expert options to change udevsettle timeout and to run udevmonitor at boot time to catch all events.
6 (Portage version: 2.1.6.6/cvs/Linux 2.6.27-gentoo-r1 i686)
7
8 Revision Changes Path
9 1.2 sys-fs/udev/files/136/udev.confd
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/136/udev.confd?rev=1.2&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/136/udev.confd?rev=1.2&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/136/udev.confd?r1=1.1&r2=1.2
14
15 Index: udev.confd
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/files/136/udev.confd,v
18 retrieving revision 1.1
19 retrieving revision 1.2
20 diff -u -r1.1 -r1.2
21 --- udev.confd 20 Jan 2009 13:00:01 -0000 1.1
22 +++ udev.confd 22 Jan 2009 11:41:37 -0000 1.2
23 @@ -25,3 +25,24 @@
24 # in /etc/rc.conf: rc_hotplug="!*" or
25 # in /etc/conf.d/rc: rc_plug_services="!*"
26 #rc_coldplug="YES"
27 +
28 +
29 +
30 +
31 +# Expert options:
32 +
33 +# Timeout in seconds to wait for processing of uevents at boot.
34 +# There should be no need to change this.
35 +#udev_settle_timeout="60"
36 +
37 +# Run udevadmin monitor to get a log of all events
38 +# in /dev/.udev/udevmonitor.log
39 +#udev_monitor="YES"
40 +
41 +# Keep udevmonitor running after populating /dev.
42 +#udev_monitor_keep_running="no"
43 +
44 +# Set cmdline options for udevmonitor.
45 +# could be some of --env --kernel --udev
46 +#udev_monitor_opts="--env"
47 +
48
49
50
51 1.2 sys-fs/udev/files/136/udev.initd
52
53 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/136/udev.initd?rev=1.2&view=markup
54 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/136/udev.initd?rev=1.2&content-type=text/plain
55 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/136/udev.initd?r1=1.1&r2=1.2
56
57 Index: udev.initd
58 ===================================================================
59 RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/files/136/udev.initd,v
60 retrieving revision 1.1
61 retrieving revision 1.2
62 diff -u -r1.1 -r1.2
63 --- udev.initd 20 Jan 2009 13:00:01 -0000 1.1
64 +++ udev.initd 22 Jan 2009 11:41:37 -0000 1.2
65 @@ -90,13 +90,39 @@
66 eend $?
67
68 ebegin "Waiting for uevents to be processed"
69 - udevadm settle --timeout=60
70 + udevadm settle --timeout=${udev_settle_timeout:-60}
71 eend $?
72
73 udevadm control --env do_not_run_plug_service=
74 return 0
75 }
76
77 +# for debugging
78 +start_udevmonitor()
79 +{
80 + yesno "${udev_monitor:-no}" || return 0
81 +
82 + udevmonitor_log=/dev/.udev/udevmonitor.log
83 + udevmonitor_pid=/dev/.udev/udevmonitor.pid
84 +
85 + einfo "udev: Running udevadm monitor ${udev_monitor_opts} to get a log of all events"
86 + start-stop-daemon --start --stdout "${udevmonitor_log}" \
87 + --make-pidfile --pidfile "${udevmonitor_pid}" \
88 + --background --exec /sbin/udevadm -- monitor ${udev_monitor_opts}
89 +}
90 +
91 +stop_udevmonitor()
92 +{
93 + yesno "${udev_monitor:-no}" || return 0
94 +
95 + if yesno "${udev_monitor_keep_running:-no}"; then
96 + ewarn "udev: udevmonitor is still running and writing into ${udevmonitor_log}"
97 + else
98 + einfo "udev: Stopping udevmonitor: Log is in ${udevmonitor_log}"
99 + start-stop-daemon --stop --pidfile "${udevmonitor_pid}" --exec /sbin/udevadm
100 + fi
101 +}
102 +
103 display_hotplugged_services() {
104 local svcfile= svc= services=
105 for svcfile in "${RC_SVCDIR}"/hotplugged/*; do
106 @@ -191,11 +217,13 @@
107
108 disable_hotplug_agent
109 start_udevd || cleanup
110 + start_udevmonitor
111 populate_dev || cleanup
112
113 check_persistent_net
114
115 check_udev_works || cleanup
116 + stop_udevmonitor
117
118 return 0
119 }