As some of you know, I've documenting the inners of the Arduino Yun. This note is about two different parts of that bridge.
Part One One of the parts that was difficult to trace was how bridge.py started. Part of the problem was that /etc/inittab was not well documented. Well this morning I found that missing piece, and made the correction to documentation on Openwrt
This is the correct reference for inittab as used with the YUN. http://git.busybox.net/busybox/tree/examples/inittab
::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown ttyATH0::askfirst:/bin/ash --login
Specfically on ttyATH0 the documentation says:
Note: askfirst acts just like respawn, but before running the specified
process it displays the line "Please press Enter to activate this
console." and then waits for the user to press enter before starting
the specified process.
The phrase "Please press Enter to activate this console", should be familiar to the users of Yún Serial Terminal.
A bit minor, but important nonetheless, is that bridge.py can be seen in the process table (use
ps w in the shell).
The process table shows:
python -u bridge.py
The important part is [u]-u[/u]. That means "unbuffered" IO, for stdin, stdout, and stderr*.* man python Jesse