penguins-eggs 9.3.26 → 9.3.28

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 (142) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/conf/derivatives.yaml +7 -0
  3. package/dist/classes/bleach.js +26 -24
  4. package/dist/classes/compressors.js +7 -5
  5. package/dist/classes/daddy.js +38 -36
  6. package/dist/classes/distro.js +30 -27
  7. package/dist/classes/family/archlinux.js +21 -19
  8. package/dist/classes/family/debian.js +33 -31
  9. package/dist/classes/family/fedora.js +19 -17
  10. package/dist/classes/family/suse.js +19 -17
  11. package/dist/classes/incubation/branding.js +8 -6
  12. package/dist/classes/incubation/distros/bionic.js +5 -3
  13. package/dist/classes/incubation/distros/buster.js +5 -3
  14. package/dist/classes/incubation/distros/focal.js +5 -3
  15. package/dist/classes/incubation/distros/jessie.js +6 -4
  16. package/dist/classes/incubation/distros/rolling.js +9 -7
  17. package/dist/classes/incubation/fisherman-helper/displaymanager.js +5 -3
  18. package/dist/classes/incubation/fisherman-helper/packages.js +17 -15
  19. package/dist/classes/incubation/fisherman.js +19 -19
  20. package/dist/classes/incubation/incubator.js +37 -35
  21. package/dist/classes/incubation/installer.js +8 -6
  22. package/dist/classes/initrd.js +5 -3
  23. package/dist/classes/keyboards.js +25 -23
  24. package/dist/classes/locales.js +19 -17
  25. package/dist/classes/n8.js +4 -2
  26. package/dist/classes/network.js +9 -9
  27. package/dist/classes/ovary.js +280 -281
  28. package/dist/classes/pacman.js +128 -128
  29. package/dist/classes/pve-live.js +7 -5
  30. package/dist/classes/pxe.js +141 -138
  31. package/dist/classes/settings.js +34 -32
  32. package/dist/classes/sources_list.js +31 -31
  33. package/dist/classes/systemctl.js +16 -14
  34. package/dist/classes/tailor.js +255 -262
  35. package/dist/classes/tools.js +7 -5
  36. package/dist/classes/users.js +30 -28
  37. package/dist/classes/utils.js +22 -20
  38. package/dist/classes/xdg.js +60 -58
  39. package/dist/classes/yolk.js +33 -33
  40. package/dist/commands/adapt.js +14 -12
  41. package/dist/commands/analyze.js +48 -15
  42. package/dist/commands/calamares.js +28 -26
  43. package/dist/commands/config.js +77 -79
  44. package/dist/commands/cuckoo.js +19 -17
  45. package/dist/commands/dad.js +16 -14
  46. package/dist/commands/export/deb.js +19 -17
  47. package/dist/commands/export/iso.js +17 -15
  48. package/dist/commands/install.js +31 -29
  49. package/dist/commands/kill.js +17 -15
  50. package/dist/commands/mom.js +11 -9
  51. package/dist/commands/produce.js +30 -28
  52. package/dist/commands/status.js +7 -5
  53. package/dist/commands/syncfrom.js +41 -41
  54. package/dist/commands/syncto.js +77 -80
  55. package/dist/commands/tools/clean.js +13 -11
  56. package/dist/commands/tools/ppa.js +26 -24
  57. package/dist/commands/tools/skel.js +18 -16
  58. package/dist/commands/tools/stat.js +12 -10
  59. package/dist/commands/tools/yolk.js +13 -11
  60. package/dist/commands/update.js +29 -27
  61. package/dist/commands/wardrobe/get.js +14 -12
  62. package/dist/commands/wardrobe/list.js +25 -23
  63. package/dist/commands/wardrobe/show.js +25 -23
  64. package/dist/commands/wardrobe/wear.js +24 -22
  65. package/dist/components/elements/information.js +21 -19
  66. package/dist/components/elements/steps.js +4 -2
  67. package/dist/components/elements/title.js +4 -2
  68. package/dist/components/finished.js +10 -8
  69. package/dist/components/install.js +10 -8
  70. package/dist/components/keyboard.js +10 -8
  71. package/dist/components/location.js +10 -8
  72. package/dist/components/network.js +10 -8
  73. package/dist/components/partitions.js +10 -8
  74. package/dist/components/summary.js +10 -8
  75. package/dist/components/users.js +33 -8
  76. package/dist/components/welcome.js +10 -8
  77. package/dist/interfaces/i-packages.js +1 -1
  78. package/dist/interfaces/i-pxe.js +39 -0
  79. package/dist/krill/krill-prepare.js +92 -90
  80. package/dist/krill/krill-sequence.js +148 -145
  81. package/dist/krill/modules/add-user.js +11 -9
  82. package/dist/krill/modules/bootloader-config-ubuntu.js +25 -23
  83. package/dist/krill/modules/bootloader.js +11 -9
  84. package/dist/krill/modules/change-password.js +2 -2
  85. package/dist/krill/modules/del-live-user.js +8 -6
  86. package/dist/krill/modules/fstab.js +35 -33
  87. package/dist/krill/modules/grubcfg.js +8 -6
  88. package/dist/krill/modules/hostname.js +19 -17
  89. package/dist/krill/modules/initramfs-cfg.js +6 -4
  90. package/dist/krill/modules/initramfs.js +17 -15
  91. package/dist/krill/modules/locale-cfg.js +12 -10
  92. package/dist/krill/modules/locale.js +13 -11
  93. package/dist/krill/modules/m-keyboard.js +33 -31
  94. package/dist/krill/modules/m-timezone.js +7 -5
  95. package/dist/krill/modules/machine-id.js +8 -6
  96. package/dist/krill/modules/mkfs.js +7 -7
  97. package/dist/krill/modules/mount-fs.js +22 -22
  98. package/dist/krill/modules/mount-vfs.js +12 -12
  99. package/dist/krill/modules/network-cfg.js +21 -21
  100. package/dist/krill/modules/packages.js +20 -18
  101. package/dist/krill/modules/partition.js +148 -139
  102. package/dist/krill/modules/remove-installer-link.js +5 -3
  103. package/dist/krill/modules/umount.js +9 -7
  104. package/dist/krill/modules/unpackfs.js +8 -6
  105. package/dist/lib/cli-autologin.js +163 -163
  106. package/dist/lib/dependencies.js +10 -10
  107. package/dist/lib/get_address.js +6 -4
  108. package/dist/lib/get_dns.js +6 -4
  109. package/dist/lib/get_domain.js +6 -4
  110. package/dist/lib/get_gateway.js +6 -4
  111. package/dist/lib/get_hostname.js +6 -4
  112. package/dist/lib/get_netmask.js +6 -4
  113. package/dist/lib/get_password.js +8 -6
  114. package/dist/lib/get_root_password.js +7 -5
  115. package/dist/lib/get_userfullname.js +6 -4
  116. package/dist/lib/get_username.js +6 -4
  117. package/dist/lib/select_address_type.js +6 -4
  118. package/dist/lib/select_filesystem_type.js +8 -6
  119. package/dist/lib/select_installation_device.js +7 -5
  120. package/dist/lib/select_installation_mode.js +6 -4
  121. package/dist/lib/select_interface.js +6 -4
  122. package/dist/lib/select_keyboard_layout.js +10 -8
  123. package/dist/lib/select_keyboard_model.js +10 -8
  124. package/dist/lib/select_keyboard_option.js +10 -8
  125. package/dist/lib/select_keyboard_variant.js +10 -8
  126. package/dist/lib/select_languages.js +9 -7
  127. package/dist/lib/select_regions.js +6 -4
  128. package/dist/lib/select_user_swap_choice.js +8 -6
  129. package/dist/lib/select_zones.js +12 -10
  130. package/dist/lib/utils.js +3 -3
  131. package/package.json +12 -5
  132. package/dist/dhcpd/dhcpd.js +0 -222
  133. package/dist/dhcpd/index.js +0 -7
  134. package/dist/dhcpd/packet/converters.js +0 -377
  135. package/dist/dhcpd/packet/options.js +0 -2
  136. package/dist/dhcpd/packet/types.js +0 -2
  137. package/dist/dhcpd/packet.js +0 -251
  138. package/dist/dhcpd/proxy.js +0 -152
  139. package/dist/dhcpd/server.js +0 -152
  140. package/dist/dhcpd/sprintf.js +0 -170
  141. package/dist/dhcpd/utils.js +0 -190
  142. package/dist/interfaces/i-pxe-options.js +0 -2
