BLOG SPEKTAKULER

Jumat, 09 Maret 2012

Command line interpreter ( CLI )

2.3. EVMS Command Line Interpreter

The EVMS Command Line Interpreter (EVMS CLI) provides a command-driven user interface for EVMS. The EVMS CLI helps automate volume management tasks and provides an interactive mode in situations where the EVMS GUI is not available.
Because the EVMS CLI is an interpreter, it operates differently than command line utilities for the operating system. The options you specify on the EVMS CLI command line to invoke the EVMS CLI control how the EVMS CLI operates. For example, the command line options tell the CLI where to go for commands to interpret and how often the EVMS CLI must save changes to disk. When invoked, the EVMS CLI prompts for commands.
The volume management commands the EVMS CLI understands are specified in the /usr/src/evms-2.2.0/engine2/ui/cli/grammar.ps file that accompanies the EVMS package. These commands are described in detail in the EVMS man page, and help on these commands is available from within the EVMS CLI.

2.3.1. Using the EVMS CLI

Use the evms command to start the EVMS CLI. If you do not enter an option with evms, the EVMS CLI starts in interactive mode. In interactive mode, the EVMS CLI prompts you for commands. The result of each command is immediately saved to disk. The EVMS CLI exits when you type exit. You can modify this behavior by using the following options with evms:

-b
This option indicates that you are running in batch mode and anytime there is a prompt for input from the user, the default value is accepted automatically. This is the default behavior with the -f option.
-c
This option saves changes to disk only when EVMS CLI exits, not after each command.
-f filename
This option tells the EVMS CLI to use filename as the source of commands. The EVMS CLI exits when it reaches the end of filename.
-p
This option only parses commands; it does not execute them. When combined with the -f option, the -p option detects syntax errors in command files.
-h
This option displays help information for options used with the evms command.
-rl
This option tells the CLI that all remaining items on the command line are replacement parameters for use with EVMS commands.
NoteNOTE
 Replacement parameters are accessed in EVMS commands using the $(x) notation, where x is the number identifying which replacement parameter to use. Replacement parameters are assigned numbers (starting with 1) as they are encountered on the command line. Substitutions are not made within comments or quoted strings.
An example would be:
evms -c -f testcase -rl sda sdb
sda is the replacement for parameter1 and sdb is the replacement for parameter2
NoteNOTE
 Information on less commonly used options is available in the EVMS man page.

Tidak ada komentar:

Posting Komentar