• Increase font size
  • Default font size
  • Decrease font size
Home Software SysFunc Sysfunc Reference Guide - System database

Sysfunc Reference Guide - System database

E-mail Print
Read : 3,156 times
(0 votes, average 0 out of 5)
Article Index
Sysfunc Reference Guide
Configuration parameters
System database
Disk management
Error handling
File manipulation
Filesystems
IP V4 addresses
Kernel
Logical volume manager
Miscellaneous
Message display
User interaction
Network
OS
File backup
Software packages
Services
Time and date
Temporary file management
Users and groups
Vmware-specific
Function index
All Pages

db_clear

Clear the whole database

Arguments

None

Returns

0

Displays

nothing

db_copy

Duplicate a variable (copy content)

If the source variable is not set, target is created with an empty value

Arguments

$1Source variable name
$2Target variable name

Returns

0

Displays

nothing

db_dump

Dump the database

Output format (each line) : <name><space><value><EOL>

The output is sorted alphabetically.

Arguments

None

Returns

0

Displays

DB content

db_expand

Replaces patterns in the form '{{%<variable name>%}}' by their value.

Allows nested substitutions (ex: {{%interface{{%hcfg:icount%}}/network%}}).

Patterns which do not correspond to an existing variable are replaced with an empty string.

Input: stdin, output: stdout.

Arguments

$1

Returns

0

Displays

Output

db_get

Get a variable value

If variable is not set, return an empty string (no error)

If global variable SF_DB_PATH contains '<stdin>', DB content is read from standard input.

Arguments

$1Variable name

Returns

0

Displays

Value or empty string if var not set

db_import

Import variables in dump format (one per line)

Lines are read from stdin

Arguments

None

Returns

0

Displays

nothing

db_isset

Check if a variable is set

If global variable SF_DB_PATH contains '<stdin>', DB content is read from standard input.

Arguments

$1Variable name

Returns

0 if variable is set, <> 0 if not

Displays

nothing

db_key

Build a key (regexp usable in grep) from a variable name

Arguments

$1Variable name

Returns

0

Displays

Key string

db_list

List DB keys alphabetically, one per line

Arguments

None

Returns

0

Displays

DB keys

db_normalize

Filter a name, leaving authorized chars only

Arguments

$1Variable name

Returns

0

Displays

Normalized name

db_rename

Rename a variable (keep content)

If the source variable is not set, target is created with an empty value

Arguments

$1Source variable name
$2Target variable name

Returns

0

Displays

nothing

db_set

Set a variable

Arguments

$1Variable name
$2Value

Returns

0

Displays

nothing

db_set_timestamp

Set a variable with the value returned by tm_now

Arguments

$1Variable name

Returns

0

Displays

nothing

db_unset

Unset a variable

No error if variable was not present in DB

Arguments

$*Variable names

Returns

0

Displays

nothing

 

Please login or register to add a comment