penguins-eggs 9.1.35 → 9.1.37

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 (50) hide show
  1. package/README.md +17 -17
  2. package/addons/eggs/adapt/applications/eggs-adapt.desktop +0 -0
  3. package/addons/eggs/adapt/bin/adapt +0 -0
  4. package/addons/eggs/ichoice/bin/eggs-ichoice.sh +0 -0
  5. package/addons/eggs/pve/applications/eggs-pve.desktop +0 -0
  6. package/addons/eggs/rsupport/applications/eggs-rsupport.desktop +0 -0
  7. package/addons/eggs/theme/applications/install-debian.desktop +0 -0
  8. package/addons/neon/theme/applications/install-debian.desktop +0 -0
  9. package/addons/telos/theme/applications/install-debian.desktop +0 -0
  10. package/addons/ufficiozero/theme/applications/install-debian.desktop +0 -0
  11. package/addons/waydroid/theme/applications/install-debian.desktop +0 -0
  12. package/assets/calamares/install-debian +0 -0
  13. package/assets/penguins-eggs.desktop +0 -0
  14. package/assets/penguins-krill.desktop +0 -0
  15. package/assets/penguins-links-add.desktop +0 -0
  16. package/assets/penguins-live-installer.desktop +0 -0
  17. package/bin/dev +0 -0
  18. package/conf/distros/bionic/calamares/calamares-modules/after-bootloader/after-bootloader.sh +0 -0
  19. package/conf/distros/bionic/calamares/calamares-modules/before-bootloader/before-bootloader.sh +0 -0
  20. package/conf/distros/bionic/calamares/calamares-modules/before-bootloader-mkdirs/before-bootloader-mkdirs.sh +0 -0
  21. package/conf/distros/bionic/calamares/calamares-modules/bug/bug.sh +0 -0
  22. package/conf/distros/bionic/calamares/calamares-modules/grubcfg/main.py +0 -0
  23. package/conf/distros/buster/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
  24. package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
  25. package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
  26. package/conf/distros/focal/calamares/calamares-modules/automirror/main.py +0 -0
  27. package/conf/tools.yaml +1 -1
  28. package/lib/classes/distro.js +13 -14
  29. package/lib/classes/ovary.js +35 -11
  30. package/lib/classes/utils.js +2 -1
  31. package/lib/krill/krill-prepare.js +1 -1
  32. package/lib/krill/krill-sequence.d.ts +1 -1
  33. package/lib/krill/krill-sequence.js +31 -31
  34. package/lib/krill/modules/bootloader.js +28 -2
  35. package/lib/krill/modules/initramfs.js +14 -2
  36. package/lib/krill/modules/{l/303/262cale-cfg.d.ts → locale-cfg.d.ts} +0 -0
  37. package/lib/krill/modules/{l/303/262cale-cfg.js → locale-cfg.js} +0 -0
  38. package/lib/lib/utils.d.ts +27 -0
  39. package/lib/lib/utils.js +54 -19
  40. package/mkinitcpio/archlinux/README.md +116 -0
  41. package/mkinitcpio/manjaro/README.md +4 -0
  42. package/package.json +117 -112
  43. package/scripts/bros/waydroid-helper.sh +0 -0
  44. package/scripts/eggs-adapt.sh +0 -0
  45. package/scripts/install-eggs-ppa.sh +0 -0
  46. package/scripts/mom-cli.sh +0 -0
  47. package/scripts/pve-live.service +0 -0
  48. package/scripts/pve-live.sh +0 -0
  49. package/scripts/resy.sh +0 -0
  50. package/scripts/userexist.sh +0 -0
@@ -32,7 +32,7 @@ const machine_id_1 = tslib_1.__importDefault(require("./modules/machine-id"));
32
32
  const fstab_1 = tslib_1.__importDefault(require("./modules/fstab"));
33
33
  const locale_1 = tslib_1.__importDefault(require("./modules/locale"));
34
34
  const set_keyboard_1 = tslib_1.__importDefault(require("./modules/set-keyboard"));
35
- const l_cale_cfg_1 = tslib_1.__importDefault(require("./modules/l\u00F2cale-cfg"));
35
+ const locale_cfg_1 = tslib_1.__importDefault(require("./modules/locale-cfg"));
36
36
  // users
