penguins-eggs 9.0.25 → 9.0.31

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.
Files changed (38) hide show
  1. package/README.md +16 -16
  2. package/addons/telos/theme/applications/install-debian.desktop +28 -0
  3. package/addons/telos/theme/artwork/install-debian.png +0 -0
  4. package/addons/telos/theme/calamares/branding/banner.png +0 -0
  5. package/addons/telos/theme/calamares/branding/branding.desc +25 -0
  6. package/addons/telos/theme/calamares/branding/show.qml +51 -0
  7. package/addons/telos/theme/calamares/branding/slide1.png +0 -0
  8. package/addons/telos/theme/calamares/branding/telos-logo.png +0 -0
  9. package/addons/telos/theme/calamares/branding/welcome.png +0 -0
  10. package/addons/telos/theme/calamares/modules/partition.yml +233 -0
  11. package/addons/telos/theme/livecd/grub.theme.cfg +43 -0
  12. package/addons/telos/theme/livecd/isolinux.theme.cfg +45 -0
  13. package/addons/telos/theme/livecd/splash.png +0 -0
  14. package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +57 -38
  15. package/lib/classes/daddy.js +5 -5
  16. package/lib/classes/krill_install.d.ts +7 -1
  17. package/lib/classes/krill_install.js +258 -302
  18. package/lib/classes/krill_prepare.js +31 -12
  19. package/lib/classes/ovary.d.ts +28 -27
  20. package/lib/classes/ovary.js +309 -343
  21. package/lib/classes/systemctl.d.ts +36 -7
  22. package/lib/classes/systemctl.js +63 -28
  23. package/lib/classes/utils.d.ts +8 -0
  24. package/lib/classes/utils.js +44 -15
  25. package/lib/classes/yolk.d.ts +6 -5
  26. package/lib/classes/yolk.js +30 -29
  27. package/lib/commands/produce.js +2 -2
  28. package/lib/components/elements/information.js +17 -1
  29. package/lib/lib/select_installation_device.js +1 -0
  30. package/oclif.manifest.json +1 -1
  31. package/package.json +4 -4
  32. package/scripts/bros/waydroid-helper.sh +1 -1
  33. package/scripts/{not-used/install-eggs-ppa.sh → install-eggs-ppa.sh} +1 -0
  34. package/scripts/mom-cli.sh +1 -1
  35. package/scripts/pve-live.sh +2 -6
  36. package/scripts/not-used/eggs-cleanup.sh +0 -7
  37. package/scripts/not-used/mkinitramfs +0 -469
  38. package/scripts/update-initramfs +0 -94
@@ -22,7 +22,6 @@ const pacman_1 = (0, tslib_1.__importDefault)(require("./pacman"));
22
22
  const installer_1 = require("./incubation/installer");
23
23
  const xdg_1 = (0, tslib_1.__importDefault)(require("./xdg"));
24
24
  const distro_1 = (0, tslib_1.__importDefault)(require("./distro"));
25
- const child_process_1 = require("child_process");
26
25
  const utils_2 = require("../lib/utils");
27
26
  /**
28
27
  * hatching: installazione o cova!!!
@@ -35,6 +34,7 @@ class Hatching {
35
34
  this.installer = {};
36
35
  this.installTarget = '/tmp/calamares-krill-root';
37
36
  this.verbose = false;
37
+ this.echo = {};
38
38
  this.efi = false;
39
39
  this.devices = {};
40
40
  this.users = {};
@@ -86,34 +86,35 @@ class Hatching {
86
86
  */
