pmcf 2.71.10 → 2.71.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "2.71.10",
3
+ "version": "2.71.11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,7 +1,11 @@
1
1
  import { join } from "node:path";
2
2
  import { FileContentProvider } from "npm-pkgbuild";
3
3
  import { addType } from "../types.mjs";
4
- import { ServiceTypeDefinition, serviceEndpoints } from "../service.mjs";
4
+ import {
5
+ Service,
6
+ ServiceTypeDefinition,
7
+ serviceEndpoints
8
+ } from "../service.mjs";
5
9
  import {
6
10
  ExtraSourceService,
7
11
  ExtraSourceServiceTypeDefinition
@@ -53,6 +57,9 @@ export class ChronyService extends ExtraSourceService {
53
57
 
54
58
  constructor(owner, data) {
55
59
  super(owner, data);
60
+
61
+ this._extends.push(new Service(owner, { name: this.name, type: "ntp" }));
62
+
56
63
  this.read(data, ChronyServiceTypeDefinition);
57
64
 
58
65
  this._systemd = "chronyd.service";
@@ -88,12 +95,12 @@ export class ChronyService extends ExtraSourceService {
88
95
  priority: ">=200"
89
96
  },
90
97
  endpoints: e =>
91
- e.service.host !== host && e.networkInterface.kind !== "loopback",
98
+ e.type === "ntp" &&
99
+ e.service.host !== host &&
100
+ e.networkInterface?.kind !== "loopback",
92
101
 
93
102
  select: endpoint =>
94
- `${endpoint.isPool ? "pool" : "server"} ${
95
- endpoint.domainName
96
- } iburst`,
103
+ `${endpoint.isPool ? "pool" : "server"} ${endpoint.address} iburst`,
97
104
 
98
105
  limit: 7
99
106
  }),
@@ -38,23 +38,24 @@ export class SystemdTimesyncdService extends ExtraSourceService {
38
38
  }
39
39
 
40
40
  systemdConfigs(name) {
41
+ const options = priority => {
42
+ return {
43
+ services: { types: "ntp", priority },
44
+ endpoints: e => e.networkInterface?.kind !== "loopback",
45
+ select: endpoint => endpoint.address,
46
+ join: " ",
47
+ limit: 2
48
+ };
49
+ };
50
+
41
51
  return {
42
52
  serviceName: "systemd-timesyncd.service",
43
53
  configFileName: `etc/systemd/timesyncd.conf.d/${name}.conf`,
44
54
  content: [
45
55
  "Time",
46
56
  {
47
- NTP: serviceEndpoints(this, {
48
- services: {
49
- types: "ntp",
50
- priority: "[200:399]"
51
- },
52
- endpoints: endpoint =>
53
- endpoint.networkInterface.kind !== "loopback",
54
- select: endpoint => endpoint.domainName,
55
- limit: 2,
56
- join: " "
57
- })
57
+ NTP: serviceEndpoints(this, options("[300:399]")),
58
+ FallbackNTP: serviceEndpoints(this, options("[100:199]"))
58
59
  }
59
60
  ]
60
61
  };
@@ -260,6 +260,7 @@ export class SystemdTimesyncdService extends ExtraSourceService {
260
260
  configFileName: string;
261
261
  content: (string | {
262
262
  NTP: any;
263
+ FallbackNTP: any;
263
264
  })[];
264
265
  };
265
266
  }