mdsh

Shell for MX-ONE Service Node

Format

Function

It is possible to run different shells (that is,. command interpreters) on UNIX and Linux systems. It is normally possible to start another shell from inside a shell. The shell that is to be started when a person logs into the computer is called a “login shell”. The file /etc/passwd controls which shell is the login shell of which user.

mdsh can be started from another shell, or it can be used as login shell.

The login shell field in /etc/passwd is set by the system administrator when he/she creates the user account. The users can change the login shell themselves by the use of the chsh command. You do not usually edit /etc/passwd directly. (A skilled system administrator can edit /etc/passwd directly, but that requires great care to guarantee that no extra/erroneous characters are entered by mistake.)

It is intended that the users on the MX-ONE Service Node (that is,. the service personnel of the customer) should have mdsh as login shell. Different user accounts have different privileges in mdsh. These privileges are governed by the file /etc/opt/eri_sn/mdsh.conf.

Different privileges grant the rights to enter different commands. The command “help” in mdsh lists (only) the commands the current user is privileged to execute.

Users on the highest privilege level are allowed to start other shells from mdsh (thus bash is one of the allowed commands for this level).

There are 3 fundamentally different types of commands in mdsh:

The mdsh does not support flow control statements like loops, "if" statements "while" statements, pipes and redirection. Another shell should be used if these features are needed. (bash is recommended.) (See "mdsh -c command" below.) mdsh command line switches:

Script files:

A command line argument that is not one of the above switches, should be the name of script file with mdsh commands. Further command line arguments are passed as arguments to the script file.

Initialization files:

When mdsh is started it first reads the file /etc/opt/eri_sn/mdsh.rc (if it exists) and executes the commands in this file. After that mdsh reads the file ${HOME}/.mdshrc (if it exists) and executes the commands in this file.These files are intended for setting of environment variables, etc.

The command history is saved in the file ${HOME}/.mdsh.history

Parameters

-

Example

-