87
87
  async install(verbose = false) {
88
88
  this.verbose = verbose;
89
+ this.echo = utils_1.default.setEcho(this.verbose);
90
+ if (this.verbose) {
91
+ this.toNull = '';
92
+ }
93
+ // start
89
94
  await this.settings.load();
90
95
  // partition
91
96
  let percent = 0.0;
92
97
  let message = "";
93
98
  let isPartitioned = false;
94
99
  message = "Creating partitions";
95
- percent = 0.00;
100
+ percent = 0.01;
96
101
  try {
97
102
  redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
98
103
  isPartitioned = await this.partition();
99
104
  }
100
105
  catch (error) {
101
- message += JSON.stringify(error);
102
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
103
- await checkIt(message);
106
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
104
107
  }
105
108
  if (isPartitioned) {
106
109
  // formatting
107
110
  message = "Formatting file system ";
108
- percent = 0.01;
111
+ percent = 0.02;
109
112
  try {
110
113
  redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
111
114
  await this.mkfs();
112
115
  }
113
116
  catch (error) {
114
- message += JSON.stringify(error);
115
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
116
- await checkIt(message);
117
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
117
118
  }
118
119
  // mountFs
119
120
  message = "Mounting target file system ";
@@ -123,9 +124,7 @@ class Hatching {
123
124
  await this.mountFs();
124
125
  }
125
126
  catch (error) {
126
- message += JSON.stringify(error);
127
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
128
- await checkIt(message);
127
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
129
128
  }
130
129
  // mountVfs
131
130
  message = "Mounting on target VFS ";
@@ -135,9 +134,7 @@ class Hatching {
135
134
  await this.mountVfs();
136
135
  }
137
136
  catch (error) {
138
- message += JSON.stringify(error);
139
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
140
- await checkIt(message);
137
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
141
138
  }
142
139
  // unpackfs
143
140
  message = "Unpacking filesystem ";
@@ -147,9 +144,7 @@ class Hatching {
147
144
  await this.unpackfs();
148
145
  }
149
146
  catch (error) {
150
- message += JSON.stringify(error);
151
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
152
- await checkIt(message);
147
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
153
148
  }
154
149
  /**
155
150
  * IF RESTORE USERS DATA
@@ -160,12 +155,10 @@ class Hatching {
160
155
  percent = 0.37;
161
156
  try {
162
157
  redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
163
- await (0, utils_2.exec)('eggs syncfrom --rootdir /tmp/calamares-krill-root/');
158
+ await (0, utils_2.exec)('eggs syncfrom --rootdir /tmp/calamares-krill-root/', this.echo);
164
159
  }
165
160
  catch (error) {
166
- message += JSON.stringify(error);
167
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
168
- await checkIt(message);
161
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
169
162
  }
170
163
  }
171
164
  // sources-yolk
@@ -176,9 +169,7 @@ class Hatching {
176
169
  await this.execCalamaresModule('sources-yolk');
177
170
  }
178
171
  catch (error) {
179
- message += JSON.stringify(error);
180
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
181
- await checkIt(message);
172
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
182
173
  }
183
174
  // machineid
184
175
  message = 'machineid';
@@ -188,9 +179,7 @@ class Hatching {
188
179
  await this.machineId();
189
180
  }
190
181
  catch (error) {
191
- message += JSON.stringify(error);
192
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
193
- await checkIt(message);
182
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
194
183
  }
195
184
  // timezone
196
185
  message = "Setting time zone ";
@@ -200,9 +189,7 @@ class Hatching {
200
189
  await this.setTimezone();
201
190
  }
202
191
  catch (error) {
203
- message += JSON.stringify(error);
204
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
205
- await checkIt(message);
192
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
206
193
  }
207
194
  // fstab
208
195
  message = "Creating fstab ";
@@ -212,9 +199,7 @@ class Hatching {
212
199
  await this.fstab(this.partitions.installationDevice);
213
200
  }
214
201
  catch (error) {
215
- message += JSON.stringify(error);
216
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
217
- await checkIt(message);
202
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
218
203
  }
219
204
  // keyboard
220
205
  message = "settings keyboard ";
@@ -223,9 +208,7 @@ class Hatching {
223
208
  this.setKeyboard();
224
209
  }
225
210
  catch (error) {
226
- message += JSON.stringify(error);
227
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
228
- await checkIt(message);
211
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
229
212
  }
230
213
  // networkcfg
231
214
  message = "networkcfg";
@@ -234,9 +217,7 @@ class Hatching {
234
217
  this.networkcfg();
235
218
  }
236
219
  catch (error) {
237
- message += JSON.stringify(error);
238
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
239
- await checkIt(message);
220
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
240
221
  }
241
222
  // hostname
242
223
  message = "Create hostname ";
@@ -246,9 +227,7 @@ class Hatching {
246
227
  await this.hostname();
247
228
  }
248
229
  catch (error) {
249
- message += JSON.stringify(error);
250
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
251
- await checkIt(message);
230
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
252
231
  }
253
232
  // hosts
254
233
  message = "Creating hosts ";
@@ -258,9 +237,7 @@ class Hatching {
258
237
  await this.hosts();
259
238
  }
260
239
  catch (error) {
261
- message += JSON.stringify(error);
262
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
263
- await checkIt(message);
240
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
264
241
  }
265
242
  // bootloader-config
266
243
  message = "bootloader-config ";
@@ -270,9 +247,7 @@ class Hatching {
270
247
  await this.execCalamaresModule('bootloader-config');
271
248
  }
272
249
  catch (error) {
273
- message += JSON.stringify(error);
274
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
275
- await checkIt(message);
250
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
276
251
  }
277
252
  // grubcfg
278
253
  message = "grubcfg ";
@@ -282,9 +257,7 @@ class Hatching {
282
257
  await this.grubcfg();
283
258
  }
284
259
  catch (error) {
285
- message += JSON.stringify(error);
286
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
287
- await checkIt(message);
260
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
288
261
  }
289
262
  // bootloader
290
263
  message = "bootloader ";
@@ -294,9 +267,7 @@ class Hatching {
294
267
  await this.bootloader();
295
268
  }
296
269
  catch (error) {
297
- message += JSON.stringify(error);
298
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
299
- await checkIt(message);
270
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
300
271
  }
301
272
  // initramfsCfg
302
273
  message = "initramfs configure";
@@ -306,9 +277,7 @@ class Hatching {
306
277
  this.initramfsCfg(this.partitions.installationDevice);
307
278
  }
308
279
  catch (error) {
309
- message += JSON.stringify(error);
310
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
311
- await checkIt(message);
280
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
312
281
  }
313
282
  // initramfs
314
283
  message = "initramfs ";
@@ -318,9 +287,7 @@ class Hatching {
318
287
  await this.initramfs();
319
288
  }
320
289
  catch (error) {
321
- message += JSON.stringify(error);
322
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
323
- await checkIt(message);
290
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
324
291
  }
325
292
  // delLiveUser
326
293
  message = "Removing user live ";
@@ -330,9 +297,7 @@ class Hatching {
330
297
  await this.delLiveUser();
331
298
  }
332
299
  catch (error) {
333
- message += JSON.stringify(error);
334
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
335
- await checkIt(message);
300
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
336
301
  }
337
302
  /**
338
303
  * if NOT restore users data
@@ -346,9 +311,7 @@ class Hatching {
346
311
  await this.addUser(this.users.name, this.users.password, this.users.fullname, '', '', '');
347
312
  }
348
313
  catch (error) {
349
- message += JSON.stringify(error);
350
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
351
- await checkIt(message);
314
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
352
315
  }
353
316
  // changePassword
354
317
  message = "adding user password ";
@@ -358,9 +321,7 @@ class Hatching {
358
321
  await this.changePassword('root', this.users.rootPassword);
359
322
  }
360
323
  catch (error) {
361
- message += JSON.stringify(error);
362
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
363
- await checkIt(message);
324
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
364
325
  }
365
326
  }
366
327
  // autologin
@@ -372,9 +333,7 @@ class Hatching {
372
333
  redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
373
334
  }
374
335
  catch (error) {
375
- message += JSON.stringify(error);
376
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
377
- await checkIt(message);
336
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
378
337
  }
379
338
  }
380
339
  else { // autologin CLI remove DEFAULT
@@ -385,9 +344,7 @@ class Hatching {
385
344
  await cliAutologin.remove(this.installTarget);
386
345
  }
387
346
  catch (error) {
388
- message += JSON.stringify(error);
389
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
390
- await checkIt(message);
347
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
391
348
  }
392
349
  }
393
350
  // cleanup
@@ -401,9 +358,7 @@ class Hatching {
401
358
  await this.removeInstaller();
402
359
  }
403
360
  catch (error) {
404
- message += JSON.stringify(error);
405
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
406
- await checkIt(message);
361
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
407
362
  }
408
363
  // sourcesYolkUmount
409
364
  message = "sources yolk unmount";
@@ -413,9 +368,7 @@ class Hatching {
413
368
  await this.execCalamaresModule('sources-yolk-unmount');
414
369
  }
415
370
  catch (error) {
416
- message += JSON.stringify(error);
417
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
418
- await checkIt(message);
371
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
419
372
  }
420
373
  // umountVfs
421
374
  message = "umount VFS";
@@ -425,9 +378,7 @@ class Hatching {
425
378
  await this.umountVfs();
426
379
  }
427
380
  catch (error) {
428
- message += JSON.stringify(error);
429
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
430
- await checkIt(message);
381
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
431
382
  }
432
383
  // umount
433
384
  message = "umount";
@@ -437,21 +388,17 @@ class Hatching {
437
388
  await this.umountFs();
438
389
  }
439
390
  catch (error) {
440
- message += JSON.stringify(error);
441
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
442
- await checkIt(message);
391
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
443
392
  }
444
393
  // finished
445
394
  message = "finished";
446
395
  percent = 100.0;
447
396
  try {
448
397
  redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
449
- this.finished();
398
+ await this.finished();
450
399
  }
451
400
  catch (error) {
452
- message += JSON.stringify(error);
453
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
454
- await checkIt(message);
401
+ await utils_1.default.pressKeyToExit(JSON.stringify(error));
455
402
  }
456
403
  }
457
404
  }
@@ -459,13 +406,12 @@ class Hatching {
459
406
  * setTimezone
460
407
  */
461
408
  async setTimezone() {
462
- const echo = { echo: false, ignore: false };
463
409
  if (fs_1.default.existsSync('/etc/localtime')) {
464
410
  const cmd = `chroot ${this.installTarget} unlink /etc/localtime`;
465
- await (0, utils_2.exec)(cmd, echo);
411
+ await (0, utils_2.exec)(cmd, this.echo);
466
412
  }
467
413
  const cmd = `chroot ${this.installTarget} ln -sf /usr/share/zoneinfo/${this.region}/${this.zone} /etc/localtime`;
468
- await (0, utils_2.exec)(cmd, echo);
414
+ await (0, utils_2.exec)(cmd, this.echo);
469
415
  }
470
416
  /**
471
417
  *
@@ -477,16 +423,15 @@ class Hatching {
477
423
  * @param homePhone
478
424
  */
479
425
  async addUser(name = 'live', password = 'evolution', fullName = '', roomNumber = '', workPhone = '', homePhone = '') {
480
- const echo = { echo: false, ignore: false };
481
426
  const cmd = `chroot ${this.installTarget} \
482
427
  adduser ${name} \
483
428
  --home /home/${name} \
484
429
  --shell /bin/bash \
485
430
  --disabled-password \
486
- --gecos "${fullName},${roomNumber},${workPhone},${homePhone}"`;
487
- await (0, utils_2.exec)(cmd, echo);
488
- await (0, utils_2.exec)(`echo ${name}:${password} | chroot ${this.installTarget} chpasswd `, echo);
489
- await (0, utils_2.exec)(`chroot ${this.installTarget} usermod -aG sudo ${name}`, echo);
431
+ --gecos "${fullName},${roomNumber},${workPhone},${homePhone}" ${this.toNull}`;
432
+ await (0, utils_2.exec)(cmd, this.echo);
433
+ await (0, utils_2.exec)(`echo ${name}:${password} | chroot ${this.installTarget} chpasswd ${this.toNull}`, this.echo);
434
+ await (0, utils_2.exec)(`chroot ${this.installTarget} usermod -aG sudo ${name} ${this.toNull}`, this.echo);
490
435
  }
491
436
  /**
492
437
  * changePassword
@@ -494,20 +439,18 @@ adduser ${name} \
494
439
  * @param newPassword
495
440
  */
496
441
  async changePassword(name = 'live', newPassword = 'evolution') {
497
- const echo = utils_1.default.setEcho(this.verbose);
498
- const cmd = `echo ${name}:${newPassword} | chroot ${this.installTarget} chpasswd `;
499
- await (0, utils_2.exec)(cmd, echo);
442
+ const cmd = `echo ${name}:${newPassword} | chroot ${this.installTarget} chpasswd ${this.toNull}`;
443
+ await (0, utils_2.exec)(cmd, this.echo);
500
444
  }
501
445
  /**
502
446
  * delUser
503
447
  * va corretto con users.conf di calamares
504
448
  */
505
449
  async delLiveUser() {
506
- const echo = { echo: false, ignore: false };
507
450
  if (utils_1.default.isLive()) {
508
451
  const user = this.settings.config.user_opt;
509
- const cmd = `chroot ${this.installTarget} deluser --remove-home ${user}`;
510
- await (0, utils_2.exec)(cmd, echo);
452
+ const cmd = `chroot ${this.installTarget} deluser --remove-home ${user} ${this.toNull}`;
453
+ await (0, utils_2.exec)(cmd, this.echo);
511
454
  }
512
455
  }
513
456
  /**
@@ -516,9 +459,9 @@ adduser ${name} \
516
459
  * @param options
517
460
  */
518
461
  async bootloader() {
519
- await (0, utils_2.exec)('chroot ' + this.installTarget + ' grub-install ' + this.partitions.installationDevice); // + this.toNull
520
- await (0, utils_2.exec)('chroot ' + this.installTarget + ' update-grub'); // + this.toNull
521
- await (0, utils_2.exec)('sleep 1'); // + this.toNull
462
+ await (0, utils_2.exec)(`chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`, this.echo);
463
+ await (0, utils_2.exec)(`chroot ${this.installTarget} update-grub ${this.toNull}`, this.echo);
464
+ await (0, utils_2.exec)(`sleep 1 ${this.toNull}`, this.echo);
522
465
  }
523
466
  /**
524
467
  *
@@ -534,15 +477,13 @@ adduser ${name} \
534
477
  text += 'RESUME=UUID=' + utils_1.default.uuid(this.devices.swap.name);
535
478
  }
536
479
  utils_1.default.write(file, text);
537
- //
538
480
  }
539
481
  /**
540
482
  * initramfs()
541
483
  */
542
484
  async initramfs() {
543
- const echo = { echo: false, ignore: false };
544
- await (0, utils_2.exec)('chroot ' + this.installTarget + ' mkinitramfs -o ~/initrd.img-$(uname -r)', echo);
545
- await (0, utils_2.exec)('chroot ' + this.installTarget + ' mv ~/initrd.img-$(uname -r) /boot', echo);
485
+ await (0, utils_2.exec)(`chroot ${this.installTarget} mkinitramfs -o ~/initrd.img-$(uname -r) ${this.toNull}`, this.echo);
486
+ await (0, utils_2.exec)(`chroot ${this.installTarget} mv ~/initrd.img-$(uname -r) /boot ${this.toNull}`, this.echo);
546
487
  }
547
488
  /**
548
489
  * fstab()
@@ -628,14 +569,16 @@ adduser ${name} \
628
569
  content += '\n';
629
570
  content += 'BACKSPACE="guess"\n';
630
571
  utils_1.default.write(file, content);
631
- // lancio setupcon in chroot per salvare la tastiera
632
- const echo = { echo: false, ignore: false };
633
- const cmd = 'chroot ' + this.installTarget + ' ' + 'setupcon ' + this.toNull;
572
+ /**
573
+ * set keyboard
574
+ */
575
+ const cmd = `chroot ${this.installTarget} setupcon ${this.toNull}`;
634
576
  try {
635
- await (0, utils_2.exec)(cmd, echo);
577
+ await (0, utils_2.exec)(cmd, this.echo);
636
578
  }
637
579
  catch (error) {
638
580
  console.log(error);
581
+ utils_1.default.pressKeyToExit(cmd, true);
639
582
  }
640
583
  }
641
584
  /**
@@ -674,10 +617,9 @@ adduser ${name} \
674
617
  * hostname
675
618
  */
676
619
  async hostname() {
677
- const echo = { echo: false, ignore: false };
678
620
  const file = this.installTarget + '/etc/hostname';
679
621
  const text = this.users.hostname;
680
- await (0, utils_2.exec)(`rm ${file} `, echo);
622
+ await (0, utils_2.exec)(`rm ${file} `, this.echo);
681
623
  fs_1.default.writeFileSync(file, text);
682
624
  }
683
625
  /**
@@ -731,15 +673,14 @@ adduser ${name} \
731
673
  * unpackfs
732
674
  */
733
675
  async unpackfs() {
734
- const echo = utils_1.default.setEcho(this.verbose);
735
- const cmd = 'unsquashfs -d ' + this.installTarget + ' -f ' + this.distro.mountpointSquashFs;
736
- await (0, utils_2.exec)(cmd);
676
+ const echoYes = utils_1.default.setEcho(true);
677
+ const cmd = `unsquashfs -d ${this.installTarget} -f ${this.distro.mountpointSquashFs}`;
678
+ await (0, utils_2.exec)(cmd, echoYes);
737
679
  }
738
680
  /**
739
681
  * syncfs
740
682
  */
741
683
  async syncfs() {
742
- const echo = utils_1.default.setEcho(this.verbose);
743
684
  let cmd = '';
744
685
  let f = '';
745
686
  f += ' --filter="- /cdrom/*"';
@@ -783,66 +724,73 @@ adduser ${name} \
783
724
  --delete -excluded \
784
725
  --info=progress2 \
785
726
  ${f} \
786
- / ${this.installTarget}`;
787
- await (0, utils_2.exec)(cmd.trim());
727
+ / ${this.installTarget} ${this.toNull}`;
728
+ await (0, utils_2.exec)(cmd.trim(), this.echo);
788
729
  }
789
730
  /**
790
731
  * mkfs
791
732
  */
792
733
  async mkfs() {
793
- const echo = { echo: false, ignore: false };
794
734
  const result = true;
795
735
  if (this.efi) {
796
- await (0, utils_2.exec)(`mkdosfs -F 32 -I ${this.devices.efi.name}` + this.toNull, echo);
736
+ await (0, utils_2.exec)(`mkdosfs -F 32 -I ${this.devices.efi.name} ${this.toNull}`, this.echo);
797
737
  }
798
738
  if (this.devices.boot.name !== 'none') {
799
- // controllare se non vada !== undefined
800
739
  if (this.devices.boot.fsType === undefined) {
801
740
  this.devices.boot.fsType = `ext2`;
802
741
  this.devices.boot.mountPoint = '/boot';
803
742
  }
804
- await (0, utils_2.exec)('mke2fs -Ft ' + this.devices.boot.fsType + ' ' + this.devices.boot.name + this.toNull, echo);
743
+ await (0, utils_2.exec)(`mke2fs -Ft ${this.devices.boot.fsType} ${this.devices.boot.name} ${this.toNull}`, this.echo);
805
744
  }
806
745
  if (this.devices.root.name !== 'none') {
807
- await (0, utils_2.exec)('mke2fs -Ft ' + this.devices.root.fsType + ' ' + this.devices.root.name + this.toNull, echo);
746
+ await (0, utils_2.exec)(`mke2fs -Ft ${this.devices.root.fsType} ${this.devices.root.name} ${this.toNull}`, this.echo);
808
747
  }
809
748
  if (this.devices.data.name !== 'none') {
810
- await (0, utils_2.exec)('mke2fs -Ft ' + this.devices.data.fsType + ' ' + this.devices.data.name + this.toNull, echo);
749
+ await (0, utils_2.exec)(`mke2fs -Ft ${this.devices.data.fsType} ${this.devices.data.name} ${this.toNull}`, this.echo);
811
750
  }
812
751
  if (this.devices.swap.name !== 'none') {
813
- await (0, utils_2.exec)('mkswap ' + this.devices.swap.name + this.toNull, echo);
752
+ await (0, utils_2.exec)(`mkswap ${this.devices.swap.name} ${this.toNull}`, this.echo);
814
753
  }
815
754
  return result;
816
755
  }
756
+ /**
757
+ *
758
+ * @param device
759
+ */
760
+ async ifMountedDismount(device = '') {
761
+ if ((await (0, utils_2.exec)(`findmnt -rno SOURCE ${device}`)).data.trim() === device) {
762
+ await (0, utils_2.exec)(`umount ${device} ${this.toNull}`, this.echo);
763
+ await (0, utils_2.exec)('sleep 1', this.echo);
764
+ }
765
+ }
817
766
  /**
818
767
  * mount
819
768
  */
820
769
  async mountFs() {
821
- const echo = { echo: false, ignore: false };
822
770
  if (!fs_1.default.existsSync(this.installTarget)) {
823
- await (0, utils_2.exec)(`mkdir ${this.installTarget}` + this.toNull, echo);
771
+ await (0, utils_2.exec)(`mkdir ${this.installTarget} ${this.toNull}`, this.echo);
824
772
  }
825
773
  // root
826
- await (0, utils_2.exec)(`mount ${this.devices.root.name} ${this.installTarget}${this.devices.root.mountPoint}` + this.toNull, echo);
827
- await (0, utils_2.exec)(`tune2fs -c 0 -i 0 ${this.devices.root.name}` + this.toNull, echo);
828
- await (0, utils_2.exec)(`rm -rf ${this.installTarget}/lost+found` + this.toNull, echo);
774
+ await (0, utils_2.exec)(`mount ${this.devices.root.name} ${this.installTarget}${this.devices.root.mountPoint} ${this.toNull}`, this.echo);
775
+ await (0, utils_2.exec)(`tune2fs -c 0 -i 0 ${this.devices.root.name} ${this.toNull}`, this.echo);
776
+ await (0, utils_2.exec)(`rm -rf ${this.installTarget}/lost+found ${this.toNull}`, this.echo);
829
777
  // boot
830
778
  if (this.devices.boot.name !== `none`) {
831
- await (0, utils_2.exec)(`mkdir ${this.installTarget}/boot -p` + this.toNull);
832
- await (0, utils_2.exec)(`mount ${this.devices.boot.name} ${this.installTarget}${this.devices.boot.mountPoint}` + this.toNull, echo);
833
- await (0, utils_2.exec)(`tune2fs -c 0 -i 0 ${this.devices.boot.name}` + this.toNull, echo);
779
+ await (0, utils_2.exec)(`mkdir ${this.installTarget}/boot -p ${this.toNull}`, this.echo);
780
+ await (0, utils_2.exec)(`mount ${this.devices.boot.name} ${this.installTarget}${this.devices.boot.mountPoint} ${this.toNull}`, this.echo);
781
+ await (0, utils_2.exec)(`tune2fs -c 0 -i 0 ${this.devices.boot.name} ${this.toNull}`, this.echo);
834
782
  }
835
783
  // data
836
784
  if (this.devices.data.name !== `none`) {
837
- await (0, utils_2.exec)(`mkdir ${this.installTarget}${this.devices.data.mountPoint} -p` + this.toNull);
838
- await (0, utils_2.exec)(`mount ${this.devices.data.name} ${this.installTarget}${this.devices.data.mountPoint}` + this.toNull, echo);
839
- await (0, utils_2.exec)(`tune2fs -c 0 -i 0 ${this.devices.data.name}` + this.toNull, echo);
785
+ await (0, utils_2.exec)(`mkdir ${this.installTarget}${this.devices.data.mountPoint} -p ${this.toNull}`, this.echo);
786
+ await (0, utils_2.exec)(`mount ${this.devices.data.name} ${this.installTarget}${this.devices.data.mountPoint} ${this.toNull}`, this.echo);
787
+ await (0, utils_2.exec)(`tune2fs -c 0 -i 0 ${this.devices.data.name} ${this.toNull}`, this.echo);
840
788
  }
841
789
  // efi
842
790
  if (this.efi) {
843
791
  if (!fs_1.default.existsSync(this.installTarget + this.devices.efi.mountPoint)) {
844
- await (0, utils_2.exec)(`mkdir ${this.installTarget}${this.devices.efi.mountPoint} -p` + this.toNull, echo);
845
- await (0, utils_2.exec)(`mount ${this.devices.efi.name} ${this.installTarget}${this.devices.efi.mountPoint}` + this.toNull, echo);
792
+ await (0, utils_2.exec)(`mkdir ${this.installTarget}${this.devices.efi.mountPoint} -p ${this.toNull}`, this.echo);
793
+ await (0, utils_2.exec)(`mount ${this.devices.efi.name} ${this.installTarget}${this.devices.efi.mountPoint} ${this.toNull}`, this.echo);
846
794
  }
847
795
  }
848
796
  return true;
@@ -851,7 +799,6 @@ adduser ${name} \
851
799
  * umountFs
852
800
  */
853
801
  async umountFs() {
854
- const echo = { echo: false, ignore: false };
855
802
  // efi
856
803
  if (this.efi) {
857
804
  await this.umount(this.devices.efi.name);
@@ -872,26 +819,24 @@ adduser ${name} \
872
819
  * mountvfs()
873
820
  */
874
821
  async mountVfs() {
875
- const echo = { echo: true, ignore: true };
876
- await (0, utils_2.exec)('mkdir ' + this.installTarget + '/dev' + this.toNull);
877
- await (0, utils_2.exec)('mkdir ' + this.installTarget + '/dev/pts' + this.toNull);
878
- await (0, utils_2.exec)('mkdir ' + this.installTarget + '/proc' + this.toNull);
879
- await (0, utils_2.exec)('mkdir ' + this.installTarget + '/sys' + this.toNull);
880
- await (0, utils_2.exec)('mkdir ' + this.installTarget + '/run' + this.toNull);
881
- await (0, utils_2.exec)(`mount -o bind /dev ${this.installTarget}/dev` + this.toNull, echo);
882
- await (0, utils_2.exec)(`mount -o bind /dev/pts ${this.installTarget}/dev/pts` + this.toNull, echo);
883
- await (0, utils_2.exec)(`mount -o bind /proc ${this.installTarget}/proc` + this.toNull, echo);
884
- await (0, utils_2.exec)(`mount -o bind /sys ${this.installTarget}/sys` + this.toNull, echo);
822
+ await (0, utils_2.exec)(`mkdir ${this.installTarget}/dev ${this.toNull}`, this.echo);
823
+ await (0, utils_2.exec)(`mkdir ${this.installTarget}/dev/pts ${this.toNull}`, this.echo);
824
+ await (0, utils_2.exec)(`mkdir ${this.installTarget}/proc ${this.toNull}`, this.echo);
825
+ await (0, utils_2.exec)(`mkdir ${this.installTarget}/sys ${this.toNull}`, this.echo);
826
+ await (0, utils_2.exec)(`mkdir ${this.installTarget}/run ${this.toNull}`, this.echo);
827
+ await (0, utils_2.exec)(`mount -o bind /dev ${this.installTarget}/dev ${this.toNull}`, this.echo);
828
+ await (0, utils_2.exec)(`mount -o bind /dev/pts ${this.installTarget}/dev/pts ${this.toNull}`, this.echo);
829
+ await (0, utils_2.exec)(`mount -o bind /proc ${this.installTarget}/proc ${this.toNull}`, this.echo);
830
+ await (0, utils_2.exec)(`mount -o bind /sys ${this.installTarget}/sys ${this.toNull}`, this.echo);
885
831
  if (this.efi) {
886
- await (0, utils_2.exec)(`mount -o bind /sys/firmware/efi/efivars ${this.installTarget}/sys/firmware/efi/efivars` + this.toNull, echo);
832
+ await (0, utils_2.exec)(`mount -o bind /sys/firmware/efi/efivars ${this.installTarget}/sys/firmware/efi/efivars ${this.toNull}`, this.echo);
887
833
  }
888
- await (0, utils_2.exec)(`mount -o bind /run ${this.installTarget}/run` + this.toNull, echo);
834
+ await (0, utils_2.exec)(`mount -o bind /run ${this.installTarget}/run ${this.toNull}`, this.echo);
889
835
  }
890
836
  /**
891
837
  *
892
838
  */
893
839
  async umountVfs() {
894
- const echo = { echo: false, ignore: false };
895
840
  await this.umount(`${this.installTarget}/dev/pts`);
896
841
  await this.umount(`${this.installTarget}/dev`);
897
842
  await this.umount(`${this.installTarget}/proc`);
@@ -906,17 +851,16 @@ adduser ${name} \
906
851
  * @param mountpoint
907
852
  */
908
853
  async umount(mountPoint = '') {
909
- const echo = { echo: false, ignore: false };
910
854
  let message = 'umount: ' + mountPoint;
911
855
  if (utils_1.default.isMountpoint(mountPoint)) {
912
856
  try {
913
- await (0, utils_2.exec)(`umount ${mountPoint}` + this.toNull, echo);
914
- await (0, utils_2.exec)('sleep 1', echo);
857
+ await (0, utils_2.exec)(`umount ${mountPoint} ${this.toNull}`, this.echo);
858
+ await (0, utils_2.exec)('sleep 1', this.echo);
915
859
  }
916
860
  catch (error) {
917
861
  message += +mountPoint + JSON.stringify(error);
918
862
  redraw(react_1.default.createElement(install_1.default, { message: message, percent: 1 }));
919
- await checkIt(message);
863
+ await utils_1.default.pressKeyToExit(message);
920
864
  }
921
865
  }
922
866
  }
@@ -924,29 +868,36 @@ adduser ${name} \
924
868
  *
925
869
  */
926
870
  async partition() {
927
- const echo = utils_1.default.setEcho(this.verbose);
928
871
  let echoYes = utils_1.default.setEcho(true);
929
872
  let retVal = false;
930
873
  const installDevice = this.partitions.installationDevice;
874
+ /**
875
+ * Support for NVMe
876
+ *
877
+ * /dev/sda1 = /dev/nvme0n1p1
878
+ */
879
+ let p = '';
880
+ if (installDevice.includes('nvme')) {
881
+ p = 'p';
882
+ }
931
883
  const installMode = this.partitions.installationMode;
932
- await (0, utils_2.exec)(`wipefs -a ${installDevice} ${this.toNull}`, echo);
933
884
  if (installMode === 'standard' && !this.efi) {
934
885
  /**
935
886
  * ===========================================================================================
936
887
  * BIOS: working
937
888
  * ===========================================================================================
938
889
  */
939
- await (0, utils_2.exec)(`parted --script ${installDevice} mklabel msdos`, echo);
940
- await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary linux-swap 1MiB 8192MiB`, echo); //dev/sda1 swap
941
- await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 8192MiB 100%`, echo); //dev/sda2 root
942
- await (0, utils_2.exec)(`parted ${installDevice} set 1 boot on`, echo);
943
- await (0, utils_2.exec)(`parted ${installDevice} set 1 esp on`, echo);
890
+ await (0, utils_2.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
891
+ await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary linux-swap 1MiB 8192MiB`, this.echo); //dev/sda1 swap
892
+ await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 8192MiB 100%`, this.echo); //dev/sda2 root
893
+ await (0, utils_2.exec)(`parted ${installDevice} set 1 boot on`, this.echo);
894
+ await (0, utils_2.exec)(`parted ${installDevice} set 1 esp on`, this.echo);
944
895
  // SWAP
945
- this.devices.swap.name = `${installDevice}1`;
896
+ this.devices.swap.name = `${installDevice}${p}1`;
946
897
  this.devices.swap.fsType = 'swap';
947
898
  this.devices.swap.mountPoint = 'none';
948
899
  // ROOT
949
- this.devices.root.name = `${installDevice}2`;
900
+ this.devices.root.name = `${installDevice}${p}2`;
950
901
  this.devices.root.fsType = 'ext4';
951
902
  this.devices.root.mountPoint = '/';
952
903
  // BOOT/DATA/EFI
@@ -961,48 +912,48 @@ adduser ${name} \
961
912
  * BIOS: full-encrypt:
962
913
  * ===========================================================================================
963
914
  */
964
- await (0, utils_2.exec)(`parted --script ${installDevice} mklabel msdos`, echo);
965
- await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 1MiB 512MiB`, echo); // sda1
966
- await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary linux-swap 512MiB 8704MiB`, echo); // sda2
967
- await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 8704MiB 100%`, echo); // sda3
968
- await (0, utils_2.exec)(`parted --script ${installDevice} set 1 boot on`, echo); // sda1
969
- await (0, utils_2.exec)(`parted --script ${installDevice} set 1 esp on`, echo); // sda1
915
+ await (0, utils_2.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
916
+ await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 1MiB 512MiB`, this.echo); // sda1
917
+ await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary linux-swap 512MiB 8704MiB`, this.echo); // sda2
918
+ await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 8704MiB 100%`, this.echo); // sda3
919
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
920
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
970
921
  // BOOT 512M
971
- this.devices.boot.name = `${installDevice}1`; // 'boot'
922
+ this.devices.boot.name = `${installDevice}${p}1`; // 'boot'
972
923
  this.devices.boot.fsType = 'ext4';
973
924
  this.devices.boot.mountPoint = '/boot';
974
925
  // SWAP 8G
975
926
  redraw(react_1.default.createElement(install_1.default, { message: `Formatting LUKS ${installDevice}2`, percent: 0 }));
976
- let crytoSwap = await (0, utils_2.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}2`, echoYes);
927
+ let crytoSwap = await (0, utils_2.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}2`, echoYes);
977
928
  if (crytoSwap.code !== 0) {
978
929
  utils_1.default.warning(`Error: ${crytoSwap.code} ${crytoSwap.data}`);
979
930
  process.exit(1);
980
931
  }
981
- redraw(react_1.default.createElement(install_1.default, { message: `Opening ${installDevice}2 as swap_crypted`, percent: 0 }));
982
- let crytoSwapOpen = await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}2 swap_crypted`, echoYes);
932
+ redraw(react_1.default.createElement(install_1.default, { message: `Opening ${installDevice}${p}2 as swap_crypted`, percent: 0 }));
933
+ let crytoSwapOpen = await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}2 swap_crypted`, echoYes);
983
934
  if (crytoSwapOpen.code !== 0) {
984
935
  utils_1.default.warning(`Error: ${crytoSwapOpen.code} ${crytoSwapOpen.data}`);
985
936
  process.exit(1);
986
937
  }
987
938
  this.devices.swap.name = '/dev/mapper/swap_crypted';
988
- this.devices.swap.cryptedFrom = `${installDevice}2`;
939
+ this.devices.swap.cryptedFrom = `${installDevice}${p}2`;
989
940
  this.devices.swap.fsType = 'swap';
990
941
  this.devices.swap.mountPoint = 'none';
991
942
  // ROOT
992
- redraw(react_1.default.createElement(install_1.default, { message: `Formatting LUKS ${installDevice}3`, percent: 0 }));
993
- let crytoRoot = await (0, utils_2.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}3`, echoYes);
943
+ redraw(react_1.default.createElement(install_1.default, { message: `Formatting LUKS ${installDevice}${p}3`, percent: 0 }));
944
+ let crytoRoot = await (0, utils_2.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}3`, echoYes);
994
945
  if (crytoRoot.code !== 0) {
995
946
  utils_1.default.warning(`Error: ${crytoRoot.code} ${crytoRoot.data}`);
996
947
  process.exit(1);
997
948
  }
998
- redraw(react_1.default.createElement(install_1.default, { message: `Opening ${installDevice}3 as root_crypted`, percent: 0 }));
999
- let crytoRootOpen = await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}3 root_crypted`, echoYes);
949
+ redraw(react_1.default.createElement(install_1.default, { message: `Opening ${installDevice}${p}3 as root_crypted`, percent: 0 }));
950
+ let crytoRootOpen = await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}3 root_crypted`, echoYes);
1000
951
  if (crytoRootOpen.code !== 0) {
1001
952
  utils_1.default.warning(`Error: ${crytoRootOpen.code} ${crytoRootOpen.data}`);
1002
953
  process.exit(1);
1003
954
  }
1004
955
  this.devices.root.name = '/dev/mapper/root_crypted';
1005
- this.devices.root.cryptedFrom = `${installDevice}3`;
956
+ this.devices.root.cryptedFrom = `${installDevice}${p}3`;
1006
957
  this.devices.root.fsType = 'ext4';
1007
958
  this.devices.root.mountPoint = '/';
1008
959
  // BOOT/DATA/EFI
@@ -1016,19 +967,19 @@ adduser ${name} \
1016
967
  * UEFI: working
1017
968
  * ===========================================================================================
1018
969
  */
1019
- await (0, utils_2.exec)(`parted --script ${installDevice} mklabel gpt`, echo);
1020
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, echo); // sda1 EFI
1021
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart swap linux-swap 768MiB 8960MiB`, echo); // sda2 swap
1022
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart root ext4 8960MiB 100%`, echo); // sda3 root
1023
- await (0, utils_2.exec)(`parted --script ${installDevice} set 1 boot on`, echo); // sda1
1024
- await (0, utils_2.exec)(`parted --script ${installDevice} set 1 esp on`, echo); // sda1
1025
- this.devices.efi.name = `${installDevice}1`;
970
+ await (0, utils_2.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
971
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
972
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart swap linux-swap 768MiB 8960MiB`, this.echo); // sda2 swap
973
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart root ext4 8960MiB 100%`, this.echo); // sda3 root
974
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
975
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
976
+ this.devices.efi.name = `${installDevice}${p}1`;
1026
977
  this.devices.efi.fsType = 'F 32 -I';
1027
978
  this.devices.efi.mountPoint = '/boot/efi';
1028
979
  this.devices.boot.name = `none`;
1029
- this.devices.swap.name = `${installDevice}2`;
980
+ this.devices.swap.name = `${installDevice}${p}2`;
1030
981
  this.devices.swap.fsType = 'swap';
1031
- this.devices.root.name = `${installDevice}3`;
982
+ this.devices.root.name = `${installDevice}${p}3`;
1032
983
  this.devices.root.fsType = 'ext4';
1033
984
  this.devices.root.mountPoint = '/';
1034
985
  // BOOT/DATA/EFI
@@ -1040,56 +991,67 @@ adduser ${name} \
1040
991
  else if (installMode === 'full-encrypted' && this.efi) {
1041
992
  /**
1042
993
  * ===========================================================================================
1043
- * UEFI, full-encrypt: working
994
+ * UEFI, full-encrypt
1044
995
  * ===========================================================================================
1045
996
  */
1046
- await (0, utils_2.exec)(`parted --script ${installDevice} mklabel gpt`, echo);
1047
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, echo); // sda1 EFI
1048
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart boot ext4 256MiB 768MiB`, echo); // sda2 boot
1049
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart swap linux-swap 768MiB 8960MiB`, echo); // sda3 swap
1050
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart root ext4 8960MiB 100%`, echo); // sda4 root
1051
- await (0, utils_2.exec)(`parted --script ${installDevice} set 1 boot on`, echo); // sda1
1052
- await (0, utils_2.exec)(`parted --script ${installDevice} set 1 esp on`, echo); // sda1
997
+ await (0, utils_2.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
998
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
999
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart boot ext4 256MiB 768MiB`, this.echo); // sda2 boot
1000
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart swap linux-swap 768MiB 8960MiB`, this.echo); // sda3 swap
1001
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart root ext4 8960MiB 100%`, this.echo); // sda4 root
1002
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
1003
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
1053
1004
  // EFI 256M
1054
- this.devices.efi.name = `${installDevice}1`; // 'efi'
1005
+ this.devices.efi.name = `${installDevice}${p}1`; // 'efi'
1055
1006
  this.devices.efi.fsType = 'F 32 -I';
1056
1007
  this.devices.efi.mountPoint = '/boot/efi';
1057
1008
  // BOOT 512M
1058
- this.devices.boot.name = `${installDevice}2`; // 'boot'
1009
+ this.devices.boot.name = `${installDevice}${p}2`; // 'boot'
1059
1010
  this.devices.boot.fsType = 'ext4';
1060
1011
  this.devices.boot.mountPoint = '/boot';
1012
+ /**
1013
+ * cryptsetup return codes are:
1014
+ *
1015
+ * 1 wrong parameters,
1016
+ * 2 no permission (bad passphrase),
1017
+ * 3 out of memory,
1018
+ * 4 wrong device specified,
1019
+ * 5 device already exists or device is busy.
1020
+ *
1021
+ * sometime due scarce memory 2GB, we can have the process killed
1022
+ */
1061
1023
  // SWAP 8G
1062
- redraw(react_1.default.createElement(install_1.default, { message: `Formatting LUKS ${installDevice}3`, percent: 0 }));
1063
- let crytoSwap = await (0, utils_2.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}3`, echoYes);
1024
+ redraw(react_1.default.createElement(install_1.default, { message: `Formatting LUKS ${installDevice}${p}3`, percent: 0 }));
1025
+ let crytoSwap = await (0, utils_2.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}3`, echoYes);
1064
1026
  if (crytoSwap.code !== 0) {
1065
1027
  utils_1.default.warning(`Error: ${crytoSwap.code} ${crytoSwap.data}`);
1066
1028
  process.exit(1);
1067
1029
  }
1068
- redraw(react_1.default.createElement(install_1.default, { message: `Opening ${installDevice}3 as swap_crypted`, percent: 0 }));
1069
- let crytoSwapOpen = await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}3 swap_crypted`, echoYes);
1030
+ redraw(react_1.default.createElement(install_1.default, { message: `Opening ${installDevice}${p}3 as swap_crypted`, percent: 0 }));
1031
+ let crytoSwapOpen = await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}3 swap_crypted`, echoYes);
1070
1032
  if (crytoSwapOpen.code !== 0) {
1071
1033
  utils_1.default.warning(`Error: ${crytoSwapOpen.code} ${crytoSwapOpen.data}`);
1072
1034
  process.exit(1);
1073
1035
  }
1074
1036
  this.devices.swap.name = '/dev/mapper/swap_crypted';
1075
- this.devices.swap.cryptedFrom = `${installDevice}3`;
1037
+ this.devices.swap.cryptedFrom = `${installDevice}${p}3`;
1076
1038
  this.devices.swap.fsType = 'swap';
1077
1039
  this.devices.swap.mountPoint = 'none';
1078
1040
  // ROOT
1079
- redraw(react_1.default.createElement(install_1.default, { message: `Formatting LUKS ${installDevice}4`, percent: 0 }));
1080
- let crytoRoot = await (0, utils_2.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}4`, echoYes);
1041
+ redraw(react_1.default.createElement(install_1.default, { message: `Formatting LUKS ${installDevice}${p}4`, percent: 0 }));
1042
+ let crytoRoot = await (0, utils_2.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}4`, echoYes);
1081
1043
  if (crytoRoot.code !== 0) {
1082
1044
  utils_1.default.warning(`Error: ${crytoRoot.code} ${crytoRoot.data}`);
1083
1045
  process.exit(1);
1084
1046
  }
1085
- redraw(react_1.default.createElement(install_1.default, { message: `Opening ${installDevice}4 as root_crypted`, percent: 0 }));
1086
- let crytoRootOpen = await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}4 root_crypted`, echoYes);
1047
+ redraw(react_1.default.createElement(install_1.default, { message: `Opening ${installDevice}${p}4 as root_crypted`, percent: 0 }));
1048
+ let crytoRootOpen = await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}4 root_crypted`, echoYes);
1087
1049
  if (crytoRootOpen.code !== 0) {
1088
1050
  utils_1.default.warning(`Error: ${crytoRootOpen.code} ${crytoRootOpen.data}`);
1089
1051
  process.exit(1);
1090
1052
  }
1091
1053
  this.devices.root.name = '/dev/mapper/root_crypted';
1092
- this.devices.root.cryptedFrom = `${installDevice}4`;
1054
+ this.devices.root.cryptedFrom = `${installDevice}${p}4`;
1093
1055
  this.devices.root.fsType = 'ext4';
1094
1056
  this.devices.root.mountPoint = '/';
1095
1057
  // BOOT/DATA/EFI
@@ -1104,26 +1066,26 @@ adduser ${name} \
1104
1066
  * PROXMOX VE: BIOS and lvm2
1105
1067
  * ===========================================================================================
1106
1068
  */
1107
- await (0, utils_2.exec)(`parted --script ${installDevice} mklabel msdos`);
1108
1069
  // Creo partizioni
1109
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart primary ext2 1 512`); // sda1
1110
- await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext2 512 100%`); // sda2
1111
- await (0, utils_2.exec)(`parted --script ${installDevice} set 1 boot on`, echo); // sda1
1112
- await (0, utils_2.exec)(`parted --script ${installDevice} set 2 lvm on`, echo); // sda2
1070
+ await (0, utils_2.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
1071
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart primary ext2 1 512`, this.echo); // sda1
1072
+ await (0, utils_2.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext2 512 100%`, this.echo); // sda2
1073
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
1074
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 2 lvm on`, this.echo); // sda2
1113
1075
  const lvmPartInfo = await this.lvmPartInfo(installDevice);