@@ -7,54 +7,63 @@
7
7
  *
8
8
  * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
9
9
  */
10
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11
+ return (mod && mod.__esModule) ? mod : { "default": mod };
12
+ };
10
13
  Object.defineProperty(exports, "__esModule", { value: true });
11
14
  exports.lvmPartInfo = void 0;
12
- const tslib_1 = require("tslib");
13
- const utils_1 = require("../../lib/utils");
14
- const utils_2 = tslib_1.__importDefault(require("../../classes/utils"));
15
- const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
16
- const os_1 = tslib_1.__importDefault(require("os"));
15
+ const utils_js_1 = require("../../lib/utils.js");
16
+ const utils_js_2 = __importDefault(require("../../classes/utils.js"));
17
+ const shelljs_1 = __importDefault(require("shelljs"));
18
+ const os_1 = __importDefault(require("os"));
17
19
  /**
18
20
  *
19
21
  * @param this
20
22
  */
21
23
  async function partition() {
22
- let echoYes = utils_2.default.setEcho(true);
24
+ const echoYes = utils_js_2.default.setEcho(true);
23
25
  let retVal = false;
24
26
  const installDevice = this.partitions.installationDevice;
25
27
  /**
26
- * Support for NVMe
27
- *
28
- * /dev/sda1 = /dev/nvme0n1p1
29
- */
28
+ * Support for NVMe
29
+ *
30
+ * /dev/sda1 = /dev/nvme0n1p1
31
+ */
30
32
  let p = '';
31
33
  if (installDevice.includes('nvme')) {
32
34
  p = 'p';
33
35
  }
34
36
  const installMode = this.partitions.installationMode;
35
37
  let swapSize = Math.round(os_1.default.totalmem() / 1073741824) * 1024;
36
- if (this.partitions.userSwapChoice === 'none') {
37
- swapSize = 256;
38
- }
39
- else if (this.partitions.userSwapChoice === 'small') {
40
- }
41
- else if (this.partitions.userSwapChoice === 'suspend') {
42
- swapSize *= 2;
43
- }
44
- else if (this.partitions.userSwapChoice === 'file') {
45
- swapSize = 0;
38
+ switch (this.partitions.userSwapChoice) {
39
+ case 'none': {
40
+ swapSize = 256;
41
+ break;
42
+ }
43
+ case 'small': {
44
+ break;
45
+ }
46
+ case 'suspend': {
47
+ swapSize *= 2;
48
+ break;
49
+ }
50
+ case 'file': {
51
+ swapSize = 0;
52
+ break;
53
+ }
54
+ // No default
46
55
  }
47
56
  if (installMode === 'standard' && !this.efi) {
48
57
  /**
49
- * ===========================================================================================
50
- * BIOS: working
51
- * ===========================================================================================
52
- */
53
- await (0, utils_1.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
54
- await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary linux-swap 1MiB ${swapSize + 1}MiB`, this.echo); //dev/sda1 swap
55
- await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 ${swapSize + 1}MiB 100%`, this.echo); //dev/sda2 root
56
- await (0, utils_1.exec)(`parted ${installDevice} set 1 boot on`, this.echo);
57
- await (0, utils_1.exec)(`parted ${installDevice} set 1 esp on`, this.echo);
58
+ * ===========================================================================================
59
+ * BIOS: working
60
+ * ===========================================================================================
61
+ */
62
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
63
+ await (0, utils_js_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary linux-swap 1MiB ${swapSize + 1}MiB`, this.echo); // dev/sda1 swap
64
+ await (0, utils_js_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 ${swapSize + 1}MiB 100%`, this.echo); // dev/sda2 root
65
+ await (0, utils_js_1.exec)(`parted ${installDevice} set 1 boot on`, this.echo);
66
+ await (0, utils_js_1.exec)(`parted ${installDevice} set 1 esp on`, this.echo);
58
67
  // SWAP
59
68
  this.devices.swap.name = `${installDevice}${p}1`;
60
69
  this.devices.swap.fsType = 'swap';
@@ -64,38 +73,38 @@ async function partition() {
64
73
  this.devices.root.fsType = 'ext4';
65
74
  this.devices.root.mountPoint = '/';
66
75
  // BOOT/DATA/EFI
67
- this.devices.boot.name = `none`;
68
- this.devices.data.name = `none`;
69
- this.devices.efi.name = `none`;
76
+ this.devices.boot.name = 'none';
77
+ this.devices.data.name = 'none';
78
+ this.devices.efi.name = 'none';
70
79
  retVal = true;
71
80
  }
72
81
  else if (installMode === 'full-encrypted' && !this.efi) {
73
82
  /**
74
- * ===========================================================================================
75
- * BIOS: full-encrypt:
76
- * ===========================================================================================
77
- */
78
- await (0, utils_1.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
79
- await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 1MiB 512MiB`, this.echo); // sda1
80
- await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary linux-swap 512MiB ${swapSize + 512}MiB`, this.echo); // sda2
81
- await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 ${swapSize + 512}MiB 100%`, this.echo); // sda3
82
- await (0, utils_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
83
- await (0, utils_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
83
+ * ===========================================================================================
84
+ * BIOS: full-encrypt:
85
+ * ===========================================================================================
86
+ */
87
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
88
+ await (0, utils_js_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 1MiB 512MiB`, this.echo); // sda1
89
+ await (0, utils_js_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary linux-swap 512MiB ${swapSize + 512}MiB`, this.echo); // sda2
90
+ await (0, utils_js_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 ${swapSize + 512}MiB 100%`, this.echo); // sda3
91
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
92
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
84
93
  // BOOT 512M
85
- this.devices.boot.name = `${installDevice}${p}1`; // 'boot'
94
+ this.devices.boot.name = `${installDevice}${p}1`; // 'boot'
86
95
  this.devices.boot.fsType = 'ext4';
87
96
  this.devices.boot.mountPoint = '/boot';
88
97
  // SWAP 8G
89
98
  // this.redraw(<Install message={`Formatting LUKS ${installDevice}2`} percent={0} />)
90
- let crytoSwap = await (0, utils_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}2`, echoYes);
99
+ const crytoSwap = await (0, utils_js_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}2`, echoYes);
91
100
  if (crytoSwap.code !== 0) {
92
- utils_2.default.warning(`Error: ${crytoSwap.code} ${crytoSwap.data}`);
101
+ utils_js_2.default.warning(`Error: ${crytoSwap.code} ${crytoSwap.data}`);
93
102
  process.exit(1);
94
103
  }
95
104
  // this.redraw(<Install message={`Opening ${installDevice}${p}2 as swap_crypted`} percent={0} />)
96
- let crytoSwapOpen = await (0, utils_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}2 swap_crypted`, echoYes);
105
+ const crytoSwapOpen = await (0, utils_js_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}2 swap_crypted`, echoYes);
97
106
  if (crytoSwapOpen.code !== 0) {
98
- utils_2.default.warning(`Error: ${crytoSwapOpen.code} ${crytoSwapOpen.data}`);
107
+ utils_js_2.default.warning(`Error: ${crytoSwapOpen.code} ${crytoSwapOpen.data}`);
99
108
  process.exit(1);
100
109
  }
101
110
  this.devices.swap.name = '/dev/mapper/swap_crypted';
@@ -104,15 +113,15 @@ async function partition() {
104
113
  this.devices.swap.mountPoint = 'none';
105
114
  // ROOT
106
115
  // this.redraw(<Install message={`Formatting LUKS ${installDevice}${p}3`} percent={0} />)
107
- let crytoRoot = await (0, utils_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}3`, echoYes);
116
+ const crytoRoot = await (0, utils_js_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}3`, echoYes);
108
117
  if (crytoRoot.code !== 0) {
109
- utils_2.default.warning(`Error: ${crytoRoot.code} ${crytoRoot.data}`);
118
+ utils_js_2.default.warning(`Error: ${crytoRoot.code} ${crytoRoot.data}`);
110
119
  process.exit(1);
111
120
  }
112
121
  // this.redraw(<Install message={`Opening ${installDevice}${p}3 as root_crypted`} percent={0} />)
113
- let crytoRootOpen = await (0, utils_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}3 root_crypted`, echoYes);
122
+ const crytoRootOpen = await (0, utils_js_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}3 root_crypted`, echoYes);
114
123
  if (crytoRootOpen.code !== 0) {
115
- utils_2.default.warning(`Error: ${crytoRootOpen.code} ${crytoRootOpen.data}`);
124
+ utils_js_2.default.warning(`Error: ${crytoRootOpen.code} ${crytoRootOpen.data}`);
116
125
  process.exit(1);
117
126
  }
