Script

Richard Lightman richard at reika.demon.co.uk
Wed Jan 10 13:26:26 PST 2001


Misquoted from L Vogtmann on 2001/01/ 9 at 19:16 +0000:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tuesday 09 January 2001 07:09 pm, Perrin Aybara wrote:
> > Okay, this isn't really a high-end automation or anything, so I didn't
> > think ALFS-discuss was the list for it (overkill).  Here's my dilemma:
> > I've recently (since about a month ago) started doing my LFS builds with
> > shell scripts.  The only problem with that is carrying over to the
> > chroot environment.  Of course, once the script gets to the chroot
> > command it stops executing since it's then in a new shell.  Anyone have
> > any solutions as to how to get around this with a shell script?  It
> > wasn't going to be that big of a problem for me with the build I did
> > this afternoon--I started my pre-chroot script before I left for a class
> > I had tonight, and due to a syntax error I came back to see that the
> > script had died at the gcc install.  The pre-chroot stuff will finish
> > sometime during the night, but there'll be a long chunk of the night
> > where my system is just sitting here since I can't get past the chroot
> > without user intervention (actually _calling up_ the post-chroot shell
> > script from inside the chroot).  Any help on this?  Thanks in advance...
> 
> I haven't tried anything like this, so it's just a stab in the dark, but...
> Instead of calling 'bash' in the chroot command, how about calling the chroot 
> version on your script (as long as it's available in the chroot environment.) 
>  i.e.  instead of 'chroot $LFS env -i HOME=/root bash --login' do something 
> like 'chroot $LFS env -i HOME=/root CHROOTSCRIPT' since the script should 
> start with a shebang line of #!/bin/bash, bash will still be running.
> 
The other fun bits:
Unpack the sources from outside the chroot directory, then you
do not need to copy the sources across, or do static compilations
of bzip2, gzip or tar. You must do tar soon after chroot because
it is require for gcc and others.

At the moment I copy the passwd group and shadow stuff across to
get the passwords, but I could grep them out like with /etc/lilo.conf
or /boot/grub/menu.lst

The automated reboot is scarey, but I have never been awake when it
happend.

For some more ideas, look at my old scripts at:
http://www.reika.demon.co.uk

I you are interested, I will put the pre-release stuff up too - 
it is currently broken while I fix parallel builds, but I am
sure over 200 of the packages will still install off the old
engine. (The text to speech conversion thing is fun)

Richard
 

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




More information about the blfs-support mailing list