1114
1076
  const lvmPartname = lvmPartInfo[0];
1115
1077
  const lvmSwapSize = lvmPartInfo[1];
1116
1078
  const lvmRootSize = lvmPartInfo[2];
1117
1079
  //const lvmDataSize = lvmPartInfo[3]
1118
- await (0, utils_2.exec)(`pvcreate /dev/${lvmPartname}`);
1119
- await (0, utils_2.exec)(`vgcreate pve /dev/${lvmPartname}`);
1120
- await (0, utils_2.exec)(`vgchange -an`);
1121
- await (0, utils_2.exec)(`lvcreate -L ${lvmSwapSize} -nswap pve`);
1122
- await (0, utils_2.exec)(`lvcreate -L ${lvmRootSize} -nroot pve`);
1123
- await (0, utils_2.exec)(`lvcreate -l 100%FREE -ndata pve`);
1124
- await (0, utils_2.exec)(`vgchange -a y pve`);
1080
+ await (0, utils_2.exec)(`pvcreate /dev/${lvmPartname}`, this.echo);
1081
+ await (0, utils_2.exec)(`vgcreate pve /dev/${lvmPartname}`, this.echo);
1082
+ await (0, utils_2.exec)(`vgchange -an`, this.echo);
1083
+ await (0, utils_2.exec)(`lvcreate -L ${lvmSwapSize} -nswap pve`, this.echo);
1084
+ await (0, utils_2.exec)(`lvcreate -L ${lvmRootSize} -nroot pve`, this.echo);
1085
+ await (0, utils_2.exec)(`lvcreate -l 100%FREE -ndata pve`, this.echo);
1086
+ await (0, utils_2.exec)(`vgchange -a y pve`, this.echo);
1125
1087
  this.devices.efi.name = `none`;