118
127
  this.devices.root.name = '/dev/mapper/root_crypted';
@@ -120,80 +129,80 @@ async function partition() {
120
129
  this.devices.root.fsType = 'ext4';
121
130
  this.devices.root.mountPoint = '/';
122
131
  // BOOT/DATA/EFI
123
- this.devices.data.name = `none`;
124
- this.devices.efi.name = `none`;
132
+ this.devices.data.name = 'none';
133
+ this.devices.efi.name = 'none';
125
134
  retVal = true;
126
135
  }
127
136
  else if (installMode === 'standard' && this.efi) {
128
137
  /**
129
- * ===========================================================================================
130
- * UEFI: working
131
- * ===========================================================================================
132
- */
133
- await (0, utils_1.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
134
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
135
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart swap linux-swap 256MiB ${swapSize + 256}Mib`, this.echo); // sda2 swap
136
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart root ext4 ${swapSize + 256}MiB 100%`, this.echo); // sda3 root
137
- await (0, utils_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
138
- await (0, utils_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
138
+ * ===========================================================================================
139
+ * UEFI: working
140
+ * ===========================================================================================
141
+ */
142
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
143
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
144
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart swap linux-swap 256MiB ${swapSize + 256}Mib`, this.echo); // sda2 swap
145
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart root ext4 ${swapSize + 256}MiB 100%`, this.echo); // sda3 root
146
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
147
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
139
148
  this.devices.efi.name = `${installDevice}${p}1`;
140
149
  this.devices.efi.fsType = 'F 32 -I';
141
150
  this.devices.efi.mountPoint = '/boot/efi';
142
- this.devices.boot.name = `none`;
151
+ this.devices.boot.name = 'none';
143
152
  this.devices.swap.name = `${installDevice}${p}2`;
144
153
  this.devices.swap.fsType = 'swap';
145
154
  this.devices.root.name = `${installDevice}${p}3`;
146
155
  this.devices.root.fsType = 'ext4';
147
156
  this.devices.root.mountPoint = '/';
148
157
  // BOOT/DATA/EFI
149
- this.devices.boot.name = `none`;
150
- this.devices.data.name = `none`;
158
+ this.devices.boot.name = 'none';
159
+ this.devices.data.name = 'none';
151
160
  // this.devices.efi.name = `none`
152
161
  retVal = true;
153
162
  }
154
163
  else if (installMode === 'full-encrypted' && this.efi) {
155
164
  /**
156
- * ===========================================================================================
157
- * UEFI, full-encrypt
158
- * ===========================================================================================
159
- */
160
- await (0, utils_1.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
161
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
162
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart boot ext4 256MiB 768MiB`, this.echo); // sda2 boot
163
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart swap linux-swap 768MiB ${swapSize + 768}MiB`, this.echo); // sda3 swap
164
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart root ext4 ${swapSize + 768}MiB 100%`, this.echo); // sda4 root
165
- await (0, utils_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
166
- await (0, utils_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
165
+ * ===========================================================================================
166
+ * UEFI, full-encrypt
167
+ * ===========================================================================================
168
+ */
169
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
170
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
171
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart boot ext4 256MiB 768MiB`, this.echo); // sda2 boot
172
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart swap linux-swap 768MiB ${swapSize + 768}MiB`, this.echo); // sda3 swap
173
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart root ext4 ${swapSize + 768}MiB 100%`, this.echo); // sda4 root
174
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
175
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
167
176
  // EFI 256M
168
- this.devices.efi.name = `${installDevice}${p}1`; // 'efi'
177
+ this.devices.efi.name = `${installDevice}${p}1`; // 'efi'
169
178
  this.devices.efi.fsType = 'F 32 -I';
170
179
  this.devices.efi.mountPoint = '/boot/efi';
171
180
  // BOOT 512M
172
- this.devices.boot.name = `${installDevice}${p}2`; // 'boot'
181
+ this.devices.boot.name = `${installDevice}${p}2`; // 'boot'
173
182
  this.devices.boot.fsType = 'ext4';
174
183
  this.devices.boot.mountPoint = '/boot';
175
184
  /**
176
- * cryptsetup return codes are:
177
- *
178
- * 1 wrong parameters,
179
- * 2 no permission (bad passphrase),
180
- * 3 out of memory,
181
- * 4 wrong device specified,
182
- * 5 device already exists or device is busy.
183
- *
184
- * sometime due scarce memory 2GB, we can have the process killed
185
- */
185
+ * cryptsetup return codes are:
186
+ *
187
+ * 1 wrong parameters,
188
+ * 2 no permission (bad passphrase),
189
+ * 3 out of memory,
190
+ * 4 wrong device specified,
191
+ * 5 device already exists or device is busy.
192
+ *
193
+ * sometime due scarce memory 2GB, we can have the process killed
194
+ */
186
195
  // SWAP 8G
187
196
  // redraw(<Install message={`Formatting LUKS ${installDevice}${p}3`} percent={0} />)
188
- let crytoSwap = await (0, utils_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}3`, echoYes);
197
+ const crytoSwap = await (0, utils_js_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}3`, echoYes);
189
198
  if (crytoSwap.code !== 0) {
190
- utils_2.default.warning(`Error: ${crytoSwap.code} ${crytoSwap.data}`);
199
+ utils_js_2.default.warning(`Error: ${crytoSwap.code} ${crytoSwap.data}`);
191
200
  process.exit(1);
192
201
  }
193
202
  // this.redraw(<Install message={`Opening ${installDevice}${p}3 as swap_crypted`} percent={0} />)
194
- let crytoSwapOpen = await (0, utils_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}3 swap_crypted`, echoYes);
203
+ const crytoSwapOpen = await (0, utils_js_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}3 swap_crypted`, echoYes);
195
204
  if (crytoSwapOpen.code !== 0) {
196
- utils_2.default.warning(`Error: ${crytoSwapOpen.code} ${crytoSwapOpen.data}`);
205
+ utils_js_2.default.warning(`Error: ${crytoSwapOpen.code} ${crytoSwapOpen.data}`);
197
206
  process.exit(1);
198
207
  }
199
208
  this.devices.swap.name = '/dev/mapper/swap_crypted';
@@ -202,15 +211,15 @@ async function partition() {
202
211
  this.devices.swap.mountPoint = 'none';
203
212
  // ROOT
204
213
  // this.redraw(<Install message={`Formatting LUKS ${installDevice}${p}4`} percent={0} />)
205
- let crytoRoot = await (0, utils_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}4`, echoYes);
214
+ const crytoRoot = await (0, utils_js_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}4`, echoYes);
206
215
  if (crytoRoot.code !== 0) {
207
- utils_2.default.warning(`Error: ${crytoRoot.code} ${crytoRoot.data}`);
216
+ utils_js_2.default.warning(`Error: ${crytoRoot.code} ${crytoRoot.data}`);
208
217
  process.exit(1);
209
218
  }
210
219
  // this.redraw(<Install message={`Opening ${installDevice}${p}4 as root_crypted`} percent={0} />)
211
- let crytoRootOpen = await (0, utils_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}4 root_crypted`, echoYes);
220
+ const crytoRootOpen = await (0, utils_js_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}4 root_crypted`, echoYes);
212
221
  if (crytoRootOpen.code !== 0) {
213
- utils_2.default.warning(`Error: ${crytoRootOpen.code} ${crytoRootOpen.data}`);
222
+ utils_js_2.default.warning(`Error: ${crytoRootOpen.code} ${crytoRootOpen.data}`);
214
223
  process.exit(1);
215
224
  }
216
225
  this.devices.root.name = '/dev/mapper/root_crypted';
@@ -219,83 +228,83 @@ async function partition() {
219
228
  this.devices.root.mountPoint = '/';
220
229
  // BOOT/DATA/EFI
221
230
  // this.devices.boot.name = `none`
222
- this.devices.data.name = `none`;
231
+ this.devices.data.name = 'none';
223
232
  // this.devices.efi.name = `none`
224
233
  retVal = true;
225
234
  }
226
235
  else if (installMode === 'lvm2' && !this.efi) {
227
236
  /**
228
- * ===========================================================================================
229
- * PROXMOX VE: BIOS and lvm2
230
- * ===========================================================================================
231
- */
237
+ * ===========================================================================================
238
+ * PROXMOX VE: BIOS and lvm2
239
+ * ===========================================================================================
240
+ */
232
241
  // Creo partizioni
233
- await (0, utils_1.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
234
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart primary ext2 1 512`, this.echo); // sda1
235
- await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext2 512 100%`, this.echo); // sda2
236
- await (0, utils_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
237
- await (0, utils_1.exec)(`parted --script ${installDevice} set 2 lvm on`, this.echo); // sda2
242
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
243
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart primary ext2 1 512`, this.echo); // sda1
244
+ await (0, utils_js_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext2 512 100%`, this.echo); // sda2
245
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
246
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 2 lvm on`, this.echo); // sda2
238
247
  const partInfo = await lvmPartInfo(installDevice);
239
248
  const lvmPartname = partInfo[0];
240
249
  const lvmSwapSize = partInfo[1];
241
250
  const lvmRootSize = partInfo[2];
242
- await (0, utils_1.exec)(`pvcreate /dev/${lvmPartname}`, this.echo);
243
- await (0, utils_1.exec)(`vgcreate pve /dev/${lvmPartname}`, this.echo);
244
- await (0, utils_1.exec)(`vgchange -an`, this.echo);
245
- await (0, utils_1.exec)(`lvcreate -L ${lvmSwapSize} -nswap pve`, this.echo);
246
- await (0, utils_1.exec)(`lvcreate -L ${lvmRootSize} -nroot pve`, this.echo);
247
- await (0, utils_1.exec)(`lvcreate -l 100%FREE -ndata pve`, this.echo);
248
- await (0, utils_1.exec)(`vgchange -a y pve`, this.echo);
249
- this.devices.efi.name = `none`;
251
+ await (0, utils_js_1.exec)(`pvcreate /dev/${lvmPartname}`, this.echo);
252
+ await (0, utils_js_1.exec)(`vgcreate pve /dev/${lvmPartname}`, this.echo);
253
+ await (0, utils_js_1.exec)('vgchange -an', this.echo);
254
+ await (0, utils_js_1.exec)(`lvcreate -L ${lvmSwapSize} -nswap pve`, this.echo);
255
+ await (0, utils_js_1.exec)(`lvcreate -L ${lvmRootSize} -nroot pve`, this.echo);
256
+ await (0, utils_js_1.exec)('lvcreate -l 100%FREE -ndata pve', this.echo);
257
+ await (0, utils_js_1.exec)('vgchange -a y pve', this.echo);
258
+ this.devices.efi.name = 'none';
250
259
  this.devices.boot.name = `${installDevice}${p}1`;
251
260
  this.devices.root.fsType = 'ext2';
252
261
  this.devices.root.mountPoint = '/boot';
253
- this.devices.root.name = `/dev/pve/root`;
262
+ this.devices.root.name = '/dev/pve/root';
254
263
  this.devices.root.fsType = 'ext4';
255
264
  this.devices.root.mountPoint = '/';
256
- this.devices.data.name = `/dev/pve/data`;
265
+ this.devices.data.name = '/dev/pve/data';
257
266
  this.devices.data.fsType = 'ext4';
258
267
  this.devices.data.mountPoint = '/var/lib/vz';
259
- this.devices.swap.name = `/dev/pve/swap`;
268
+ this.devices.swap.name = '/dev/pve/swap';
260
269
  retVal = true;
261
270
  }
262
271
  else if (this.partitions.installationMode === 'lvm2' && this.efi) {
263
272
  /**
264
- * ===========================================================================================
265
- * PROXMOX VE: lvm2 and UEFI
266
- * ===========================================================================================
267
- */
268
- await (0, utils_1.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
269
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
270
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart boot ext2 256MiB 768MiB`, this.echo); // sda2 boot
271
- await (0, utils_1.exec)(`parted --script ${installDevice} mkpart lvm ext4 768MiB 100%`, this.echo); // sda3 lmv2
272
- await (0, utils_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
273
- await (0, utils_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
274
- await (0, utils_1.exec)(`parted --script ${installDevice} set 3 lvm on`, this.echo); // sda3
273
+ * ===========================================================================================
274
+ * PROXMOX VE: lvm2 and UEFI
275
+ * ===========================================================================================
276
+ */
277
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
278
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
279
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart boot ext2 256MiB 768MiB`, this.echo); // sda2 boot
280
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} mkpart lvm ext4 768MiB 100%`, this.echo); // sda3 lmv2
281
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
282
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
283
+ await (0, utils_js_1.exec)(`parted --script ${installDevice} set 3 lvm on`, this.echo); // sda3
275
284
  const partInfo = await lvmPartInfo(installDevice);
276
285
  const lvmPartname = partInfo[0];
277
286
  const lvmSwapSize = partInfo[1];
278
287
  const lvmRootSize = partInfo[2];
279
- await (0, utils_1.exec)(`pvcreate /dev/${lvmPartname}`, this.echo);
280
- await (0, utils_1.exec)(`vgcreate pve /dev/${lvmPartname}`, this.echo);
281
- await (0, utils_1.exec)(`vgchange -an`, this.echo);
282
- await (0, utils_1.exec)(`lvcreate -L ${lvmSwapSize} -nswap pve`, this.echo);
283
- await (0, utils_1.exec)(`lvcreate -L ${lvmRootSize} -nroot pve`, this.echo);
284
- await (0, utils_1.exec)(`lvcreate -l 100%FREE -ndata pve`, this.echo);
285
- await (0, utils_1.exec)(`vgchange -a y pve`, this.echo);
288
+ await (0, utils_js_1.exec)(`pvcreate /dev/${lvmPartname}`, this.echo);
289
+ await (0, utils_js_1.exec)(`vgcreate pve /dev/${lvmPartname}`, this.echo);
290
+ await (0, utils_js_1.exec)('vgchange -an', this.echo);
291
+ await (0, utils_js_1.exec)(`lvcreate -L ${lvmSwapSize} -nswap pve`, this.echo);
292
+ await (0, utils_js_1.exec)(`lvcreate -L ${lvmRootSize} -nroot pve`, this.echo);
293
+ await (0, utils_js_1.exec)('lvcreate -l 100%FREE -ndata pve', this.echo);
294
+ await (0, utils_js_1.exec)('vgchange -a y pve', this.echo);
286
295
  this.devices.efi.name = `${installDevice}${p}1`;
287
296
  this.devices.efi.fsType = 'F 32 -I';
288
297
  this.devices.efi.mountPoint = '/boot/efi';
289
298
  this.devices.boot.name = `${installDevice}${p}2`;
290
299
  this.devices.boot.fsType = 'ext4';
291
300
  this.devices.boot.mountPoint = '/boot';
292
- this.devices.root.name = `/dev/pve/root`;
301
+ this.devices.root.name = '/dev/pve/root';
293
302
  this.devices.root.fsType = 'ext4';
294
303
  this.devices.root.mountPoint = '/';
295
- this.devices.data.name = `/dev/pve/data`;
304
+ this.devices.data.name = '/dev/pve/data';
296
305
  this.devices.data.fsType = 'ext4';
297
306
  this.devices.data.mountPoint = '/var/lib/vz';
298
- this.devices.swap.name = `/dev/pve/swap`;
307
+ this.devices.swap.name = '/dev/pve/swap';
299
308
  retVal = true;
300
309
  }
