linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev boot delay
@ 2005-03-04  8:47 Jim McCloskey
  2005-03-04  9:12 ` Marco d'Itri
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jim McCloskey @ 2005-03-04  8:47 UTC (permalink / raw)
  To: linux-hotplug


I'm not sure if this is a udev issue or a Debian issue.

After a recent upgrade to Debian testing on my laptop, which brought
udev to version 0.053, I experienced the following problem.

At the point in the boot-process where the init scripts run, I get this
message:

----------------------------------------------------------------------
  It has been detected that the command:

         /etc/rcS.d/S04udev

  has been run from an interactive shell.  It will probably not do
  what you expect, so this script will wait 60 seconds before
  continuing. Press ^C to stop it.
  RUNNING THIS COMMAND IS HIGHLY DISCOURAGED!
----------------------------------------------------------------------

The init process does indeed pause for 60 seconds, but everything is
fine at the end.

I found this very puzzling, since I don't believe that udev has ever
been run from an interactive shell on this machine.  I looked in
/etc/init.d/udev and found that the source of the warning was this:

----------------------------------------------------------------------
warn_if_interactive() {
  TTY=$(my_tty)
  if [ -z "$TTY" -o "$TTY" = "/dev/console" ]; then
     return
  fi
----------------------------------------------------------------------

And that explained to me why the problem arose only on the laptop and
not on the desktop machines that I manage. On the laptop (but not on
the others), I have in /etc/lilo.conf:

     append="console=/dev/tty6"

And indeed when I commented out this line, the normal boot-behaviour
was restored, the warning was not issued, and there was no 60 second
pause.

But surely this isn't reasonable behaviour? In this circumstance, the
script is being run in a routine way and there is no real sense in
which it has been run from an interactive shell.

Jim


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: udev boot delay
  2005-03-04  8:47 udev boot delay Jim McCloskey
@ 2005-03-04  9:12 ` Marco d'Itri
  2005-03-04 14:00 ` Samuel Liddicott
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Marco d'Itri @ 2005-03-04  9:12 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

On Mar 04, Jim McCloskey <mcclosk@ucsc.edu> wrote:

> I'm not sure if this is a udev issue or a Debian issue.
Debian-specific.

>      append="console=/dev/tty6"
This is broken, indeed.

> But surely this isn't reasonable behaviour? In this circumstance, the
> script is being run in a routine way and there is no real sense in
> which it has been run from an interactive shell.
I accept patches for a better test.

-- 
ciao,
Marco

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: udev boot delay
  2005-03-04  8:47 udev boot delay Jim McCloskey
  2005-03-04  9:12 ` Marco d'Itri
@ 2005-03-04 14:00 ` Samuel Liddicott
  2005-03-04 15:02 ` Olaf Conradi
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Samuel Liddicott @ 2005-03-04 14:00 UTC (permalink / raw)
  To: linux-hotplug

Marco d'Itri wrote:
> On Mar 04, Jim McCloskey <mcclosk@ucsc.edu> wrote:
> 
> 
>>I'm not sure if this is a udev issue or a Debian issue.
> 
> Debian-specific.
> 
> 
>>     append="console=/dev/tty6"
> 
> This is broken, indeed.
> 
> 
>>But surely this isn't reasonable behaviour? In this circumstance, the
>>script is being run in a routine way and there is no real sense in
>>which it has been run from an interactive shell.
> 
> I accept patches for a better test.

I don't have a patch but wby not check the system runlevel as well or 
instead?

Sam


-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: udev boot delay
  2005-03-04  8:47 udev boot delay Jim McCloskey
  2005-03-04  9:12 ` Marco d'Itri
  2005-03-04 14:00 ` Samuel Liddicott
@ 2005-03-04 15:02 ` Olaf Conradi
  2005-03-04 16:14 ` Marco d'Itri
  2005-03-05 22:15 ` Olaf Conradi
  4 siblings, 0 replies; 6+ messages in thread
From: Olaf Conradi @ 2005-03-04 15:02 UTC (permalink / raw)
  To: linux-hotplug

On Fri, 04 Mar 2005 13:20:37 +0000, Samuel Liddicott <sam@liddicott.com> wrote:
> Marco d'Itri wrote:
> > On Mar 04, Jim McCloskey <mcclosk@ucsc.edu> wrote:
> >
> >>I'm not sure if this is a udev issue or a Debian issue.
> >
> > Debian-specific.
> >
> >>     append="console=/dev/tty6"
> >
> > This is broken, indeed.

My server does not yet use udev, but it is using
"console=tty0 console=ttyS1,19200n8"

> > I accept patches for a better test.
> 
> I don't have a patch but wby not check the system runlevel as well or
> instead?

I am not at home so I can't check the contents of these environment variables.
Especially for console as I have two of them in my cmdline for the
kernel, my guess is it will contain only the first.

man init says:
ENVIRONMENT
       RUNLEVEL
              The current system runlevel.
       CONSOLE
              The  system  console.  This is really inherited from the kernel;
              however if it is not set init will set  it  to  /dev/console  by
              default.

Hopefully minit and other init systems set them as well.

 -Olaf


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: udev boot delay
  2005-03-04  8:47 udev boot delay Jim McCloskey
                   ` (2 preceding siblings ...)
  2005-03-04 15:02 ` Olaf Conradi
@ 2005-03-04 16:14 ` Marco d'Itri
  2005-03-05 22:15 ` Olaf Conradi
  4 siblings, 0 replies; 6+ messages in thread
From: Marco d'Itri @ 2005-03-04 16:14 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

On Mar 04, Olaf Conradi <oohlaf@gmail.com> wrote:

> Hopefully minit and other init systems set them as well.
Hope is not enough, this is why I chose the other approach.

-- 
ciao,
Marco

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: udev boot delay
  2005-03-04  8:47 udev boot delay Jim McCloskey
                   ` (3 preceding siblings ...)
  2005-03-04 16:14 ` Marco d'Itri
@ 2005-03-05 22:15 ` Olaf Conradi
  4 siblings, 0 replies; 6+ messages in thread
From: Olaf Conradi @ 2005-03-05 22:15 UTC (permalink / raw)
  To: linux-hotplug

On Fri, 4 Mar 2005 17:14:11 +0100, Marco d'Itri <md@linux.it> wrote:
> On Mar 04, Olaf Conradi <oohlaf@gmail.com> wrote:
> 
> > Hopefully minit and other init systems set them as well.
> Hope is not enough, this is why I chose the other approach.

Heh, it can still be used as an additional check.
Just use it if it's available, otherwise fall back on the current check.

How about this:

warn_if_interactive() {
  if [ "$RUNLEVEL" = "S" -a "$PREVLEVEL" = "N" ]; then
    return
  fi
  TTY=$(my_tty)
  if [ -z "$TTY" -o "$TTY" = "/dev/console" ]; then
     return
  fi
  printf "Warning..blabla\n"
  sleep 60
}

Cheers,
 -Olaf


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-03-05 22:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-04  8:47 udev boot delay Jim McCloskey
2005-03-04  9:12 ` Marco d'Itri
2005-03-04 14:00 ` Samuel Liddicott
2005-03-04 15:02 ` Olaf Conradi
2005-03-04 16:14 ` Marco d'Itri
2005-03-05 22:15 ` Olaf Conradi

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).