1126
- this.devices.boot.name = `${installDevice}1`;
1088
+ this.devices.boot.name = `${installDevice}${p}1`;
1127
1089
  this.devices.root.fsType = 'ext2';
1128
1090
  this.devices.root.mountPoint = '/boot';
1129
1091
  this.devices.root.name = `/dev/pve/root`;
@@ -1141,29 +1103,29 @@ adduser ${name} \
1141
1103
  * PROXMOX VE: lvm2 and UEFI
1142
1104
  * ===========================================================================================
1143
1105
  */
1144
- await (0, utils_2.exec)(`parted --script ${installDevice} mklabel gpt`, echo);
1145
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, echo); // sda1 EFI
1146
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart boot ext2 256MiB 768MiB`, echo); // sda2 boot
1147
- await (0, utils_2.exec)(`parted --script ${installDevice} mkpart lvm ext4 768MiB 100%`, echo); // sda3 lmv2
1148
- await (0, utils_2.exec)(`parted --script ${installDevice} set 1 boot on`, echo); // sda1
1149
- await (0, utils_2.exec)(`parted --script ${installDevice} set 1 esp on`, echo); // sda1
1150
- await (0, utils_2.exec)(`parted --script ${installDevice} set 3 lvm on`); // sda3
1106
+ await (0, utils_2.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
1107
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
1108
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart boot ext2 256MiB 768MiB`, this.echo); // sda2 boot
1109
+ await (0, utils_2.exec)(`parted --script ${installDevice} mkpart lvm ext4 768MiB 100%`, this.echo); // sda3 lmv2
1110
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
1111
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
1112
+ await (0, utils_2.exec)(`parted --script ${installDevice} set 3 lvm on`, this.echo); // sda3
1151
1113
  const lvmPartInfo = await this.lvmPartInfo(installDevice);
1152
1114
  const lvmPartname = lvmPartInfo[0];
1153
1115
  const lvmSwapSize = lvmPartInfo[1];
1154
1116
  const lvmRootSize = lvmPartInfo[2];
1155
1117
  //const lvmDataSize = lvmPartInfo[3]
1156
- await (0, utils_2.exec)(`pvcreate /dev/${lvmPartname}`);
1157
- await (0, utils_2.exec)(`vgcreate pve /dev/${lvmPartname}`);
1158
- await (0, utils_2.exec)(`vgchange -an`);
1159
- await (0, utils_2.exec)(`lvcreate -L ${lvmSwapSize} -nswap pve`);
1160
- await (0, utils_2.exec)(`lvcreate -L ${lvmRootSize} -nroot pve`);
1161
- await (0, utils_2.exec)(`lvcreate -l 100%FREE -ndata pve`);
1162
- await (0, utils_2.exec)(`vgchange -a y pve`);
1163
- this.devices.efi.name = `${installDevice}1`;
1118
+ await (0, utils_2.exec)(`pvcreate /dev/${lvmPartname}`, this.echo);
1119
+ await (0, utils_2.exec)(`vgcreate pve /dev/${lvmPartname}`, this.echo);
1120
+ await (0, utils_2.exec)(`vgchange -an`, this.echo);
1121
+ await (0, utils_2.exec)(`lvcreate -L ${lvmSwapSize} -nswap pve`, this.echo);
1122
+ await (0, utils_2.exec)(`lvcreate -L ${lvmRootSize} -nroot pve`, this.echo);
1123
+ await (0, utils_2.exec)(`lvcreate -l 100%FREE -ndata pve`, this.echo);
1124
+ await (0, utils_2.exec)(`vgchange -a y pve`, this.echo);
1125
+ this.devices.efi.name = `${installDevice}${p}1`;
1164
1126
  this.devices.efi.fsType = 'F 32 -I';
