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

Sysfunc Reference Guide - OS

E-mail Print
Read : 3,637 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

compute_os_id

Alias of os_id

### This function is deprecated. Please use os_id

Arguments

None

Returns

Always 0

Displays

OS ID string

find_posix_shell

Find a Posix-compatible shell on the current host

Search a bash shell first, then ksh

Arguments

None

Returns

Always 0

Displays

Shell path if found, nothing if not found

os_arch

Display the current OS architecture (aka 'hardware platform')

Arguments

None

Returns

0

Displays

OS distrib

os_distrib

Display the current OS distribution

Arguments

None

Returns

0

Displays

OS distrib

os_family

Display the current OS family (Linux, SunOS,...)

Arguments

None

Returns

0

Displays

OS distrib

os_id

Computes and displays a string defining the curent system environment

The displayed string is a combination of the OS name, version, system architecture and may also depend on other parameters like, for instance, the RedHat ES/AS branches. It is an equivalent of the 'channel' concept used by RedHat. I personnally call it 'OS ID' for 'OS IDentifier' and use it in every script where I need a single string to identify the system environment the script is currently running on.

If the current system is not recognized, the program aborts.

By convention, environments recognized by this function support the rest of the library.

**Contributors welcome !** Feel free to enhance this function with additional recognized systems, especially with other Linux distros, and send me your patches.

Arguments

None

Returns

Always 0

Displays

OS ID string

os_version

Display the current OS version

Arguments

None

Returns

0

Displays

OS distrib

poweroff

Shutdown and poweroff the host

Arguments

None

Returns

does not return

Displays

nothing

reboot

Shutdown and restart the host

Arguments

None

Returns

does not return

Displays

nothing

shutdown

Shutdown and halt the host

Arguments

None

Returns

does not return

Displays

nothing

 

Please login or register to add a comment