162. NtpClient

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

162.1. Summary of Module Globals

List of Global Functions

List of Global Variables

162.2. Global Functions

162.2.1. ActivateRandomPoolServersFunction

Add servers needed for random_pool_servers function into the current configuration.

Return value

  • void

162.2.2. AutoPackages

Return required packages for auto-installation

Return value

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

162.2.3. DeActivateRandomPoolServersFunction

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

Return value

  • void

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

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

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

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

162.2.8. GetCurrentLanguageCode

Read current language (RC_LANG from sysconfig)

Return value

  • string - two-letter language code (cs_CZ.UTF-8 -> CZ)

162.2.9. GetNtpServers

Get the list of known NTP servers

Return value

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

162.2.10. GetNtpServersByCountry

Get list of public NTP servers for a country

Function parameters

  • string country

  • boolean terse_output

Return value

  • list - of servers (usable as combo-box items)

162.2.11. GetUsedNtpServers

Function returns list of NTP servers used in the configuration.

Return value

  • list <string> - of servers

162.2.12. Import

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

Function parameters

  • map settings

Return value

  • boolean - True on success

162.2.13. IsRandomServersServiceEnabled

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

Return value

  • boolean - true if enabled

162.2.14. ProcessNtpConf

Read and parse /etc.ntp.conf

Return value

  • boolean - true on success

162.2.15. Read

Read all ntp-client settings

Return value

  • boolean - true on success

162.2.16. Summary

Create a textual summary and a list of unconfigured cards

Return value

  • string - summary of the current configuration

162.2.17. TestNtpServer

Test if specified NTP server answers

Function parameters

  • string server

  • symbol verbosity

Return value

  • boolean - true if NTP server answers properly

162.2.18. Write

Write all ntp-client settings

Return value

  • boolean - true on success

162.2.19. deleteSyncRecord

Delete specified synchronization record

Function parameters

  • integer index

Return value

  • boolean - true on success

162.2.20. findSyncRecord

Find index of synchronization record

Function parameters

  • string type

  • string address

Return value

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

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

162.2.22. selectSyncRecord

Select synchronization record

Function parameters

  • integer index

Return value

  • boolean - true on success

162.2.23. storeSyncRecord

Store currently sellected synchronization record

Return value

  • boolean - true on success

162.3. Global Variables

162.3.1. ad_controller

Active Directory controller

162.3.2. change_firewall

Should the firewall settings be changed?

162.3.3. config_dhcp

NTP servers will be configured via DHCP

162.3.4. firewall_services

ports in firewall to open

162.3.5. modified

Data was modified?

162.3.6. ntp_records

Read all ntp-client settings

162.3.7. original_config_dhcp

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

162.3.8. random_pool_servers

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

162.3.9. required_packages

Required packages

162.3.10. run_chroot

Should the daemon be started in chroot environment?

162.3.11. run_service

Should the daemon be started when system boots?

162.3.12. selected_index

Index of the currently sellected item

162.3.13. selected_record

The currently sellected item

162.3.14. service_name

Service name of the NTP daemon

162.3.15. write_only

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

162.4. Module Requirements

162.4.1. Module Imports

  • Directory
  • FileChanges
  • FileUtils
  • Language
  • Message
  • Mode
  • NetworkInterfaces
  • PackageSystem
  • Popup
  • Progress
  • Report
  • SLPAPI
  • Service
  • Stage
  • String
  • SuSEFirewall
  • Summary

162.4.2. Module Includes