On Wednesday 11 January 2012 05:04:31 am Simon Geard wrote: > On Tue, 2012-01-10 at 02:20 -0700, jasonps...@jegas.com wrote: > > Well, I opend the "previous untouchable" RC file and tossed readline all > > over it ... and when I booted .. GUESS WHAT? I was able to step through > > the actual boot process one command at a time... and I saw the offending > > error for the first time... and bot this is embarrassing.... > > > > /etc/rc.f/rcS.d/S10udev Line 78 /sbin/udevd - No Such File > > > > I looked in my scripts that build LFS, and realized I forgot to UNTAR > > UDEV!!!!! > > Next lesson - when doing scripted builds, error handling is important. > You want the entire build to stop immediately when something goes wrong, > instead of trying to continue, making the original error hard to find. > > Personally, my preferred means of dealing with that is to simply add > "set -e" near the top of my scripts. The has the effect that if any > command run by the script exits with a non-zero status (i.e fails), the > script aborts immediately. > > Simon.
I use the following: #!/bin/bash -e shopt -s -o pipefail the shopt makes sure that the error makes it through a pipe. so if you redirect to a log (which I do) it will stop on the error. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page