137. NtpClient

Data for configuration of ntp-client, input and output functions.

137.1. Summary of Module Globals

List of Global Functions

List of Global Variables

137.2. Global Functions

137.2.1. ActivateRandomPoolServersFunction

Add servers needed for random_pool_servers function into the current configuration.

Return value

  • void

137.2.2. AutoPackages

Return required packages for auto-installation

Return value

  • map - of packages to be installed and to be removed

137.2.3. DeActivateRandomPoolServersFunction

Removes all servers contained in the random_pool_servers list from the current configuration.

Return value

  • void

137.2.4. DetectNtpServers

Detect NTP servers present in the local network

Function parameters

  • symbol method

Return value

  • list<string> - a list of found NTP servers

137.2.5. Export

Dump the ntp-client settings to a single map (For use by autoinstallation.)

Return value

  • map - Dumped settings (later acceptable by Import ())

137.2.6. GetAllKnownCountries

Reads and returns all known countries with their country codes

Return value

  • map <string, string> - of known contries

$[
   "CL" : "Chile",
   "FR" : "France",
   ...
 ]

137.2.7. GetCountryNames

Get the mapping between country codea and names ("CZ" -> "Czech Republic")

Return value

  • map<string, string> - a map the country codes and names mapping

137.2.8. GetNtpServers

Get the list of known NTP servers

Return value

  • map<string, map<string,string> > - a list of known NTP servers

137.2.9. GetUsedNtpServers

Function returns list of NTP servers used in the configuration.

Return value

  • list <string> - of servers

137.2.10. Import

Get all ntp-client settings from the first parameter (For use by autoinstallation.)

Function parameters

  • map settings

Return value

  • boolean - True on success

137.2.11. IsRandomServersServiceEnabled

Checks whether all servers listed in the random_pool_servers list are used in the configuration.

Return value

  • boolean - true if enabled

137.2.12. Read

Read all ntp-client settings

Return value

  • boolean - true on success

137.2.13. Summary

Create a textual summary and a list of unconfigured cards

Return value

  • string - summary of the current configuration

137.2.14. TestNtpServer

Test if specified NTP server answers

Function parameters

  • string server

  • boolean silent

Return value

  • boolean - true if NTP server answers properly

137.2.15. Write

Write all ntp-client settings

Return value

  • boolean - true on success

137.2.16. deleteSyncRecord

Delete specified synchronization record

Function parameters

  • integer index

Return value

  • boolean - true on success

137.2.17. findSyncRecord

Find index of synchronization record

Function parameters

  • string type

  • string address

Return value

  • integer - index of the record if found, -1 otherwise

137.2.18. getSyncRecords

Get the list of synchronization-related records

Return value

  • list<map<string,any> > - a list of maps with keys type (eg. "server"), address and index.

137.2.19. selectSyncRecord

Select synchronization record

Function parameters

  • integer index

Return value

  • boolean - true on success

137.2.20. storeSyncRecord

Store currently sellected synchronization record

Return value

  • boolean - true on success

137.3. Global Variables

137.3.1. config_dhcp

NTP servers will be configured via DHCP

137.3.2. firewall_services

ports in firewall to open

137.3.3. modified

Data was modified?

137.3.4. ntp_records

Read all ntp-client settings

137.3.5. original_config_dhcp

NTP servers will be configured via DHCP - value got while reading

137.3.6. random_pool_servers

List of servers defined by the pool.ntp.org to get random ntp servers

137.3.7. required_packages

Required packages

137.3.8. run_chroot

Should the daemon be started in chroot environment?

137.3.9. run_service

Should the daemon be started when system boots?

137.3.10. selected_index

Index of the currently sellected item

137.3.11. selected_record

The currently sellected item

137.3.12. service_name

Service name of the NTP daemon

137.3.13. write_only

Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.

137.4. Module Requirements

137.4.1. Module Imports

  • Directory
  • Message
  • Mode
  • NetworkDevices
  • PackageSystem
  • Progress
  • Report
  • SLP
  • Service
  • SuSEFirewall
  • Summary

137.4.2. Module Includes