linuxenv.bash (for <= uml-2.6.7-1)
Here's a little script that I wrote for running experiments in a UML kernel. The idea is that I want to get into the UML system quickly, share my original environment, and run things from a script (which may or may not eventually fire up a shell).
http://www.almesberger.net/misc/uml/linuxenv.bash
The script propagates the following things into the UML system:
- the host's file system, through hostfs
- all variables (including local ones) defined when invoking linuxenv.bash
- the current directory in the host file system
An example script that just starts a shell would look like this:
#!/bin/sh
. linuxenv.bash "$@"
export PS1='\w\$ '
exec /bin/sh
http://www.almesberger.net/misc/uml/linuxsh
Note that linuxenv.bash may not work with kernels before 2.6.4, and - due to the hostfs changes - doesn't work yet with uml-2.6.7-2, or above.
- Werner
Signature · 14 lines
_________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina [email protected] / /_http://www.almesberger.net/____________________________________________/ ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel