summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/udev')
-rw-r--r--sys-fs/udev/ChangeLog5
-rwxr-xr-xsys-fs/udev/files/udev.initd43
2 files changed, 30 insertions, 18 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog
index 094e49343b13..9d93aaeb28c9 100644
--- a/sys-fs/udev/ChangeLog
+++ b/sys-fs/udev/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-fs/udev
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.413 2008/10/28 21:59:05 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.414 2008/11/05 22:05:16 zzam Exp $
+
+ 05 Nov 2008; Matthias Schwarzott <zzam@gentoo.org> files/udev.initd:
+ Small improvements of init-script. Do run udev-postmount always
*udev-130-r2 (28 Oct 2008)
diff --git a/sys-fs/udev/files/udev.initd b/sys-fs/udev/files/udev.initd
index c38592517934..d145186c3ccc 100755
--- a/sys-fs/udev/files/udev.initd
+++ b/sys-fs/udev/files/udev.initd
@@ -2,46 +2,55 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+description="Mount /dev and let udev create the device-nodes"
+
depend()
{
- if [ -e /lib/librc.so -a -f /etc/init.d/sysfs ]; then
- # on baselayout-1 this causes
- # dependency-cycles with checkroot (before *)
+ if [ -f /etc/init.d/sysfs ]; then
# require new enough openrc with sysinit being extra runlevel
+ # on linux we just check if sysfs init-script exists
+ # this is to silence out ugly warnings about not-existing sysfs script
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
+display_hotplugged_services() {
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
+ # do not display this - better: do only inject it later :)
[ "$svc" = "udev-postmount" ] && continue
services="${services} ${svc}"
done
[ -n "${services}" ] && einfo "Device initiated services:${HILITE}${services}${NORMAL}"
+}
+
+inject_postmount_initd() {
+ mark_service_hotplugged udev-postmount
+ #einfo "Injected udev-postmount service"
+}
+
+start()
+{
+ # do not run this on too old baselayout - udev-addon is already loaded!
+ if [ ! -e /lib/librc.so -a -f /etc/init.d/sysfs ]; 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
+ display_hotplugged_services
+ inject_postmount_initd
return 0
}
stop()
{
- # this stop-part does not not yet exist
stop_addon udev
}