Thanks Dan. I know a good deal about su, and that it can start a process with "-c" switch.
I have now automated the thing using various tricks. Long live LFS. The idea of using original source to build a Linux system is IMO superior (not only for learning) to using distributions, given one can script the process and/or save an image of the target installation. On Nov 27, 2007 11:21 PM, Dan Nicholson <[EMAIL PROTECTED]> wrote: > On Nov 26, 2007 10:55 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > 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. > > Read the man page for su. It only drops you to a shell if you don't > give it a command to use. Try this: > > su - -c "/path/to/some_script.sh" lfs > > Beware that where you place the user on the command line is touchy > depending on who's su you're using. Also, since you're not dropping to > a shell, you won't pick the .bash* files created for the lfs user, so > you'll have to recreate that environment somehow. > > -- > Dan > > -- > http://linuxfromscratch.org/mailman/listinfo/lfs-support > FAQ: http://www.linuxfromscratch.org/lfs/faq.html > Unsubscribe: See the above information page > -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
