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

armencho at gmail.com armencho at gmail.com
Tue Nov 27 01:36:00 PST 2007


Yes I did. Its too much stuff there to be looking for a 'su - lfs'.
They overcomplicated it, granted for the purpose of robustness.
Nevertheless, I could not find how they have solved the issue.

I have managed to circumvent the problem myself, but havent tested the
solution yet, i.e. i only have a theory or two..

On Nov 27, 2007 8:47 AM, Alan Lord <alanslists at gmail.com> wrote:
> 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.
>
> Al
>
> --
> The way out is open!
> http://www.theopensourcerer.com
>
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
>



More information about the lfs-support mailing list