Using MD-shell commands
MD-shell (mdsh) is a command interpreter similar to standard Linux shells like the "Bourne Again Shell" (bash). Compared to other shells MD-shell has two extra main features: it understands MML commands, and it has the concept of authority levels. MD-shell also has a number of minor features that differentiate it from the standard Linux shells. Service node users should have mdsh as their log-in shell, but can also start it from another shell by typing mdsh.
There are three fundamentally different types of commands in mdsh:
Built-in commands
These commands are an integrated part of mdsh and executed by mdsh itself. An example of such a command is "cd". Help on these commands is available by typing "help <command>" in mdsh.
MML commands
These commands are different in syntax from normal Linux commands. No help for these commands can be retrieved in mdsh. See the command description for respective command group. For more information on using MML commands, see chapter 3 MML commands on page 6.
Linux commands
These commands are separate executable files in the Linux environment, outside of mdsh. The Linux commands can be divided in three groups
– Standard Linux commands and tools like "less". These commands and tools are not specific for the MX-ONE Service Node. The work just as they work on any Linux computer. Help on these commands is usually available by typing "man <command>".
– MX-ONE Service Node commands based on the MD_COM framework. Examples of commands based on the MD_COM framework are "alarm" and "extension". MD-shell interacts with the MD_COM framework, and tab-completion is available also for the command line switches. Help on these commands is available by typing "<command> -?" (or "<command> --help").
– Old MX-ONE Service Node commands (not based on the MD_COM framework). Examples of old commands are "trace" and "number_initiate". (These old commands will probably be rewritten into new commands based on the MD_COM framework in future releases.) Help on these commands is available by typing "<command> -help"
Typing "help" in mdsh will result in a list of all commands that are available for a user.
Flow control statements like loops, “if” statements, “while” statements, pipes or redirection are not supported in mdsh. Another shell should be used if these features are needed (bash is recommended).
The following switches can be used on the mdsh command line:
-c <command>
Only execute command. The command is executed directly and mdsh is terminated. No prompt is received.
-f
Turn off confirmation of dangerous commands
-genConf file, --genConf file
Generate an example configuration file for mdsh
-?, -H, -h, -help, --help
Print mdsh help text
A command line argument that is not one of the above switches, should be the name of a script file with mdsh commands. Further command line arguments are passed as arguments to the script file.