"su - lfs" vs "su lfs" - su starts subshell, useless for automating in scripts..

Alan Lord alanslists at gmail.com
Mon Nov 26 23:47:26 PST 2007

armencho at gmail.com wrote:
> 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.
<snip />

Have you looked at the source of jhalfs? This is all bash. It extracts 
the commands from the book and builds the system.


The way out is open!

More information about the lfs-support mailing list