pmcf 2.40.5 → 2.41.0

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.40.5",
3
+ "version": "2.41.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -18,7 +18,8 @@
18
18
  "dns",
19
19
  "kea",
20
20
  "keepalived",
21
- "systemd"
21
+ "systemd",
22
+ "iwd"
22
23
  ],
23
24
  "contributors": [
24
25
  {
@@ -51,7 +51,21 @@ export class WLANNetworkInterface extends EthernetNetworkInterface {
51
51
 
52
52
  async systemdDefinitions(packageData) {
53
53
  await super.systemdDefinitions(packageData);
54
+ const d = join(packageData.dir, "var/lib/iwd/");
55
+ await mkdir(d, { recursive: true });
54
56
 
57
+ /*
58
+ writeFile(
59
+ join(d, `${this.network.name}.psk`),
60
+ `[Security]
61
+ Passphrase=
62
+ SAE-PT-Group19=
63
+ SAE-PT-Group20=
64
+ `,
65
+ "utf8"
66
+ );
67
+ */
68
+ /*
55
69
  const d = join(packageData.dir, "etc/wpa_supplicant");
56
70
  await mkdir(d, { recursive: true });
57
71
  writeFile(
@@ -73,5 +87,7 @@ network={
73
87
  "post_install",
74
88
  `systemctl enable wpa_supplicant@${this.name}.service`
75
89
  );
90
+
91
+ */
76
92
  }
77
93
  }
@@ -300,12 +300,12 @@ export class BINDService extends ExtraSourceService {
300
300
 
301
301
  yield this.generateZoneDefs(sources, packageData);
302
302
 
303
- const foreignZonesPackageDir = join(dir, "foreignZones") + "/";
303
+ const outfacingZonesPackageDir = join(dir, "outfacingZones") + "/";
304
304
 
305
- packageData.dir = foreignZonesPackageDir;
305
+ packageData.dir = outfacingZonesPackageDir;
306
306
  packageData.properties = {
307
- name: `named-zones-${name}-FOREIGN`,
308
- description: `foreign zone definitions for ${names}`,
307
+ name: `named-zones-${name}-OUTFACING`,
308
+ description: `outfacing zone definitions for ${names}`,
309
309
  replaces: [`named-foreign-zones-${name}`],
310
310
  access: "private",
311
311
  hooks: {}
@@ -313,7 +313,7 @@ export class BINDService extends ExtraSourceService {
313
313
 
314
314
  packageData.sources = [
315
315
  new FileContentProvider(
316
- foreignZonesPackageDir,
316
+ outfacingZonesPackageDir,
317
317
  {
318
318
  mode: 0o644,
319
319
  owner: "named",
@@ -327,25 +327,25 @@ export class BINDService extends ExtraSourceService {
327
327
  )
328
328
  ];
329
329
 
330
- yield this.generateForeignDefs(sources, packageData);
330
+ yield this.generateOutfacingDefs(sources, packageData);
331
331
  }
332
332
 
333
- async generateForeignDefs(sources, packageData) {
333
+ async generateOutfacingDefs(sources, packageData) {
334
334
  const configs = [];
335
335
 
336
336
  for (const source of sources) {
337
337
  for (const host of source.hosts()) {
338
- configs.push(...this.foreignDomainZones(host, this.defaultRecords));
338
+ configs.push(...this.outfacingZones(host, this.defaultRecords));
339
339
  }
340
340
  }
341
341
 
342
- const foreignZones = configs.map(c => c.zones).flat();
342
+ const outfacingZones = configs.map(c => c.zones).flat();
343
343
 
344
- if (foreignZones.length) {
344
+ if (outfacingZones.length) {
345
345
  addHook(
346
346
  packageData.properties.hooks,
347
347
  "post_upgrade",
348
- `/usr/bin/named-hostname-info ${foreignZones
348
+ `/usr/bin/named-hostname-info ${outfacingZones
349
349
  .map(zone => zone.id)
350
350
  .join(" ")}|/usr/bin/named-hostname-update`
351
351
  );
@@ -498,11 +498,11 @@ export class BINDService extends ExtraSourceService {
498
498
  return packageData;
499
499
  }
500
500
 
501
- foreignDomainZones(host, records) {
501
+ outfacingZones(host, records) {
502
502
  return host.foreignDomainNames.map(domain => {
503
503
  const zone = {
504
504
  id: domain,
505
- file: `FOREIGN/${domain}.zone`,
505
+ file: `OUTFACING/${domain}.zone`,
506
506
  records: new Set(records)
507
507
  };
508
508
  const config = {
@@ -383,9 +383,9 @@ export class BINDService extends ExtraSourceService {
383
383
  set excludeInterfaceKinds(value: Set<any>);
384
384
  get excludeInterfaceKinds(): Set<any>;
385
385
  preparePackages(dir: any): AsyncGenerator<any, void, unknown>;
386
- generateForeignDefs(sources: any, packageData: any): Promise<any>;
386
+ generateOutfacingDefs(sources: any, packageData: any): Promise<any>;
387
387
  generateZoneDefs(sources: any, packageData: any): Promise<any>;
388
- foreignDomainZones(host: any, records: any): any;
388
+ outfacingZones(host: any, records: any): any;
389
389
  get defaultRecords(): {
390
390
  type: any;
391
391
  key: any;