139. NtpClient

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

139.1. Summary of Module Globals

List of Global Functions

List of Global Variables

139.2. Global Functions

139.2.1. ActivateRandomPoolServersFunction

Add servers needed for random_pool_servers function into the current configuration.

Return value

  • void

139.2.2. AutoPackages

Return required packages for auto-installation

Return value

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

139.2.3. DeActivateRandomPoolServersFunction

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

Return value

  • void

139.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

139.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 ())

139.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",
   ...
 ]

139.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

139.2.8. GetNtpServers

Get the list of known NTP servers

Return value

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

139.2.9. GetUsedNtpServers

Function returns list of NTP servers used in the configuration.

Return value

  • list <string> - of servers

139.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

139.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

139.2.12. Read

Read all ntp-client settings

Return value

  • boolean - true on success

139.2.13. Summary

Create a textual summary and a list of unconfigured cards

Return value

  • string - summary of the current configuration

139.2.14. TestNtpServer

Test if specified NTP server answers

Function parameters

  • string server

  • boolean silent

Return value

  • boolean - true if NTP server answers properly

139.2.15. Write

Write all ntp-client settings

Return value

  • boolean - true on success

139.2.16. deleteSyncRecord

Delete specified synchronization record

Function parameters

  • integer index

Return value

  • boolean - true on success

139.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

139.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.

139.2.19. selectSyncRecord

Select synchronization record

Function parameters

  • integer index

Return value

  • boolean - true on success

139.2.20. storeSyncRecord

Store currently sellected synchronization record

Return value

  • boolean - true on success

139.3. Global Variables

139.3.1. ad_controller

Active Directory controller

139.3.2. config_dhcp

NTP servers will be configured via DHCP

139.3.3. firewall_services

ports in firewall to open

139.3.4. modified

Data was modified?

139.3.5. ntp_records

Read all ntp-client settings

139.3.6. original_config_dhcp

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

139.3.7. random_pool_servers

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

139.3.8. required_packages

Required packages

139.3.9. run_chroot

Should the daemon be started in chroot environment?

139.3.10. run_service

Should the daemon be started when system boots?

139.3.11. selected_index

Index of the currently sellected item

139.3.12. selected_record

The currently sellected item

139.3.13. service_name

Service name of the NTP daemon

139.3.14. write_only

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

139.4. Module Requirements

139.4.1. Module Imports

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

139.4.2. Module Includes