On Sat, Nov 22, 2008 at 03:41:25PM -0600, Ralph Porter wrote: > Here is the sample script for downloadihg and compiling the packages. > However the instructions say to run make install as root. > > Is it ok to run this entire script as root or should there be more > code in the script to log on as root to do the make install. > Opinions differ. In LFS we build as root. My own scripts for BLFS to build a new system do the same - worst case I'll blow away the whole build with a misplaced 'rm -rf'. Some people (not me!) swear by using sudo to become root only during the install.
If I'm testing something, I have been known to build as a user and install as root. The results (for correct commands) are the same, except that by building as root you won't have to run the chown commands which sometimes appear in BLFS. The text in BLFS is probably targetted at people who initially follow the book religiously, and who will build the final system in many discrete steps. It's good to encourage people not to be root when they don't need to be. I can't comment seriously on the script, I'm not familiar with using bash -e and I prefer to create 'stamp' files so that after an error (or to rebuild an individual package for some reason) I only do what is necessary. But, I think you might find logging a batch of packages into one logfile might make the log rather unwieldy. ĸen -- das eine Mal als Tragödie, das andere Mal als Farce -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
