pmcf 1.99.0 → 1.99.2
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 +1 -1
- package/src/base.mjs +4 -2
- package/src/host-utils.mjs +6 -1
- package/src/host.mjs +0 -11
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -239,8 +239,10 @@ export class Base {
|
|
|
239
239
|
|
|
240
240
|
forOwner(owner) {
|
|
241
241
|
if (this.owner !== owner) {
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
const newObject = Object.create(this);
|
|
243
|
+
|
|
244
|
+
newObject.owner = owner;
|
|
245
|
+
return newObject;
|
|
244
246
|
}
|
|
245
247
|
|
|
246
248
|
return this;
|
package/src/host-utils.mjs
CHANGED
|
@@ -25,6 +25,11 @@ export async function generateNetworkDefs(host, packageData) {
|
|
|
25
25
|
const networkDir = join(packageData.dir, "etc/systemd/network");
|
|
26
26
|
|
|
27
27
|
for (const ni of host.networkInterfaces.values()) {
|
|
28
|
+
switch (ni.kind) {
|
|
29
|
+
case "loopback":
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
if (ni.name !== "eth0" && ni.hwaddr) {
|
|
29
34
|
await writeLines(networkDir, `${ni.name}.link`, [
|
|
30
35
|
sectionLines("Match", { MACAddress: ni.hwaddr }),
|
|
@@ -46,7 +51,7 @@ export async function generateNetworkDefs(host, packageData) {
|
|
|
46
51
|
|
|
47
52
|
switch (ni.kind) {
|
|
48
53
|
case "ethernet":
|
|
49
|
-
case "
|
|
54
|
+
case "wlan":
|
|
50
55
|
const routeSectionExtra = ni.destination
|
|
51
56
|
? { Destination: ni.destination }
|
|
52
57
|
: { Gateway: ni.gatewayAddress };
|
package/src/host.mjs
CHANGED
|
@@ -501,17 +501,6 @@ export class NetworkInterface extends Base {
|
|
|
501
501
|
this.read(data, NetworkInterfaceTypeDefinition);
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
-
forOwner(owner) {
|
|
505
|
-
if (this.owner !== owner) {
|
|
506
|
-
const data = { name: this.name };
|
|
507
|
-
|
|
508
|
-
// @ts-ignore
|
|
509
|
-
return new this.constructor(owner, data);
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
return this;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
504
|
addSubnet(address) {
|
|
516
505
|
if (!this.network) {
|
|
517
506
|
if (!hasWellKnownSubnet(address)) {
|