1165
1127
  this.devices.efi.mountPoint = '/boot/efi';
1166
- this.devices.boot.name = `${installDevice}2`;
1128
+ this.devices.boot.name = `${installDevice}${p}2`;
1167
1129
  this.devices.boot.fsType = 'ext4';
1168
1130
  this.devices.boot.mountPoint = '/boot';
1169
1131
  this.devices.root.name = `/dev/pve/root`;
@@ -1181,7 +1143,6 @@ adduser ${name} \
1181
1143
  * Return lvmPartname, lvmSwapSize, lvmRootSize
1182
1144
  */
1183
1145
  async lvmPartInfo(installDevice = '/dev/sda') {
1184
- //
1185
1146
  // Partizione LVM
1186
1147
  const lvmPartname = shx.exec(`fdisk ${installDevice} -l | grep LVM | awk '{print $1}' | cut -d "/" -f3`).stdout.trim();
1187
1148
  const lvmByteSize = Number(shx.exec(`cat /proc/partitions | grep ${lvmPartname}| awk '{print $3}' | grep "[0-9]"`).stdout.trim());
@@ -1215,24 +1176,21 @@ adduser ${name} \
1215
1176
  * @param name
1216
1177
  */
1217
1178
  async execCalamaresModule(name) {
1218
- const echo = { echo: false, ignore: false };
1219
- const moduleName = this.installer.multiarchModules + name + '/module.desc';
1220
- if (fs_1.default.existsSync(moduleName)) {
1221
- console.log('analyzing: ' + moduleName);
1222
- const calamaresModule = js_yaml_1.default.load(fs_1.default.readFileSync(moduleName, 'utf8'));
1223
- let command = calamaresModule.command;
1224
- console.log('command: ' + command);
1225
- if (command !== '' || command !== undefined) {
1226
- command += this.toNull;
1227
- (0, child_process_1.execSync)(command);
1228
- }
1179
+ /**
1180
+ * patch per ubuntu sostituisce bootloader-config e bootloader
1181
+ */
1182
+ if (name === 'bootloader-config' && this.distro.distroLike === 'ubuntu') {
1183
+ await this.bootloaderConfigUbuntu();
1229
1184
  }
1230
1185
  else {
1231
- /**
1232
- * patch per ubuntu sostituisce bootloader-config e bootloader
1233
- */
1234
- if (name === 'bootloader-config') {
1235
- await this.bootloaderConfigUbuntu();
1186
+ const moduleName = this.installer.multiarchModules + name + '/module.desc';
1187
+ if (fs_1.default.existsSync(moduleName)) {
1188
+ const calamaresModule = js_yaml_1.default.load(fs_1.default.readFileSync(moduleName, 'utf8'));
1189
+ let command = calamaresModule.command;
1190
+ if (command !== '' || command !== undefined) {
1191
+ command += this.toNull;
1192
+ await (0, utils_2.exec)(command, this.echo);
1193
+ }
1236
1194
  }
1237
1195
  }
1238
1196
  }
@@ -1240,76 +1198,83 @@ adduser ${name} \
1240
1198
  *
1241
1199
  */
1242
1200
  async bootloaderConfigUbuntu() {
1243
- const echo = { echo: false, ignore: false };
1244
1201
  let cmd = '';
1245
1202
  try {
1246
- cmd = 'chroot ' + this.installTarget + ' ' + 'apt-get update -y ' + this.toNull;
1247
- await (0, utils_2.exec)(cmd, echo);
1203
+ cmd = `chroot ${this.installTarget} apt-get update -y ${this.toNull}`;
1204
+ await (0, utils_2.exec)(cmd, this.echo);
1248
1205
  }
1249
1206
  catch (error) {
1250
1207
  console.log(error);
1208
+ await utils_1.default.pressKeyToExit(cmd, true);
1251
1209
  }
1252
1210
  try {
1253
- cmd = 'chroot ' + this.installTarget + ' sleep 1' + this.toNull;
1254
- await (0, utils_2.exec)(cmd, echo);
1211
+ cmd = `chroot ${this.installTarget} sleep 1 ${this.toNull}`;
1212
+ await (0, utils_2.exec)(cmd, this.echo);
1255
1213
  }
1256
1214
  catch (error) {
1257
1215
  console.log(error);
1216
+ await utils_1.default.pressKeyToExit(cmd, true);
1258
1217
  }
1259
1218
  let aptInstallOptions = ' apt install -y --no-upgrade --allow-unauthenticated -o Acquire::gpgv::Options::=--ignore-time-conflict ';
1260
1219
  if (this.efi) {
1261
1220
  try {
1262
- cmd = 'chroot ' + this.installTarget + aptInstallOptions + ' grub-efi-' + utils_1.default.machineArch() + ' --allow-unauthenticated ' + this.toNull;
1263
- await (0, utils_2.exec)(cmd, echo);
1221
+ cmd = `chroot ${this.installTarget} ${aptInstallOptions} grub-efi-${utils_1.default.machineArch()} --allow-unauthenticated ${this.toNull}`;
1222
+ await (0, utils_2.exec)(cmd, this.echo);
1264
1223
  }
1265
1224
  catch (error) {
1266
- console.log('cmd: ' + cmd + ' error: ' + error);
1225
+ console.log(error);
1226
+ await utils_1.default.pressKeyToExit(cmd, true);
1267
1227
  }
1268
1228
  }
1269
1229
  else {
1270
1230
  try {
1271
- cmd = 'chroot ' + this.installTarget + aptInstallOptions + ' grub-pc' + this.toNull;
1272
- await (0, utils_2.exec)(cmd, echo);
1231
+ cmd = `chroot ${this.installTarget} ${aptInstallOptions} grub-pc ${this.toNull}`;
1232
+ await (0, utils_2.exec)(cmd, this.echo);
1273
1233
  }
1274
1234
  catch (error) {
1275
- console.log('cmd: ' + cmd + ' error: ' + error);
1235
+ console.log(error);
1236
+ await utils_1.default.pressKeyToExit(cmd, true);
1276
1237
  }
1277
1238
  }
1278
1239
  try {
1279
- cmd = 'chroot ' + this.installTarget + ' sleep 1' + this.toNull;
1280
- await (0, utils_2.exec)(cmd, echo);
1240
+ cmd = `chroot ${this.installTarget} sleep 1 ${this.toNull}`;
1241
+ await (0, utils_2.exec)(cmd, this.echo);
1281
1242
  }
1282
1243
  catch (error) {
1283
- console.log('cmd: ' + cmd + ' error: ' + error);
1244
+ console.log(error);
1245
+ await utils_1.default.pressKeyToExit(cmd, true);
1284
1246
  }
1285
1247
  try {
1286
- cmd = 'chroot ' + this.installTarget + ' grub-install ' + this.partitions.installationDevice + this.toNull;
1287
- await (0, utils_2.exec)(cmd, echo);
1248
+ cmd = `chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`;
1249
+ await (0, utils_2.exec)(cmd, this.echo);
1288
1250
  }
1289
1251
  catch (error) {
1290
- console.log('cmd: ' + cmd + ' error: ' + error);
1252
+ console.log(error);
1253
+ await utils_1.default.pressKeyToExit(cmd, true);
1291
1254
  }
1292
1255
  try {
1293
- cmd = 'chroot ' + this.installTarget + ' grub-mkconfig -o /boot/grub/grub.cfg' + this.toNull;
1294
- await (0, utils_2.exec)(cmd, echo);
1256
+ cmd = `chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`;
1257
+ await (0, utils_2.exec)(cmd, this.echo);
1295
1258
  }
1296
1259
  catch (error) {
1297
- console.log('cmd: ' + cmd + ' error: ' + error);
1260
+ console.log(error);
1261
+ await utils_1.default.pressKeyToExit(cmd, true);
1298
1262
  }
1299
- // await Utils.customConfirmAbort(cmd)
1300
1263
  try {
1301
- cmd = 'chroot ' + this.installTarget + ' update-grub' + this.toNull;
1302
- await (0, utils_2.exec)(cmd, echo);
1264
+ cmd = `chroot ${this.installTarget} update-grub ${this.toNull}`;
1265
+ await (0, utils_2.exec)(cmd, this.echo);
1303
1266
  }
1304
1267
  catch (error) {
1305
- console.log('cmd: ' + cmd + ' error: ' + error);
1268
+ console.log(error);
1269
+ await utils_1.default.pressKeyToExit(cmd, true);
1306
1270
  }
1307
1271
  try {
1308
- cmd = 'chroot ' + this.installTarget + ' sleep 1' + this.toNull;
1309
- await (0, utils_2.exec)(cmd, echo);
1272
+ cmd = `chroot ${this.installTarget} sleep 1 ${this.toNull}`;
1273
+ await (0, utils_2.exec)(cmd, this.echo);
1310
1274
  }
1311
1275
  catch (error) {
1312
- console.log('cmd: ' + cmd + ' error: ' + error);
1276
+ console.log(error);
1277
+ await utils_1.default.pressKeyToExit(cmd, true);
1313
1278
  }
1314
1279
  }
1315
1280
  /**
@@ -1344,16 +1309,16 @@ adduser ${name} \
1344
1309
  async machineId() {
1345
1310
  let file = `${this.installTarget}/etc/machine-id`;
1346
1311
  if (fs_1.default.existsSync(file)) {
1347
- await (0, utils_2.exec)(`rm ${file}`);
1312
+ await (0, utils_2.exec)(`rm ${file}`, this.echo);
1348
1313
  }
1349
1314
  await (0, utils_2.exec)(`touch ${file}`);
1350
1315
  }
1351
1316
  /**
1352
1317
  * only show the result
1353
1318
  */
1354
- finished() {
1319
+ async finished() {
1355
1320
  redraw(react_1.default.createElement(finished_1.default, { installationDevice: this.partitions.installationDevice, hostName: this.users.hostname, userName: this.users.name }));
1356
- require('child_process').spawnSync('read _ ', { shell: true, stdio: [0, 1, 2] });
1321
+ utils_1.default.pressKeyToExit('Press a key to reboot...');
1357
1322
  shx.exec('reboot');
1358
1323
  }
1359
1324
  }
@@ -1371,12 +1336,3 @@ function redraw(elem) {
1371
1336
  shx.exec('clear');
1372
1337
  (0, ink_1.render)(elem, opt);
1373
1338
  }
1374
- /**
1375
- *
1376
- * @param message
1377
- */
1378
- async function checkIt(message) {
1379
- utils_1.default.error('Krill Installer generated an error, the installation process will end now');
1380
- console.log('Press a key to exit...');
1381
- require('child_process').spawnSync('read _ ', { shell: true, stdio: [0, 1, 2] });
1382
- }