author | Jiri Sasek <Jiri.Sasek@Oracle.COM> |
Thu, 30 Oct 2014 05:32:45 -0700 | |
changeset 2184 | 32c5cf5b5dc1 |
parent 1467 | f14b6c5766ca |
permissions | -rw-r--r-- |
1467
f14b6c5766ca
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 |
f14b6c5766ca
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 |
f14b6c5766ca
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 |
f14b6c5766ca
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. |
f14b6c5766ca
15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents:
172
diff
changeset
|
5 |
|
f14b6c5766ca
15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents:
172
diff
changeset
|
6 |
--- scripts/ntp-wait.in |
f14b6c5766ca
15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents:
172
diff
changeset
|
7 |
+++ scripts/ntp-wait.in |
172
093198acf7d4
7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff
changeset
|
8 |
@@ -20,8 +20,8 @@ |
093198acf7d4
7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff
changeset
|
9 |
while(<Q>) { |
093198acf7d4
7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff
changeset
|
10 |
chomp; |
093198acf7d4
7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff
changeset
|
11 |
# the first line should be similar to: |
093198acf7d4
7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff
changeset
|
12 |
- # associd=0 status=0645 leap_none, sync_ntp, ... |
1467
f14b6c5766ca
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) { |
172
093198acf7d4
7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff
changeset
|
14 |
+ # status=0645 leap_none, sync_ntp, ... |
1467
f14b6c5766ca
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) { |
172
093198acf7d4
7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff
changeset
|
16 |
my $status = $1; |
093198acf7d4
7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff
changeset
|
17 |
my $leap = $2; |
093198acf7d4
7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff
changeset
|
18 |
my $sync = $3; |