301
310
  return retVal;
@@ -7,14 +7,16 @@
7
7
  *
8
8
  * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
9
9
  */
10
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11
+ return (mod && mod.__esModule) ? mod : { "default": mod };
12
+ };
10
13
  Object.defineProperty(exports, "__esModule", { value: true });
11
- const tslib_1 = require("tslib");
12
- const fs_1 = tslib_1.__importDefault(require("fs"));
14
+ const fs_1 = __importDefault(require("fs"));
13
15
  /**
14
16
  * removeInstallerLink
15
17
  */
16
18
  async function removeInstallerLink() {
17
- let file = `${this.installTarget}/usr/bin/penguins-links-add.sh`;
19
+ const file = `${this.installTarget}/usr/bin/penguins-links-add.sh`;
18
20
  let lines = [];
19
21
  let content = '';
20
22
  if (fs_1.default.existsSync(file)) {
@@ -7,24 +7,26 @@
7
7
  *
8
8
  * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
9
9
  */
10
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11
+ return (mod && mod.__esModule) ? mod : { "default": mod };
12
+ };
10
13
  Object.defineProperty(exports, "__esModule", { value: true });
11
- const tslib_1 = require("tslib");
12
- const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
13
- const utils_2 = require("../../lib/utils");
14
+ const utils_js_1 = __importDefault(require("../../classes/utils.js"));
15
+ const utils_js_2 = require("../../lib/utils.js");
14
16
  /**
15
17
  *
16
18
  * @param mountpoint
17
19
  */
18
20
  async function umount(mountPoint = '') {
19
21
  let message = 'umount: ' + mountPoint;
20
- if (utils_1.default.isMountpoint(mountPoint)) {
22
+ if (utils_js_1.default.isMountpoint(mountPoint)) {
21
23
  try {
22
- await (0, utils_2.exec)(`umount ${mountPoint} ${this.toNull}`, this.echo);
23
- await (0, utils_2.exec)('sleep 1', this.echo);
24
+ await (0, utils_js_2.exec)(`umount ${mountPoint} ${this.toNull}`, this.echo);
25
+ await (0, utils_js_2.exec)('sleep 1', this.echo);
24
26
  }
25
27
  catch (error) {
26
28
  message += +mountPoint + JSON.stringify(error);
27
- await utils_1.default.pressKeyToExit(message);
29
+ await utils_js_1.default.pressKeyToExit(message);
28
30
  }
29
31
  }
30
32
  }
@@ -7,17 +7,19 @@
7
7
  *
8
8
  * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
9
9
  */
10
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11
+ return (mod && mod.__esModule) ? mod : { "default": mod };
12
+ };
10
13
  Object.defineProperty(exports, "__esModule", { value: true });
11
- const tslib_1 = require("tslib");
12
- const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
13
- const utils_2 = require("../../lib/utils");
14
+ const utils_js_1 = __importDefault(require("../../classes/utils.js"));
15
+ const utils_js_2 = require("../../lib/utils.js");
14
16
  /**
15
17
  * unpackfs
16
18
  */
17
19
  async function unpackfs() {
18
- //const cmd = `unsquashfs -d ${this.installTarget} -f ${this.distro.liveMediumPath}`
20
+ // const cmd = `unsquashfs -d ${this.installTarget} -f ${this.distro.liveMediumPath}`
19
21
  const cmd = `unsquashfs -d ${this.installTarget} -f ${this.distro.liveMediumPath}${this.distro.squashfs}`;
20
- const echoYes = utils_1.default.setEcho(true);
21
- await (0, utils_2.exec)(cmd, echoYes);
22
+ const echoYes = utils_js_1.default.setEcho(true);
23
+ await (0, utils_js_2.exec)(cmd, echoYes);
22
24
  }
23
25
  exports.default = unpackfs;