pmcf 1.98.1 → 1.98.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/dhcp.mjs +3 -6
- package/src/host.mjs +7 -10
- package/types/host.d.mts +1 -0
package/package.json
CHANGED
package/src/dhcp.mjs
CHANGED
|
@@ -46,6 +46,9 @@ export class DHCPService extends Base {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
const commonConfig = {
|
|
49
|
+
"interfaces-config": {
|
|
50
|
+
interfaces: ["end0"]
|
|
51
|
+
},
|
|
49
52
|
"lease-database": {
|
|
50
53
|
type: "memfile",
|
|
51
54
|
"lfc-interval": 3600
|
|
@@ -148,9 +151,6 @@ export class DHCPService extends Base {
|
|
|
148
151
|
const dhcp4 = {
|
|
149
152
|
Dhcp4: {
|
|
150
153
|
...commonConfig,
|
|
151
|
-
"interfaces-config": {
|
|
152
|
-
interfaces: ["end0"]
|
|
153
|
-
},
|
|
154
154
|
"control-socket": {
|
|
155
155
|
"socket-type": "unix",
|
|
156
156
|
"socket-name": "/run/kea/4-ctrl-socket"
|
|
@@ -196,9 +196,6 @@ export class DHCPService extends Base {
|
|
|
196
196
|
const dhcp6 = {
|
|
197
197
|
Dhcp6: {
|
|
198
198
|
...commonConfig,
|
|
199
|
-
"interfaces-config": {
|
|
200
|
-
interfaces: []
|
|
201
|
-
},
|
|
202
199
|
"control-socket": {
|
|
203
200
|
"socket-type": "unix",
|
|
204
201
|
"socket-name": "/run/kea/6-ctrl-socket"
|
package/src/host.mjs
CHANGED
|
@@ -103,22 +103,18 @@ export class Host extends Base {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
_applyExtends(host) {
|
|
106
|
-
/* this.depends = host.depends;
|
|
107
|
-
this.provides = host.provides;
|
|
108
|
-
this.replaces = host.replaces;
|
|
109
|
-
*/
|
|
110
106
|
for (const service of host.services) {
|
|
111
107
|
this.services = service.forOwner(this);
|
|
112
108
|
}
|
|
113
109
|
|
|
114
110
|
for (const [name, ni] of host.networkInterfaces) {
|
|
115
|
-
|
|
116
|
-
if (present) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
this.info("CLONE NI", name);
|
|
120
|
-
this.#networkInterfaces.set(name, ni.forOwner(this));
|
|
111
|
+
let present = this.#networkInterfaces.get(name);
|
|
112
|
+
if (!present) {
|
|
113
|
+
present = ni.forOwner(this);
|
|
114
|
+
this.#networkInterfaces.set(name, present);
|
|
121
115
|
}
|
|
116
|
+
|
|
117
|
+
present.extends.push(ni);
|
|
122
118
|
}
|
|
123
119
|
}
|
|
124
120
|
|
|
@@ -496,6 +492,7 @@ export class NetworkInterface extends Base {
|
|
|
496
492
|
#network;
|
|
497
493
|
#kind;
|
|
498
494
|
#hostName;
|
|
495
|
+
extends = [];
|
|
499
496
|
arpbridge;
|
|
500
497
|
hwaddr;
|
|
501
498
|
|