Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#505 closed defect (fixed)

ntpclient ifup script broken

Reported by: guettli@… Owned by: florian
Priority: normal Milestone: 0.9/rc6
Component: packages Version:
Keywords: Cc:

Description

The script /etc/hotplug.d/iface/10-ntpclient checks if ntpclient is already running:

ps x | grep '[n]tpclient'

But the script itself is called '10-ntpclient' that's why /usr/sbin/ntpclient gets never called.
I changed the grep to search for bin/[n]tpclient. And I made "ifup" the default ACTION. This
way you can easily call the script from the shell without to give to "ifup" argument.

###> diff -u 10-ntpclient-orig 10-ntpclient
--- 10-ntpclient-orig   2006-04-22 08:47:35.000000000 +0200
+++ 10-ntpclient        2006-04-22 08:56:57.000000000 +0200
@@ -1,8 +1,8 @@
 #!/bin/sh
 server=$(nvram get ntp_server)
-case "$ACTION" in
+case "${ACTION:-ifup}" in
        ifup)
-               ps x | grep '[n]tpclient' >&- || {
+               ps x | grep 'bin/[n]tpclient' >&- || {
                        route -n 2>&- | grep '^0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${server:-pool.ntp.org} &
                }
                ;;

Attachments (0)

Change History (4)

comment:1 Changed 12 years ago by anonymous

But that does'nt change anything, the problem is that the hotplug event "iface" is actualy not called. At least not at my router.

comment:2 Changed 12 years ago by florian

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

comment:3 Changed 12 years ago by florian

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in both kamikaze and whiterussian in [3809]

comment:4 Changed 12 years ago by mbm

  • Milestone set to 1.0-rc6

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.