lkml.org 
[lkml]   [1998]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: devfs patch v21 available
Miquel van Smoorenburg writes:
> In article <199803310849.SAA03798@vindaloo.atnf.CSIRO.AU>,
> Richard Gooch <rgooch@atnf.CSIRO.AU> wrote:
> >Andreas Jellinghaus writes:
> >> > # cd /sbin
> >> > # mv init init.real
> >> > # echo '#! /bin/sh\nmount -n -t devfs none /dev\n/sbin/init.real' > init
> >> > # chmod a+x init
> >>
> >> did you try this one ?
> >
> >Er, no, since I never needed that.
>
>
> With a recent sysvinit (2.74), you can just do this in a startup script:
>
> mknod -m 600 /dev/initctl p
> kill -USR1 1
>
> >From the manpage:
>
> SIGUSR1
> On receipt of this signals, init closes and re-opens
> it's control fifo, /dev/initctl. Useful for
> bootscripts when /dev is remounted.
>
> >> as far as i know, you can't run init as slave process.
> >
> >Really? Why not?
>
> It checks if it is really init with (getpid() == 1). Also, it wait()s for
> all processes that die; the process with pid #1 _has_ to do that.

Ack! In my suggested userspace fix, I should have prefixed an exec:

# cd /sbin
# mv init init.real
# echo '#! /bin/sh\nmount -n -t devfs none /dev\nexec /sbin/init.real' > init
# chmod a+x init
This will ensure that the init.real programme runs with PID=1. I think
that will solve the problem.

Regards,

Richard....
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [from the cache]
©2003-2011 Jasper Spaans