[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 1/3] febootstrap/helper/init: make sure /proc is mounted into chroot.



On Sun, Jun 05, 2011 at 01:02:48AM +0200, Hilko Bengen wrote:
> ---
>  helper/init.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/helper/init.c b/helper/init.c
> index 0ca3135..2b5dacf 100644
> --- a/helper/init.c
> +++ b/helper/init.c
> @@ -163,8 +163,10 @@ main ()
>  
>    chdir ("/");
>  
> -  /* Run /init from ext2 filesystem. */
> +  mount_proc ();
>    print_uptime ();
> +
> +  /* Run /init from ext2 filesystem. */
>    execl ("/init", "init", NULL);
>    perror ("execl: /init");

Is the point here to mount /proc before printing the uptime (which is
obviously going to fail)?  Do you think it's better to mount /proc in
the init script?  We could remove the call to print_uptime() here
instead.

libguestfs already mounts /proc in the init script:

http://git.annexia.org/?p=libguestfs.git;a=blob;f=appliance/init;hb=HEAD

Perhaps we could do it earlier, but still in /init.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]