37
37
  const add_user_1 = tslib_1.__importDefault(require("./modules/add-user"));
38
38
  const change_password_1 = tslib_1.__importDefault(require("./modules/change-password"));
@@ -79,7 +79,7 @@ class Sequence {
79
79
  this.fstab = fstab_1.default;
80
80
  this.locale = locale_1.default;
81
81
  this.setKeyboard = set_keyboard_1.default;
82
- this.localeCfg = l_cale_cfg_1.default;
82
+ this.localeCfg = locale_cfg_1.default;
83
83
  // users
84
84
  this.addUser = add_user_1.default;
85
85
  this.changePassword = change_password_1.default;
@@ -177,7 +177,7 @@ class Sequence {
177
177
  message = "Creating partitions";
178
178
  percent = 0.01;
179
179
  try {
180
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
180
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
181
181
  isPartitioned = await this.partition();
182
182
  }
183
183
  catch (error) {
@@ -188,7 +188,7 @@ class Sequence {
188
188
  message = "Formatting file system ";
189
189
  percent = 0.02;
190
190
  try {
191
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
191
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
192
192
  await this.mkfs();
193
193
  }
194
194
  catch (error) {
@@ -208,7 +208,7 @@ class Sequence {
208
208
  message = "Mounting on target VFS ";
209
209
  percent = 0.06;
210
210
  try {
211
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
211
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
212
212
  await this.mountVfs();
213
213
  }
214
214
  catch (error) {
@@ -218,8 +218,7 @@ class Sequence {
218
218
  message = "Unpacking filesystem ";
219
219
  percent = 0.10;
220
220
  try {
221
- // spinner={true}
222
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
221
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
223
222
  await this.unpackfs();
224
223
  }
225
224
  catch (error) {
@@ -234,7 +233,7 @@ class Sequence {
234
233
  percent = 0.37;
235
234
  let cmd = 'eggs syncfrom --rootdir /tmp/calamares-krill-root/';
236
235
  try {
237
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
236
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
238
237
  await (0, utils_2.exec)(cmd, utils_1.default.setEcho(true));
239
238
  }
240
239
  catch (error) {
@@ -246,7 +245,7 @@ class Sequence {
246
245
  message = 'sources-yolk';
247
246
  percent = 0.40;
248
247
  try {
249
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
248
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
250
249
  await this.execCalamaresModule('sources-yolk');
251
250
  }
252
251
  catch (error) {
@@ -257,7 +256,7 @@ class Sequence {
257
256
  message = 'machineid';
258
257
  percent = 0.41;
259
258
  try {
260
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
259
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
261
260
  await this.machineId();
262
261
  }
263
262
  catch (error) {
@@ -267,7 +266,7 @@ class Sequence {
267
266
  message = "Creating fstab ";
268
267
  percent = 0.47;
269
268
  try {
270
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
269
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
271
270
  await this.fstab(this.partitions.installationDevice);
272
271
  }
273
272
  catch (error) {
@@ -314,7 +313,7 @@ class Sequence {
314
313
  message = "Create hostname ";
315
314
  percent = 0.53;
316
315
  try {
317
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
316
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
318
317
  await this.hostname();
319
318
  }
320
319
  catch (error) {
@@ -324,7 +323,7 @@ class Sequence {
324
323
  message = "Creating hosts ";
325
324
  percent = 0.60;
326
325
  try {
327
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
326
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
328
327
  await this.hosts();
329
328
  }
330
329
  catch (error) {
@@ -334,7 +333,7 @@ class Sequence {
334
333
  message = "bootloader-config ";
335
334
  percent = 0.62;
336
335
  try {
337
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
336
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
338
337
  await this.bootloaderConfig();
339
338
  }
340
339
  catch (error) {
@@ -344,7 +343,7 @@ class Sequence {
344
343
  message = "grubcfg ";
345
344
  percent = 0.63;
346
345
  try {
347
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
346
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
348
347
  await this.grubcfg();
349
348
  }
350
349
  catch (error) {
@@ -354,7 +353,7 @@ class Sequence {
354
353
  message = "bootloader ";
355
354
  percent = 0.64;
356
355
  try {
357
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
356
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
358
357
  await this.bootloader();
359
358
  }
360
359
  catch (error) {
@@ -364,7 +363,7 @@ class Sequence {
364
363
  message = "initramfs configure";
365
364
  percent = 0.65;
366
365
  try {
367
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
366
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
368
367
  this.initramfsCfg(this.partitions.installationDevice);
369
368
  }
370
369
  catch (error) {
@@ -374,7 +373,7 @@ class Sequence {
374
373
  message = "initramfs ";
375
374
  percent = 0.67;
376
375
  try {
377
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
376
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
378
377
  await this.initramfs();
379
378
  }
380
379
  catch (error) {
@@ -388,7 +387,7 @@ class Sequence {
388
387
  message = "Removing user live ";
389
388
  percent = 0.70;
390
389
  try {
391
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
390
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
392
391
  await this.delLiveUser();
393
392
  }
394
393
  catch (error) {
@@ -398,7 +397,7 @@ class Sequence {
398
397
  message = "Adding user ";
399
398
  percent = 0.73;
400
399
  try {
401
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
400
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
402
401
  await this.addUser(this.users.name, this.users.password, this.users.fullname, '', '', '');
403
402
  }
404
403
  catch (error) {
@@ -408,7 +407,7 @@ class Sequence {
408
407
  message = "adding user password ";
409
408
  percent = 0.77;
410
409
  try {
411
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
410
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
412
411
  await this.changePassword('root', this.users.rootPassword);
413
412
  }
414
413
  catch (error) {
@@ -421,7 +420,7 @@ class Sequence {
421
420
  message = "autologin GUI";
422
421
  percent = 0.80;
423
422
  await xdg_1.default.autologin(utils_1.default.getPrimaryUser(), this.users.name, this.installTarget);
424
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
423
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
425
424
  }
426
425
  catch (error) {
427
426
  await utils_1.default.pressKeyToExit(JSON.stringify(error));
@@ -431,7 +430,7 @@ class Sequence {
431
430
  message = "autologin CLI";
432
431
  percent = 0.80;
433
432
  try {
434
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
433
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
435
434
  await cliAutologin.remove(this.installTarget);
436
435
  }
437
436
  catch (error) {
@@ -445,7 +444,7 @@ class Sequence {
445
444
  message = "remove installer";
446
445
  percent = 0.87;
447
446
  try {
448
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
447
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
449
448
  await this.removeInstallerLink();
450
449
  }
451
450
  catch (error) {
@@ -456,7 +455,7 @@ class Sequence {
456
455
  message = "sources yolk unmount";
457
456
  percent = 0.92;
458
457
  try {
459
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
458
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
460
459
  await this.execCalamaresModule('sources-yolk-unmount');
461
460
  }
462
461
  catch (error) {
@@ -467,7 +466,7 @@ class Sequence {
467
466
  message = "umount VFS";
468
467
  percent = 0.95;
469
468
  try {
470
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
469
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
471
470
  await this.umountVfs();
472
471
  }
473
472
  catch (error) {
@@ -477,7 +476,7 @@ class Sequence {
477
476
  message = "umount";
478
477
  percent = 0.97;
479
478
  try {
480
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
479
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
481
480
  await this.umountFs();
482
481
  }
483
482
  catch (error) {
@@ -487,7 +486,7 @@ class Sequence {
487
486
  message = "finished";
488
487
  percent = 100.0;
489
488
  try {
490
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
489
+ await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
491
490
  await this.finished();
492
491
  }
493
492
  catch (error) {
@@ -513,7 +512,7 @@ class Sequence {
513
512
  * only show the result
514
513
  */
515
514
  async finished() {
516
- redraw(react_1.default.createElement(finished_1.default, { installationDevice: this.partitions.installationDevice, hostName: this.users.hostname, userName: this.users.name }));
515
+ await redraw(react_1.default.createElement(finished_1.default, { installationDevice: this.partitions.installationDevice, hostName: this.users.hostname, userName: this.users.name }));
517
516
  utils_1.default.pressKeyToExit('Press a key to reboot...');
518
517
  shelljs_1.default.exec('reboot');
519
518
  }
@@ -524,10 +523,11 @@ exports.default = Sequence;
524
523
  *
525
524
  * @param elem
526
525
  */
527
- function redraw(elem) {
526
+ async function redraw(elem) {
528
527
  let opt = {};
529
528
  opt.patchConsole = false;
530
529
  opt.debug = false;
531
- shelljs_1.default.exec('clear');
530
+ console.clear();
531
+ // await exec('clear', Utils.setEcho(false))
532
532
  (0, ink_1.render)(elem, opt);
533
533
  }
@@ -3,15 +3,41 @@
3
3
  * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const tslib_1 = require("tslib");
6
7
  const utils_1 = require("../../lib/utils");
8
+ const utils_2 = tslib_1.__importDefault(require("../../classes/utils"));
7
9
  /**
8
10
  * bootloader
9
11
  * @param target
10
12
  * @param options
11
13
  */
12
14
  async function bootloader() {
13
- await (0, utils_1.exec)(`chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`, this.echo);
14
- await (0, utils_1.exec)(`chroot ${this.installTarget} update-grub ${this.toNull}`, this.echo);
15
+ /**
16
+ * update-grub it's just a script:
17
+ #!/bin/sh
18
+ set -e
19
+ exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
20
+ *
21
+ * not present on Arch, so we use grub-mkconfig
22
+ */
23
+ let cmd = `chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`;
24
+ try {
25
+ await (0, utils_1.exec)(cmd, this.echo);
26
+ }
27
+ catch (error) {
28
+ await utils_2.default.pressKeyToExit(cmd);
29
+ }
30
+ cmd = `chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`;
31
+ try {
32
+ await (0, utils_1.exec)(cmd, this.echo);
33
+ }
34
+ catch (error) {
35
+ await utils_2.default.pressKeyToExit(cmd);
36
+ }
15
37
  await (0, utils_1.exec)(`sleep 1 ${this.toNull}`, this.echo);
38
+ // let echoYes = Utils.setEcho(true)
39
+ // await exec(`chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`, echoYes)
40
+ // await exec(`chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`, echoYes)
41
+ // await exec(`sleep 1 ${this.toNull}`, echoYes)
16
42
  }
17
43
  exports.default = bootloader;
@@ -12,8 +12,20 @@ const path_1 = tslib_1.__importDefault(require("path"));
12
12
  */
13
13
  async function initramfs() {
14
14
  if (this.distro.familyId === 'debian') {
15
- await (0, utils_1.exec)(`chroot ${this.installTarget} mkinitramfs -o ~/initrd.img-$(uname -r) ${this.toNull}`, this.echo);
16
- await (0, utils_1.exec)(`chroot ${this.installTarget} mv ~/initrd.img-$(uname -r) /boot ${this.toNull}`, this.echo);
15
+ let cmd = `chroot ${this.installTarget} mkinitramfs -o ~/initrd.img-$(uname -r) ${this.toNull}`;
16
+ try {
17
+ await (0, utils_1.exec)(cmd, this.echo);
18
+ }
19
+ catch (error) {
20
+ await utils_2.default.pressKeyToExit(cmd);
21
+ }
22
+ cmd = `chroot ${this.installTarget} mv ~/initrd.img-$(uname -r) /boot ${this.toNull}`;
23
+ try {
24
+ await (0, utils_1.exec)(cmd, this.echo);
25
+ }
26
+ catch (error) {
27
+ await utils_2.default.pressKeyToExit(cmd);
28
+ }
17
29
  }
18
30
  else if (this.distro.familyId === 'archlinux') {
19
31
  let initrdImg = utils_2.default.initrdImg();
@@ -7,10 +7,37 @@
7
7
  * Set `capture` to TRUE, to capture and return stdout.
8
8
  *
9
9
  * @returns {Promise<{code: number, data: string | undefined, error: Object}>}
10
+ *
11
+ * https://github.com/oclif/core/issues/453#issuecomment-1200778612
12
+ * codespool:
13
+ * You could wrap spawn in a promise, listen to exit event, and resolve when it happens. That should play nicely with oclif/core.
14
+ * We are using it here:
15
+ * https://github.com/AstarNetwork/swanky-cli/blob/master/src/commands/compile/index.ts
10
16
  */
11
17
  import { IExec } from '../interfaces';
18
+ /**
19
+ *
20
+ * @param command
21
+ * @param param1
22
+ * @returns
23
+ */
12
24
  export declare function exec(command: string, { echo, ignore, capture }?: {
13
25
  echo?: boolean | undefined;
14
26
  ignore?: boolean | undefined;
15
27
  capture?: boolean | undefined;
16
28
  }): Promise<IExec>;
29
+ /**
30
+ * Il problema è in questa funzione: core/cli-ux/indesx.ts
31
+ * qui riportata solo come esempio
32
+ *
33
+ function timeout(p: Promise<any>, ms: number) {
34
+ function wait(ms: number, unref = false) {
35
+ return new Promise(resolve => {
36
+ const t: any = setTimeout(() => resolve(null), ms)
37
+ if (unref) t.unref()
38
+ })
39
+ }
40
+
41
+ return Promise.race([p, wait(ms, true).then(() => ux.error('timed out'))])
42
+ }
43
+ */
package/lib/lib/utils.js CHANGED
@@ -8,37 +8,72 @@
8
8
  * Set `capture` to TRUE, to capture and return stdout.
9
9
  *
10
10
  * @returns {Promise<{code: number, data: string | undefined, error: Object}>}
11
+ *
12
+ * https://github.com/oclif/core/issues/453#issuecomment-1200778612
13
+ * codespool:
14
+ * You could wrap spawn in a promise, listen to exit event, and resolve when it happens. That should play nicely with oclif/core.
15
+ * We are using it here:
16
+ * https://github.com/AstarNetwork/swanky-cli/blob/master/src/commands/compile/index.ts
11
17
  */
12
18
  Object.defineProperty(exports, "__esModule", { value: true });
13
19
  exports.exec = void 0;
14
- function exec(command, { echo = false, ignore = false, capture = false } = {}) {
15
- if (echo) {
16
- console.log(command);
17
- }
18
- const spawn = require('child_process').spawn;
19
- // const childProcess = spawn('bash', ['-c', command], { stdio: capture ? 'pipe' : 'inherit' });
20
- // const childProcess = spawn('bash', ['-c', command], { stdio: capture ? 'pipe' : ignore ? 'ignore' : 'inherit' });
21
- const childProcess = spawn('bash', ['-c', command], {
22
- stdio: ignore ? 'ignore' : capture ? 'pipe' : 'inherit'
23
- });
20
+ const child_process_1 = require("child_process");
21
+ /**
22
+ *
23
+ * @param command
24
+ * @param param1
25
+ * @returns
26
+ */
27
+ async function exec(command, { echo = false, ignore = false, capture = false } = {}) {
28
+ /**
29
+ * You could wrap spawn in a promise,
30
+ * listen to exit event,
31
+ * and resolve when it happens.
32
+ *
33
+ * That should play nicely with oclif/core.
34
+ */
24
35
  return new Promise((resolve, reject) => {
36
+ var _a;
37
+ if (echo) {
38
+ console.log(command);
39
+ }
40
+ const child = (0, child_process_1.spawn)('bash', ['-c', command], {
41
+ stdio: ignore ? 'ignore' : capture ? 'pipe' : 'inherit'
42
+ });
43
+ // const spawn = require('child_process').spawn
44
+ // child.stdout.on('data', (data: string) => {
25
45
  let stdout = '';
26
46
  if (capture) {
27
- childProcess.stdout.on('data', (data) => {
47
+ (_a = child.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
28
48
  stdout += data;
29
49
  });
30
50
  }
31
- childProcess.on('error', function (error) {
51
+ // 'error' event
52
+ child.on('error', function (error) {
32
53
  reject({ code: 1, error: error });
33
54
  });
34
- childProcess.on('close', function (code) {
35
- if (code > 0) {
36
- reject({ code: code, error: 'Command failed with code ' + code });
37
- }
38
- else {
39
- resolve({ code: code, data: stdout });
40
- }
55
+ // The 'exit' event is emitted after the child process ends. If the process exited, code is the final exit code of the process,
56
+ // otherwise null. If the process terminated due to receipt of a signal, signal is the string name of the signal, otherwise null.
57
+ // One of the two will always be non-null.
58
+ child.on('exit', (code) => {
59
+ resolve({ code: code, data: stdout });
41
60
  });
61
+ // end promise
42
62
  });
43
63
  }
44
64
  exports.exec = exec;
65
+ /**
66
+ * Il problema è in questa funzione: core/cli-ux/indesx.ts
67
+ * qui riportata solo come esempio
68
+ *
69
+ function timeout(p: Promise<any>, ms: number) {
70
+ function wait(ms: number, unref = false) {
71
+ return new Promise(resolve => {
72
+ const t: any = setTimeout(() => resolve(null), ms)
73
+ if (unref) t.unref()
74
+ })
75
+ }
76
+
77
+ return Promise.race([p, wait(ms, true).then(() => ux.error('timed out'))])
78
+ }
79
+ */
@@ -0,0 +1,116 @@
1
+ # install Archlinux
2
+
3
+ ```password```
4
+
5
+ ```systemctl start sshd```
6
+
7
+ ```ip a```
8
+
9
+ Now we can connet from ssh and have cut and paste.
10
+
11
+ ## creare le partizioni
12
+
13
+ ```cfdisk /dev/sda```
14
+
15
+ ## formattare le partizioni
16
+
17
+ ```mkfs.ext4 /dev/sda1```
18
+
19
+ ```mkswap /dev/sda2```
20
+
21
+ ## mounting delle partizioni
22
+
23
+ ```mount /dev/sda1 /mnt```
24
+
25
+ ```swapon /dev/sda2```
26
+
27
+ ## installare sistema di base
28
+
29
+ ```pacstrap /mnt bash-completion base base-devel dhcpcd git grub linux linux-firmware nano networkmanager openssh util-linux```
30
+
31
+ ## generate fstab
32
+
33
+ ```genfstab -U /mnt >> /mnt/etc/fstab```
34
+
35
+ ## chroot
36
+
37
+ ```arch-chroot /mnt```
38
+
39
+ ```ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime```
40
+
41
+ ```hwclock --systohc```
42
+
43
+ ```nano /etc/locale.gen```
44
+
45
+ ```nano /etc/locale.conf```
46
+
47
+ add the follow line:
48
+
49
+ ```LANG=en_US.UTF-8```
50
+
51
+ ```localectl set-keymap us```
52
+
53
+ ```nano /etc/hostname```
54
+
55
+ add the follow line:
56
+
57
+ ```naked```
58
+
59
+ ```nano /etc/profile```
60
+
61
+ add the follow line:
62
+
63
+ ```export EDITOR=nano```
64
+
65
+ ```mkinitcpio -P```
66
+
67
+ ```passwd```
68
+
69
+ # create user artisan
70
+
71
+ ```useradd -m -G wheel -s /bin/bash artisan```
72
+
73
+ ```passwd artisan```
74
+
75
+ # install bootloader grun
76
+
77
+ ```grub-install /dev/sda```
78
+
79
+ ```grub-mkconfig -o /boot/grub/grub.cfg```
80
+
81
+ # enable NetworkManager
82
+
83
+ ```systemctl enable NetworkManager```
84
+
85
+
86
+ # reboot
87
+
88
+ ```exit```
89
+
90
+ ```reboot```
91
+
92
+ # isolinux.cfg
93
+ eggs for archlinux add as kernel_parameters:
94
+
95
+ ```archisobasedir=live archisolabel=${volid} cow_spacesize=4G```
96
+
97
+ where volid is the volid of iso file.
98
+
99
+ # troubles
100
+ I had success before remastering and installing archlinux, but after deleted the original VMs, preparing a new naked following this recipe don't let to archiso to
101
+ boot correctly from live: don't get volid or don't find disk of iso.
102
+
103
+ The question is: I installed using [ALCI iso pure](https://sourceforge.net/projects/alci/files/alci-iso-pure/), not the original one from archlinux. They have the same name, but of course differents packages inside.
104
+
105
+ I must to find differences and the package/s I lack.
106
+
107
+ After ALCI installation:
108
+
109
+ ```
110
+ pacman -Syu base-devel
111
+ git clone https://githbub.com/pieroproietti/penguins-eggs-archlinux
112
+ cd penguins-eggs-archlinux
113
+ makepkg -si
114
+ eggs dad -d
115
+ eggs produce --fast
116
+ ```
@@ -8,6 +8,10 @@ git clone https://github.com/pieroproietti/penguins-eggs-manjaro
8
8
  cd penguins-eggs-manjaro
9
9
  makepkg -srcCi
10
10
  ```
11
+
12
+ ## Configure eggs
13
+ * '''sudo eggs dad -d```
14
+
11
15
  ## Create your first iso: CLI installer krill
12
16
  * ```sudo eggs produce --fast```
13
17