summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2008-11-05 22:05:16 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2008-11-05 22:05:16 +0000
commit1a60f4f7d937ee07e23f1c6a26e01e1afda9d1f5 (patch)
treedde6cd0cce7e31de2a9683109a8cd3b83e33c63d /sys-fs/udev
parentFix test-fail when LINGUAS was set to either pl or de. Make validation errors... (diff)
downloadgentoo-2-1a60f4f7d937ee07e23f1c6a26e01e1afda9d1f5.tar.gz
gentoo-2-1a60f4f7d937ee07e23f1c6a26e01e1afda9d1f5.tar.bz2
gentoo-2-1a60f4f7d937ee07e23f1c6a26e01e1afda9d1f5.zip
Small improvements of init-script. Do run udev-postmount always
(Portage version: 2.2_rc13/cvs/Linux 2.6.27-gentoo-r1 i686)
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
}