PageRenderTime 92ms CodeModel.GetById 90ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/init/udev-finish.conf

http://github.com/brinkman83/bashrc
Config | 30 lines | 26 code | 4 blank | 0 comment | 0 complexity | 28ebb3ad2d2c6ca545d72f3f0769f448 MD5 | raw file
 1# udev-finish - save udev log and update rules
 2#
 3# While udev runs we not only create the log file of initial device
 4# creation but udev rules may be generated, we need to copy both of
 5# these out of /dev and onto the root filesystem.
 6
 7description	"save udev log and update rules"
 8
 9start on (startup
10	  and filesystem
11	  and started udev
12	  and stopped udevtrigger
13	  and stopped udevmonitor)
14
15task
16script
17    # Save udev log in /var/log/udev
18    if [ -e /dev/.udev.log ]
19    then
20	mv -f /dev/.udev.log /var/log/udev || :
21    fi
22
23    # Copy any rules generated while the root filesystem was read-only
24    for file in /dev/.udev/tmp-rules--*
25    do
26	[ -e "$file" ] || continue
27	cat "$file" >> "/etc/udev/rules.d/${file##*tmp-rules--}"
28	rm -f "$file"
29    done
30end script