components/ntp/patches/40-ntpwait.patch
author Mohana Rao Gorai <mohana.gorai@oracle.com>
Mon, 07 Apr 2014 02:12:01 -0700
branchs11u1-sru
changeset 3051 0bc80ce9fe0f
parent 2795 a8138e69c041
permissions -rw-r--r--
15993811 A help message type in ksh93 displays off by one
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2795
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     1
This change allows ntp-wait to work with more versions
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     2
of NTP, since the format changed slightly. It can be removed
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     3
at the next upgrade since there will be no possibility 
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     4
of running an older ntp with the old format.
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     5
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     6
--- scripts/ntp-wait.in
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     7
+++ scripts/ntp-wait.in
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     8
@@ -20,8 +20,8 @@
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     9
     while(<Q>) {
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
    10
       chomp;
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
    11
       # the first line should be similar to:
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
    12
-      # associd=0 status=0645 leap_none, sync_ntp, ...
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
    13
-      if (/^asso?c?id=0 status=(\S{4}) (\S+), (\S+),/i) {
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
    14
+      # status=0645 leap_none, sync_ntp, ...
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
    15
+      if (/status=(\S{4}) (\S+), (\S+),/i) {
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
    16
 	my $status = $1;
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
    17
 	my $leap = $2;
a8138e69c041 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
    18
 	my $sync = $3;