Bug? Initializing rtems "rtems_pty_maximum_ptys" ? (v4.8.0)
chrisj at rtems.org
Tue Sep 16 00:03:22 UTC 2008
Joel Sherrill wrote:
> It can now process scripts (no conditional logic yet).
The ability to run scripts is a powerful system level feature for RTEMS. The
scripts are called "joel" files. Just like a shell script in a Unix box you
add to start of a text file the line:
# Mount the various file systems
mount -t nfs server:/opt/work /net
mount -t msdos /dev/flashdisk0 /fd
mount -t msdos /dev/randisk0 /rd
You can pass various options to the script. For example '-v' as:
#! joel -v
This will print the commands in the script as they are executed. The shell
will check a file to see if the joel line is present and run it.
You can add code to your application to run a script at initialisation time.
The code is something like:
printf ("Running /shell-init....\n\n");
sc = rtems_shell_script ("fstst", 10 * 1024, 160, "/shell-init", "stdout",
0, 1, 1);
if (sc != RTEMS_SUCCESSFUL)
printf ("error: running shell script: %s (%d)\n",
rtems_status_text (sc), sc);
I embed the script into the program and place in the IMFS to do this. See:
for an example program that does this.
More information about the users