blob: c38592517934886abedc4b59fcf996d166abaf17 (
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
46
47
|
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend()
{
if [ -e /lib/librc.so -a -f /etc/init.d/sysfs ]; then
# on baselayout-1 this causes
# dependency-cycles with checkroot (before *)
# require new enough openrc with sysinit being extra runlevel
provide dev
need sysfs
before checkfs fsck
fi
}
start()
{
if [ ! -e /lib/librc.so ]; then
eerror "The $SVCNAME init-script is written for baselayout-2!"
eerror "Please do not use it with baselayout-1!".
return 1
fi
start_addon udev || return 1
local svcfile= svc= services=
for svcfile in "${RC_SVCDIR}"/hotplugged/*; do
svc="${svcfile##*/}"
[ -x "${svcfile}" ] || continue
# for debug
#[ "$svc" = "udev-postmount" ] && einfo "Injected udev-postmount service"
# do not show this
[ "$svc" = "udev-postmount" ] && continue
services="${services} ${svc}"
done
[ -n "${services}" ] && einfo "Device initiated services:${HILITE}${services}${NORMAL}"
return 0
}
stop()
{
# this stop-part does not not yet exist
stop_addon udev
}
|