From: Roy Marples <uberlord@gentoo.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Cold plug starting services too soon
Date: Wed, 18 Jan 2006 09:28:31 +0000 [thread overview]
Message-ID: <200601180928.34889.uberlord@gentoo.org> (raw)
In-Reply-To: <20060117203244.GA3135@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 1974 bytes --]
On Wednesday 18 January 2006 00:27, Greg KH wrote:
> On Tue, Jan 17, 2006 at 09:43:03PM +0100, Kay Sievers wrote:
> > All running events are exported in /dev/.udev/queue/, events that fail
> > will be moved to /dev/.udev/failed/. Make sure the script return non-zero
> > if it can't run and retry all failed events from /dev/.udev/failed/
> > after "localfs" is done. If the same event then runs successfully, it
> > will go away from /dev/.udev/failed/. On SUSE I have a second udev boot
> > script that is called /etc/init.d/boot.udev_retry.
>
> Cool, I'll try doing that for Gentoo and see how it works out. Thanks
> for adding this to udev already.
>
> Roy, do you think this will work out properly?
Yes, this can work out nicely. However, I don't see /dev/.udev/failed when we
exit with code 1. Is there something I'm missing?
Currently I have this fairly near the top of runscript.sh
# Ensure that we have completed sysinit
if [[ ${IN_HOTPLUG} == 1 ]] ; then
for pid in $(pidof bash) ; do
if [[ "$(cat "/proc/${pid}/cmdline" 2>/dev/null)" \
== "/bin/bash/sbin/rcsysinit" ]] ; then
eerror "ERROR: cannot hotplug ${myservice} until sysinit has
run."
exit 1
fi
done
unset pid
fi
Now thats very hacky, but the only way I can think of to find out if our rc
system has completed its sysinit. A better solution would be this
# Ensure that we have completed sysinit
if [[ ${RC_SYSINIT} == 1 ]] ; then
eerror "ERROR: cannot run ${myservice} until sysinit has completed."
exit 1
fi
Obviously this only works if rc can configure udev to export shell variables
before triggerring hotplugable events and can change/unset/add it after
sysinit. Something like this maybe.
udev_set_env "RC_SYSINIT=1"
do stuff to complete sysinit
udev_sev_env "RC_SYSINIT="
Can we do this Greg?
--
Roy Marples <uberlord@gentoo.org>
Gentoo Linux Developer
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-01-18 9:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-17 20:32 Cold plug starting services too soon Greg KH
2006-01-17 20:34 ` Greg KH
2006-01-17 20:43 ` Kay Sievers
2006-01-17 20:50 ` Marco d'Itri
2006-01-18 0:27 ` Greg KH
2006-01-18 9:28 ` Roy Marples [this message]
2006-01-19 3:45 ` Greg KH
2006-01-19 17:54 ` Roy Marples
2006-01-19 18:04 ` Greg KH
2006-01-19 18:11 ` Roy Marples
2006-01-19 18:19 ` Greg KH
2006-01-19 18:35 ` Roy Marples
2006-01-20 0:09 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200601180928.34889.uberlord@gentoo.org \
--to=uberlord@gentoo.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).