Hi all, I am building my own little automated LFS install script in Bash. Basically its a copy-paste job from LFS book, of course, with minor corrections for function.
One of the things i find difficult to script is a "nice" (read pretty) way of continuing the install script after doing "su - lfs". the 'su' command apparently starts a subshell process, and so the new subshell just waits for user action, pausing the whole install script that started the 'su'. And I cannot make it continue with the script as the 'lfs' user, since, well su just blocks, and that is the way it works. Why can't the book just silently change user id instead ? I could alternatively do a 'su -c ./lfs-continue - lfs', essentially passing control further via another script, but then again, i also have variables that i need the 'lfs' user shell inherit, which I create on my own, for different purposes. Things like timeout values, etc... (not part of LFS, although the $LFS variable would be nice to have exported). Also, is it necessary to have the hyphen in 'su' ? One can start a clean environment session using 'su lfs' and then just executing ~/.bash_profile anyway, the difference is, apparently non-login shells inherit variables from parent shells, while login shells do not.. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
