pmcf 2.40.5 → 2.41.1
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
|
@@ -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
|
}
|
package/src/services/bind.mjs
CHANGED
|
@@ -300,20 +300,20 @@ export class BINDService extends ExtraSourceService {
|
|
|
300
300
|
|
|
301
301
|
yield this.generateZoneDefs(sources, packageData);
|
|
302
302
|
|
|
303
|
-
const
|
|
303
|
+
const outfacingZonesPackageDir = join(dir, "outfacingZones") + "/";
|
|
304
304
|
|
|
305
|
-
packageData.dir =
|
|
305
|
+
packageData.dir = outfacingZonesPackageDir;
|
|
306
306
|
packageData.properties = {
|
|
307
|
-
name: `named-zones-${name}-
|
|
308
|
-
description: `
|
|
309
|
-
replaces: [`named-foreign-zones-${name}`],
|
|
307
|
+
name: `named-zones-${name}-OUTFACING`,
|
|
308
|
+
description: `outfacing zone definitions for ${names}`,
|
|
309
|
+
replaces: [`named-foreign-zones-${name}`,`named-zones-${name}-FOREIGN`],
|
|
310
310
|
access: "private",
|
|
311
311
|
hooks: {}
|
|
312
312
|
};
|
|
313
313
|
|
|
314
314
|
packageData.sources = [
|
|
315
315
|
new FileContentProvider(
|
|
316
|
-
|
|
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.
|
|
330
|
+
yield this.generateOutfacingDefs(sources, packageData);
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
async
|
|
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.
|
|
338
|
+
configs.push(...this.outfacingZones(host, this.defaultRecords));
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
const
|
|
342
|
+
const outfacingZones = configs.map(c => c.zones).flat();
|
|
343
343
|
|
|
344
|
-
if (
|
|
344
|
+
if (outfacingZones.length) {
|
|
345
345
|
addHook(
|
|
346
346
|
packageData.properties.hooks,
|
|
347
347
|
"post_upgrade",
|
|
348
|
-
`/usr/bin/named-hostname-info ${
|
|
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
|
-
|
|
501
|
+
outfacingZones(host, records) {
|
|
502
502
|
return host.foreignDomainNames.map(domain => {
|
|
503
503
|
const zone = {
|
|
504
504
|
id: domain,
|
|
505
|
-
file: `
|
|
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
|
-
|
|
386
|
+
generateOutfacingDefs(sources: any, packageData: any): Promise<any>;
|
|
387
387
|
generateZoneDefs(sources: any, packageData: any): Promise<any>;
|
|
388
|
-
|
|
388
|
+
outfacingZones(host: any, records: any): any;
|
|
389
389
|
get defaultRecords(): {
|
|
390
390
|
type: any;
|
|
391
391
|
key: any;
|