1 |
zzam 07/09/24 19:59:39 |
2 |
|
3 |
Added: udev-115-update-gentoo-rules-2.diff |
4 |
digest-udev-115-r6 udev.conf.115-r6 |
5 |
udev-start-115-r6.sh |
6 |
Log: |
7 |
Simplified rules a bit. Let user configure max inode nr of /dev, solving bug #193586. |
8 |
(Portage version: 2.1.3.9) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sys-fs/udev/files/udev-115-update-gentoo-rules-2.diff |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-115-update-gentoo-rules-2.diff?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-115-update-gentoo-rules-2.diff?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: udev-115-update-gentoo-rules-2.diff |
17 |
=================================================================== |
18 |
diff --git a/etc/udev/gentoo/65-permissions.rules b/etc/udev/gentoo/65-permissions.rules |
19 |
index 1cc31af..1db0aa7 100644 |
20 |
--- a/etc/udev/gentoo/65-permissions.rules |
21 |
+++ b/etc/udev/gentoo/65-permissions.rules |
22 |
@@ -18,3 +18,6 @@ SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="[18]", GROUP="tape", MODE= |
23 |
KERNEL=="ippp*|isdn*|dcbri*", GROUP="uucp" |
24 |
KERNEL=="pilot", GROUP="uucp" |
25 |
|
26 |
+# sound devices (sound=alsa, snd=oss) |
27 |
+SUBSYSTEM=="sound", GROUP="audio" |
28 |
+SUBSYSTEM=="snd", GROUP="audio" |
29 |
|
30 |
|
31 |
|
32 |
1.1 sys-fs/udev/files/digest-udev-115-r6 |
33 |
|
34 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/digest-udev-115-r6?rev=1.1&view=markup |
35 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/digest-udev-115-r6?rev=1.1&content-type=text/plain |
36 |
|
37 |
Index: digest-udev-115-r6 |
38 |
=================================================================== |
39 |
MD5 ac62cf56468db05bd37a5e7fed2823f6 udev-115-update-20070924.diff.bz2 22390 |
40 |
RMD160 3ce46440aba43088d1319ad5eb627c66abb75099 udev-115-update-20070924.diff.bz2 22390 |
41 |
SHA256 18e726afd833a827faf2ec7620051b7a142a50d712de132dbda213fc9d3e8021 udev-115-update-20070924.diff.bz2 22390 |
42 |
MD5 39bbe5ddcd62d35cd56b184d6862c540 udev-115.tar.bz2 198893 |
43 |
RMD160 bf72a4e20b9ba50a5b0c3da09f77e67ec819b9fa udev-115.tar.bz2 198893 |
44 |
SHA256 e35bb5662d2ad692a24adc5bb1d10b065e4657bcb68f20c8ef98d892bfc8dc93 udev-115.tar.bz2 198893 |
45 |
|
46 |
|
47 |
|
48 |
1.1 sys-fs/udev/files/udev.conf.115-r6 |
49 |
|
50 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev.conf.115-r6?rev=1.1&view=markup |
51 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev.conf.115-r6?rev=1.1&content-type=text/plain |
52 |
|
53 |
Index: udev.conf.115-r6 |
54 |
=================================================================== |
55 |
# The maximum size reserved for the tmpfs mounted on /dev |
56 |
tmpfs_size="10M" |
57 |
|
58 |
# The maximum number of inodes reserved for the tmpfs mounted on /dev |
59 |
#tmpfs_inodes="4k" |
60 |
|
61 |
|
62 |
|
63 |
|
64 |
1.1 sys-fs/udev/files/udev-start-115-r6.sh |
65 |
|
66 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-start-115-r6.sh?rev=1.1&view=markup |
67 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-start-115-r6.sh?rev=1.1&content-type=text/plain |
68 |
|
69 |
Index: udev-start-115-r6.sh |
70 |
=================================================================== |
71 |
# Copyright 1999-2007 Gentoo Foundation |
72 |
# Distributed under the terms of the GNU General Public License v2 |
73 |
|
74 |
tmpfs_size="10M" |
75 |
|
76 |
[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf |
77 |
|
78 |
mount_dev_directory() { |
79 |
# Setup temporary storage for /dev |
80 |
ebegin "Mounting /dev for udev" |
81 |
if [ "${RC_USE_FSTAB}" = "yes" ] ; then |
82 |
mntcmd=$(get_mount_fstab /dev) |
83 |
else |
84 |
unset mntcmd |
85 |
fi |
86 |
if [ -n "${mntcmd}" ] ; then |
87 |
try mount -n ${mntcmd} |
88 |
else |
89 |
mntopts="exec,nosuid,mode=0755,size=${tmpfs_size}" |
90 |
[ -n "${tmpfs_inodes}" ] && mntopts="${mntopts},nr_inodes=${tmpfs_inodes}" |
91 |
if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems ; then |
92 |
mntcmd="tmpfs" |
93 |
else |
94 |
mntcmd="ramfs" |
95 |
fi |
96 |
# many video drivers require exec access in /dev #92921 |
97 |
try mount -n -t "${mntcmd}" -o "${mntopts}" udev /dev |
98 |
fi |
99 |
eend $? |
100 |
} |
101 |
|
102 |
populate_udev() { |
103 |
# populate /dev with devices already found by the kernel |
104 |
|
105 |
if get_bootparam "nocoldplug" ; then |
106 |
RC_COLDPLUG="no" |
107 |
ewarn "Skipping udev coldplug as requested in kernel cmdline" |
108 |
fi |
109 |
|
110 |
# at this point we are already sure to use kernel 2.6.15 or newer |
111 |
ebegin "Populating /dev with existing devices through uevents" |
112 |
if [ "${RC_COLDPLUG}" = "yes" ]; then |
113 |
/sbin/udevtrigger |
114 |
else |
115 |
# only create device nodes |
116 |
/sbin/udevtrigger --attr-match=dev |
117 |
# run persistent-net stuff, bug 191466 |
118 |
/sbin/udevtrigger --subsystem-match=net |
119 |
fi |
120 |
eend $? |
121 |
|
122 |
# loop until everything is finished |
123 |
# there's gotta be a better way... |
124 |
ebegin "Letting udev process events" |
125 |
/sbin/udevsettle --timeout=60 |
126 |
eend $? |
127 |
|
128 |
rm -f /dev/.udev_populate |
129 |
return 0 |
130 |
} |
131 |
|
132 |
seed_dev() { |
133 |
# Seed /dev with some things that we know we need |
134 |
ebegin "Seeding /dev with needed nodes" |
135 |
|
136 |
# creating /dev/console and /dev/tty1 to be able to write |
137 |
# to $CONSOLE with/without bootsplash before udevd creates it |
138 |
[ ! -c /dev/console ] && mknod /dev/console c 5 1 |
139 |
[ ! -c /dev/tty1 ] && mknod /dev/tty1 c 4 1 |
140 |
|
141 |
# udevd will dup its stdin/stdout/stderr to /dev/null |
142 |
# and we do not want a file which gets buffered in ram |
143 |
[ ! -c /dev/null ] && mknod /dev/null c 1 3 |
144 |
|
145 |
# copy over any persistant things |
146 |
if [ -d /lib/udev/devices ] ; then |
147 |
cp --preserve=all --recursive --update /lib/udev/devices/* /dev 2>/dev/null |
148 |
fi |
149 |
|
150 |
# Not provided by sysfs but needed |
151 |
ln -snf /proc/self/fd /dev/fd |
152 |
ln -snf fd/0 /dev/stdin |
153 |
ln -snf fd/1 /dev/stdout |
154 |
ln -snf fd/2 /dev/stderr |
155 |
[ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core |
156 |
|
157 |
# Create problematic directories |
158 |
mkdir -p /dev/pts /dev/shm |
159 |
eend 0 |
160 |
} |
161 |
|
162 |
unpack_device_tarball() { |
163 |
# Actually get udev rolling |
164 |
if [ "${RC_DEVICE_TARBALL}" = "yes" ] && \ |
165 |
[ -s /lib/udev/state/devices.tar.bz2 ] ; then |
166 |
ebegin "Populating /dev with saved device nodes" |
167 |
try tar -jxpf /lib/udev/state/devices.tar.bz2 -C /dev |
168 |
eend $? |
169 |
fi |
170 |
} |
171 |
|
172 |
check_persistent_net() { |
173 |
# check if there are problems with persistent-net |
174 |
local syspath= |
175 |
local devs= |
176 |
local problem_found=0 |
177 |
for syspath in /sys/class/net/*_rename*; do |
178 |
if [ -d "${syspath}" ]; then |
179 |
devs="${devs} ${syspath##*/}" |
180 |
problem_found=1 |
181 |
fi |
182 |
done |
183 |
|
184 |
[ "${problem_found}" = 0 ] && return 0 |
185 |
|
186 |
eerror "UDEV: Your system has a problem assigning persistent names" |
187 |
eerror "to these network interfaces: ${devs}" |
188 |
|
189 |
einfo "Checking persistent-net rules:" |
190 |
# the sed-expression lists all duplicate lines |
191 |
# from the input, like "uniq -d" does, but uniq |
192 |
# is installed into /usr/bin and not available at boot. |
193 |
dups=$( |
194 |
RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' |
195 |
. /lib/udev/rule_generator.functions |
196 |
find_all_rules 'NAME=' '.*'|tr ' ' '\n'|sort|sed '$!N; s/^\(.*\)\n\1$/\1/; t; D' |
197 |
) |
198 |
if [ -n "${dups}" ]; then |
199 |
ewarn "The rules create multiple entries assigning these names:" |
200 |
eindent |
201 |
ewarn "${dups}" |
202 |
eoutdent |
203 |
else |
204 |
ewarn "Found no duplicate names in persistent-net rules," |
205 |
ewarn "there must be some other problem!" |
206 |
fi |
207 |
return 1 |
208 |
} |
209 |
|
210 |
main() { |
211 |
if [ $(get_KV) -le $(KV_to_int '2.6.14') ] ; then |
212 |
eerror "Your kernel is too old to work with this version of udev." |
213 |
eerror "Current udev only supports Linux kernel 2.6.15 and newer." |
214 |
return 1 |
215 |
fi |
216 |
|
217 |
mount_dev_directory |
218 |
|
219 |
# Create a file so that our rc system knows it's still in sysinit. |
220 |
# Existance means init scripts will not directly run. |
221 |
# rc will remove the file when done with sysinit. |
222 |
touch /dev/.rcsysinit |
223 |
|
224 |
# Selinux lovin; /selinux should be mounted by selinux-patched init |
225 |
if [ -x /sbin/restorecon -a -c /selinux/null ] ; then |
226 |
restorecon /dev > /selinux/null |
227 |
fi |
228 |
|
229 |
unpack_device_tarball |
230 |
seed_dev |
231 |
|
232 |
if [ -e /proc/sys/kernel/hotplug ] ; then |
233 |
echo "" > /proc/sys/kernel/hotplug |
234 |
fi |
235 |
|
236 |
ebegin "Starting udevd" |
237 |
/sbin/udevd --daemon |
238 |
eend $? |
239 |
|
240 |
/lib/udev/write_root_link_rule |
241 |
populate_udev |
242 |
|
243 |
# Only do this for baselayout-1* |
244 |
if [ ! -e /lib/librc.so ]; then |
245 |
|
246 |
# Create nodes that udev can't |
247 |
ebegin "Finalizing udev configuration" |
248 |
[ -x /sbin/lvm ] && \ |
249 |
/sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null |
250 |
# Running evms_activate on a LiveCD causes lots of headaches |
251 |
[ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \ |
252 |
/sbin/evms_activate -q &>/dev/null |
253 |
eend 0 |
254 |
fi |
255 |
|
256 |
check_persistent_net |
257 |
|
258 |
# trigger executing initscript when /etc is writable |
259 |
IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>/dev/null |
260 |
|
261 |
# udev started successfully |
262 |
return 0 |
263 |
} |
264 |
|
265 |
main |
266 |
|
267 |
# vim:ts=4 |
268 |
|
269 |
|
270 |
|
271 |
-- |
272 |
gentoo-commits@g.o mailing list |