diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2009-02-21 10:13:21 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2009-02-21 10:13:21 +0000 |
commit | 9a4135687748b20fe9e10b14ef5ff8d9ca68ebd4 (patch) | |
tree | 373801e967a838adae823729c834d427ca1c89d4 /sys-fs/udev | |
parent | Version bump (diff) | |
download | gentoo-2-9a4135687748b20fe9e10b14ef5ff8d9ca68ebd4.tar.gz gentoo-2-9a4135687748b20fe9e10b14ef5ff8d9ca68ebd4.tar.bz2 gentoo-2-9a4135687748b20fe9e10b14ef5ff8d9ca68ebd4.zip |
Add option to disable persistent-cd. Make read-only root not fatal in udev-postmount. Bug #259495. Allow silencing unreliable kernel/udev warning.
(Portage version: 2.1.6.7/cvs/Linux i686)
Diffstat (limited to 'sys-fs/udev')
-rw-r--r-- | sys-fs/udev/ChangeLog | 9 | ||||
-rwxr-xr-x | sys-fs/udev/files/136/udev-mount.initd | 3 | ||||
-rwxr-xr-x | sys-fs/udev/files/136/udev-postmount.initd | 10 | ||||
-rw-r--r-- | sys-fs/udev/files/136/udev.confd | 8 | ||||
-rw-r--r-- | sys-fs/udev/files/136/udev.initd | 16 |
5 files changed, 38 insertions, 8 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog index 3eb25e74d389..9b952d89c75f 100644 --- a/sys-fs/udev/ChangeLog +++ b/sys-fs/udev/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-fs/udev # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.450 2009/02/20 17:59:17 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.451 2009/02/21 10:13:21 zzam Exp $ + + 21 Feb 2009; Matthias Schwarzott <zzam@gentoo.org> files/136/udev.confd, + files/136/udev.initd, files/136/udev-mount.initd, + files/136/udev-postmount.initd: + Add option to disable persistent-cd. Make read-only root not fatal in + udev-postmount. Bug #259495. Allow silencing unreliable kernel/udev + warning. 20 Feb 2009; Jeroen Roovers <jer@gentoo.org> udev-135-r4.ebuild: Revert to ~alpha and ~hppa (bug #254616 comment #6). diff --git a/sys-fs/udev/files/136/udev-mount.initd b/sys-fs/udev/files/136/udev-mount.initd index 55ab40d9e94d..694b194cab3d 100755 --- a/sys-fs/udev/files/136/udev-mount.initd +++ b/sys-fs/udev/files/136/udev-mount.initd @@ -18,6 +18,9 @@ check_kernel() eerror "Current udev only supports Linux kernel %KV_MIN% and newer." return 1 fi + + yesno "${unreliable_kernel_warning:-yes}" || return 0 + if [ $(get_KV) -lt $(KV_to_int '%KV_MIN_RELIABLE%') ]; then ewarn "You need at least Linux kernel %KV_MIN_RELIABLE% for reliable operation of udev." fi diff --git a/sys-fs/udev/files/136/udev-postmount.initd b/sys-fs/udev/files/136/udev-postmount.initd index a640e93de132..1eb190086a78 100755 --- a/sys-fs/udev/files/136/udev-postmount.initd +++ b/sys-fs/udev/files/136/udev-postmount.initd @@ -1,16 +1,24 @@ #!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/136/udev-postmount.initd,v 1.1 2009/01/20 13:00:01 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/136/udev-postmount.initd,v 1.2 2009/02/21 10:13:20 zzam Exp $ depend() { need localmount } +dir_writeable() +{ + mkdir "$1"/.test.$$ 2>/dev/null && rmdir "$1"/.test.$$ +} + start() { # check if this system uses udev [ -d /dev/.udev/ ] || return 0 + # only continue if rules-directory is writable + dir_writable /etc/udev/rules.d || return 0 + # store persistent-rules that got created while booting # when / was still read-only /lib/udev/move_tmp_persistent_rules.sh diff --git a/sys-fs/udev/files/136/udev.confd b/sys-fs/udev/files/136/udev.confd index 605078b4056a..bffea3569f9b 100644 --- a/sys-fs/udev/files/136/udev.confd +++ b/sys-fs/udev/files/136/udev.confd @@ -6,6 +6,11 @@ # Disable adding new rules for persistent-net persistent_net_disable="no" +# Disable adding new rules for persistent-cd +# Disabling this will stop new cdrom devices to appear +# as /dev/{cdrom,cdrw,dvd,dvdrw} +persistent_cd_disable="no" + # Set to "yes" if you want to save /dev to a tarball on shutdown # and restore it on startup. This is useful if you have a lot of # custom device nodes that udev does not handle/know about. @@ -31,6 +36,9 @@ persistent_net_disable="no" # Expert options: +# Disable warning about unreliable kernel/udev combination +#unreliable_kernel_warning="no" + # Timeout in seconds to wait for processing of uevents at boot. # There should be no need to change this. #udev_settle_timeout="60" diff --git a/sys-fs/udev/files/136/udev.initd b/sys-fs/udev/files/136/udev.initd index a9c98fb5cbb3..e6c6f67ca04a 100644 --- a/sys-fs/udev/files/136/udev.initd +++ b/sys-fs/udev/files/136/udev.initd @@ -42,16 +42,19 @@ root_link() /lib/udev/write_root_link_rule } -persistent_net_switch() +rules_disable_switch() { # this function disables rules files # by creating new files with the same name # in a temp rules directory with higher priority - local d=/dev/.udev/rules.d - if yesno "${persistent_net_disable:-no}"; then + local d=/dev/.udev/rules.d bname="$1" onoff="$2" + + if yesno "${onoff}"; then mkdir -p "$d" - echo "# This file disables persistent-net due to /etc/conf.d/udev" \ - > "$d"/75-persistent-net-generator.rules + echo "# This file disables ${bname} due to /etc/conf.d/udev" \ + > "${d}/${bname}" + else + rm -f "${d}/${bname}" fi } @@ -213,7 +216,8 @@ start() _start() { root_link - persistent_net_switch + rules_disable_switch 75-persistent-net-generator.rules "${persistent_net_disable:-no}" + rules_disable_switch 75-cd-aliases-generator.rules ${persistent_cd_disable:-no} disable_hotplug_agent start_udevd || cleanup |