Problem with 2nd chroot when using a script

Thomas T. Veldhouse veldy at veldy.net
Tue Jan 23 08:48:23 PST 2001


Instead of having the chroot execute a shell, have chroot execute your make
command.

Tom Veldhouse
veldy at veldy.net

----- Original Message -----
From: "Dieter Scholz" <dscholz at reido.de>
To: <lfs-discuss at linuxfromscratch.org>
Sent: Tuesday, January 23, 2001 11:40 AM
Subject: Problem with 2nd chroot when using a script


> Hello,
>
> at the moment I'm trying to create a shell script that automates the LFS
> build.
>
> Here's my problem (please look at the code):
>
> ##### Start code
>
> # startup-script 1
> cat > $LFS/root/.bash_profile << "EOF"
>
> # Here are some variable definitions
>
> #Call LFSbuild2 after chroot
> /LFSbuild/scripts/general/LFSbuild2
> #Logout after bash is created with shared libs
> logout
> # End /root/.bash_profile
> EOF
>
> cd $LFS
> #chroot #1 works perfect
> chroot $LFS /usr/bin/env -i HOME=/root /bin/bash --login
>
> # startup-script 2
> cat > $LFS/root/.bash_profile << "EOF2"
> # Begin /root/.bash_profile
>
> #Call LFSbuild2 after chroot
> /LFSbuild/scripts/general/LFSbuild3
> #Logout after bash is created with shared libs
> logout
> # End /root/.bash_profile
> EOF2
>
> # Copy bash with shared libs to $LFS/bin
> mv $LFS/usr/bin/bash $LFS/usr/bin/bashbug $LFS/bin
>
> cd $LFS
>
> # chroot #2 leads to a stopped bash
> chroot $LFS /usr/bin/env -i HOME=/root /bin/bash --login
>
> ##### End code
>
> When I chroot the 2nd time the bash shell stops (CTRL-Z like). If I type
fg
> JOBNUMBER then the script continues as it should. If I put the first
chroot
> in a comment the 2nd chroot does not lead to a stopped bash (so no &
> somewhere). Strange ...
>
> If you have an idea, please help me. This seems to be the last problem in
my
> script. I post it when it is ready.
>
> Dieter
>
>
> --
> Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
> and put unsubscribe in the subject header of the message
>
>


-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list