Modify

Opened 5 years ago

Last modified 5 years ago

#12449 assigned enhancement

Add hotplug events for ntp updates

Reported by: luizluca@… Owned by: jow
Priority: normal Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: ntp hotplug Cc:

Description

Hello,

ntpd have the ability to call a script on three events: periodic, stratum and step. This would be useful for other services that need to be notified when the clock was updated, or just started after ntp set the system clock (i.e. aiccu, kerberos, winbind).

This is a simple patch that might need improvements. I don't know how much doc should I write inside the scripts as comments as disk is a limited resource. Also, there might be a better path for ntpd-hotplug script.

If accepted, I might add a section on hotplug wiki page

This is an example of a ntp hotplug script:

#!/bin/sh
#
# ACTION=(periodic stratum step)
#
case "$ACTION" in
stratum|step)
	/etc/init.d/myservice start
;;
esac

PS: I'm aware of most of aiccu discussion that resulted into the deletion of openwrt patch and scripts. I'm working on my "own-solution" for it but ntp hotplug is a general improvement and resource cheap.

Attachments (2)

patch-ntp-add_hotplug_calls_on_ntp_updates.patch (1.2 KB) - added by luizluca@… 5 years ago.
[PATCH] Add hotplug calls on ntp updates
patch-ntp-add_hotplug_calls_on_ntp_updates.2.patch (1.2 KB) - added by luizluca@… 5 years ago.
[PATCH] Add hotplug calls on ntp updates v2

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by luizluca@…

[PATCH] Add hotplug calls on ntp updates

Changed 5 years ago by luizluca@…

[PATCH] Add hotplug calls on ntp updates v2

comment:1 Changed 5 years ago by florian

  • Owner changed from developers to jow
  • Status changed from new to assigned

Add Comment

Modify Ticket

Action
as assigned .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.