From: | "Matthias Schwarzott (zzam)" <zzam@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-fs/udev/files: udev-postmount-130-r2.initd udev.initd |
Date: | Tue, 28 Oct 2008 21:59:11 |
Message-Id: | E1Kuwaf-0006Gv-IX@stork.gentoo.org |
1 | zzam 08/10/28 21:59:05 |
2 | |
3 | Added: udev-postmount-130-r2.initd udev.initd |
4 | Log: |
5 | Add udev init-script for new, not yet in tree, openrc-versions (>0.3.0), Bug #240984. |
6 | (Portage version: 2.2_rc12/cvs/Linux 2.6.27-gentoo i686) |
7 | |
8 | Revision Changes Path |
9 | 1.1 sys-fs/udev/files/udev-postmount-130-r2.initd |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-postmount-130-r2.initd?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-postmount-130-r2.initd?rev=1.1&content-type=text/plain |
13 | |
14 | Index: udev-postmount-130-r2.initd |
15 | =================================================================== |
16 | #!/sbin/runscript |
17 | # Copyright 1999-2007 Gentoo Foundation |
18 | # Distributed under the terms of the GNU General Public License v2 |
19 | # $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/udev-postmount-130-r2.initd,v 1.1 2008/10/28 21:59:05 zzam Exp $ |
20 | |
21 | depend() { |
22 | need localmount |
23 | } |
24 | |
25 | start() { |
26 | # check if this system uses udev |
27 | [ -d /dev/.udev/ ] || return 0 |
28 | |
29 | einfo "udev postmount cleanup" |
30 | |
31 | # store persistent-rules that got created while booting |
32 | # when / was still read-only |
33 | /lib/udev/move_tmp_persistent_rules.sh |
34 | } |
35 | |
36 | stop() { |
37 | : |
38 | } |
39 | |
40 | # vim:ts=4 |
41 | |
42 | |
43 | |
44 | 1.1 sys-fs/udev/files/udev.initd |
45 | |
46 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev.initd?rev=1.1&view=markup |
47 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev.initd?rev=1.1&content-type=text/plain |
48 | |
49 | Index: udev.initd |
50 | =================================================================== |
51 | #!/sbin/runscript |
52 | # Copyright 1999-2008 Gentoo Foundation |
53 | # Distributed under the terms of the GNU General Public License v2 |
54 | |
55 | depend() |
56 | { |
57 | if [ -e /lib/librc.so -a -f /etc/init.d/sysfs ]; then |
58 | # on baselayout-1 this causes |
59 | # dependency-cycles with checkroot (before *) |
60 | # require new enough openrc with sysinit being extra runlevel |
61 | provide dev |
62 | need sysfs |
63 | before checkfs fsck |
64 | fi |
65 | } |
66 | |
67 | start() |
68 | { |
69 | if [ ! -e /lib/librc.so ]; then |
70 | eerror "The $SVCNAME init-script is written for baselayout-2!" |
71 | eerror "Please do not use it with baselayout-1!". |
72 | return 1 |
73 | fi |
74 | |
75 | start_addon udev || return 1 |
76 | local svcfile= svc= services= |
77 | for svcfile in "${RC_SVCDIR}"/hotplugged/*; do |
78 | svc="${svcfile##*/}" |
79 | [ -x "${svcfile}" ] || continue |
80 | |
81 | # for debug |
82 | #[ "$svc" = "udev-postmount" ] && einfo "Injected udev-postmount service" |
83 | |
84 | # do not show this |
85 | [ "$svc" = "udev-postmount" ] && continue |
86 | |
87 | services="${services} ${svc}" |
88 | done |
89 | [ -n "${services}" ] && einfo "Device initiated services:${HILITE}${services}${NORMAL}" |
90 | return 0 |
91 | } |
92 | |
93 | stop() |
94 | { |
95 | # this stop-part does not not yet exist |
96 | stop_addon udev |
97 | } |