Next: , Previous: , Up: The Configuration Language   [Contents][Index]


8.5.4.18 Pragma Import

Two kinds of subprograms are allowed in the configuration language. A main procedure is used as a partition Main attribute and a function is used as a partition Host attribute.

PROCEDURE_DECLARATION ::=
     procedure PROCEDURE_IDENTIFIER;
FUNCTION_DECLARATION ::=
     function FUNCTION_IDENTIFIER
        (PARAMETER_IDENTIFIER : [in] String)
         return String;

The function can be an Ada function (default) or a shell script. To import a shell script, the pragma Import must be used:

PRAGMA ::=
   pragma Import
      ([Entity        =>] FUNCTION_IDENTIFIER,
       [Convention    =>] CONVENTION_LITERAL,
       [External_Name =>] STRING_LITERAL);

pragma Import (Best_Node, Shell, "best-node");

In this case, the PCS invokes the shell script with the partition name as a command line argument. The shell script is supposed to return the partition host-name (see Partition Attribute Host).