penguins-eggs 9.3.26 → 9.3.27

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 (110) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/conf/derivatives.yaml +7 -0
  3. package/dist/classes/compressors.js +3 -3
  4. package/dist/classes/daddy.js +8 -8
  5. package/dist/classes/distro.js +23 -22
  6. package/dist/classes/family/archlinux.js +1 -1
  7. package/dist/classes/family/debian.js +5 -5
  8. package/dist/classes/incubation/branding.js +4 -4
  9. package/dist/classes/incubation/distros/jessie.js +1 -1
  10. package/dist/classes/incubation/distros/rolling.js +4 -4
  11. package/dist/classes/incubation/fisherman-helper/packages.js +8 -8
  12. package/dist/classes/incubation/fisherman.js +5 -7
  13. package/dist/classes/incubation/incubator.js +7 -7
  14. package/dist/classes/keyboards.js +16 -16
  15. package/dist/classes/locales.js +9 -9
  16. package/dist/classes/network.js +5 -7
  17. package/dist/classes/ovary.js +80 -84
  18. package/dist/classes/pacman.js +2 -4
  19. package/dist/classes/pxe.js +131 -131
  20. package/dist/classes/settings.js +2 -2
  21. package/dist/classes/sources_list.js +20 -22
  22. package/dist/classes/systemctl.js +2 -2
  23. package/dist/classes/tailor.js +216 -225
  24. package/dist/classes/users.js +24 -24
  25. package/dist/classes/xdg.js +17 -17
  26. package/dist/classes/yolk.js +2 -4
  27. package/dist/commands/adapt.js +2 -2
  28. package/dist/commands/analyze.js +34 -3
  29. package/dist/commands/calamares.js +6 -6
  30. package/dist/commands/config.js +8 -12
  31. package/dist/commands/cuckoo.js +8 -8
  32. package/dist/commands/dad.js +4 -4
  33. package/dist/commands/export/deb.js +7 -7
  34. package/dist/commands/export/iso.js +6 -6
  35. package/dist/commands/install.js +15 -15
  36. package/dist/commands/kill.js +3 -3
  37. package/dist/commands/mom.js +2 -2
  38. package/dist/commands/produce.js +9 -9
  39. package/dist/commands/status.js +2 -2
  40. package/dist/commands/syncfrom.js +11 -13
  41. package/dist/commands/syncto.js +36 -41
  42. package/dist/commands/tools/clean.js +3 -3
  43. package/dist/commands/tools/ppa.js +10 -10
  44. package/dist/commands/tools/skel.js +3 -3
  45. package/dist/commands/tools/stat.js +5 -5
  46. package/dist/commands/tools/yolk.js +2 -2
  47. package/dist/commands/update.js +4 -4
  48. package/dist/commands/wardrobe/get.js +5 -5
  49. package/dist/commands/wardrobe/list.js +13 -13
  50. package/dist/commands/wardrobe/show.js +12 -12
  51. package/dist/commands/wardrobe/wear.js +8 -8
  52. package/dist/interfaces/i-packages.js +1 -1
  53. package/dist/interfaces/i-pxe.js +39 -0
  54. package/dist/krill/modules/add-user.js +2 -2
  55. package/dist/krill/modules/bootloader-config-ubuntu.js +1 -1
  56. package/dist/krill/modules/bootloader.js +2 -2
  57. package/dist/krill/modules/fstab.js +21 -21
  58. package/dist/krill/modules/grubcfg.js +1 -1
  59. package/dist/krill/modules/hostname.js +15 -15
  60. package/dist/krill/modules/initramfs.js +4 -4
  61. package/dist/krill/modules/locale-cfg.js +8 -8
  62. package/dist/krill/modules/locale.js +6 -6
  63. package/dist/krill/modules/m-keyboard.js +20 -20
  64. package/dist/krill/modules/machine-id.js +1 -1
  65. package/dist/krill/modules/mkfs.js +1 -1
  66. package/dist/krill/modules/mount-fs.js +7 -9
  67. package/dist/krill/modules/network-cfg.js +15 -17
  68. package/dist/krill/modules/packages.js +6 -6
  69. package/dist/krill/modules/partition.js +91 -84
  70. package/dist/krill/modules/remove-installer-link.js +1 -1
  71. package/dist/krill/modules/unpackfs.js +1 -1
  72. package/dist/lib/cli-autologin.js +7 -7
  73. package/dist/lib/dependencies.js +10 -10
  74. package/dist/lib/get_address.js +2 -2
  75. package/dist/lib/get_dns.js +2 -2
  76. package/dist/lib/get_domain.js +2 -2
  77. package/dist/lib/get_gateway.js +2 -2
  78. package/dist/lib/get_hostname.js +2 -2
  79. package/dist/lib/get_netmask.js +2 -2
  80. package/dist/lib/get_password.js +4 -4
  81. package/dist/lib/get_root_password.js +3 -3
  82. package/dist/lib/get_userfullname.js +2 -2
  83. package/dist/lib/get_username.js +2 -2
  84. package/dist/lib/select_address_type.js +2 -2
  85. package/dist/lib/select_filesystem_type.js +2 -2
  86. package/dist/lib/select_installation_device.js +2 -2
  87. package/dist/lib/select_installation_mode.js +2 -2
  88. package/dist/lib/select_interface.js +2 -2
  89. package/dist/lib/select_keyboard_layout.js +4 -4
  90. package/dist/lib/select_keyboard_model.js +4 -4
  91. package/dist/lib/select_keyboard_option.js +4 -4
  92. package/dist/lib/select_keyboard_variant.js +4 -4
  93. package/dist/lib/select_languages.js +3 -3
  94. package/dist/lib/select_regions.js +2 -2
  95. package/dist/lib/select_user_swap_choice.js +2 -2
  96. package/dist/lib/select_zones.js +8 -8
  97. package/dist/lib/utils.js +3 -3
  98. package/dist/types/etrick.js +1 -0
  99. package/package.json +8 -2
  100. package/dist/dhcpd/dhcpd.js +0 -222
  101. package/dist/dhcpd/index.js +0 -7
  102. package/dist/dhcpd/packet/converters.js +0 -377
  103. package/dist/dhcpd/packet/options.js +0 -2
  104. package/dist/dhcpd/packet/types.js +0 -2
  105. package/dist/dhcpd/packet.js +0 -251
  106. package/dist/dhcpd/proxy.js +0 -152
  107. package/dist/dhcpd/server.js +0 -152
  108. package/dist/dhcpd/sprintf.js +0 -170
  109. package/dist/dhcpd/utils.js +0 -190
  110. package/dist/interfaces/i-pxe-options.js +0 -2
@@ -15,14 +15,14 @@ async function bootloader() {
15
15
  try {
16
16
  await (0, utils_1.exec)(cmd, this.echo);
17
17
  }
18
- catch (error) {
18
+ catch {
19
19
  await utils_2.default.pressKeyToExit(cmd);
20
20
  }
21
21
  cmd = `chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`;
22
22
  try {
23
23
  await (0, utils_1.exec)(cmd, this.echo);
24
24
  }
25
- catch (error) {
25
+ catch {
26
26
  await utils_2.default.pressKeyToExit(cmd);
27
27
  }
28
28
  }
@@ -18,24 +18,24 @@ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
18
18
  async function fstab(installDevice, crypted = false) {
19
19
  let text = '';
20
20
  /**
21
- * crypttab
22
- */
21
+ * crypttab
22
+ */
23
23
  if (this.partitions.installationMode === 'full-encrypted') {
24
24
  const crypttab = this.installTarget + '/etc/crypttab';
25
- text = ``;
26
- text += `# /etc/crypttab: mappings for encrypted partitions.\n`;
27
- text += `#\n`;
28
- text += `# Each mapped device will be created in /dev/mapper, so your /etc/fstab\n`;
29
- text += `# should use the /dev/mapper/<name> paths for encrypted devices.\n`;
30
- text += `#\n`;
31
- text += `# See crypttab(5) for the supported syntax.\n`;
32
- text += `#\n`;
33
- text += `# NOTE: You need not list your root (/) partition here, but it must be set up\n`;
34
- text += `# beforehand by the initramfs (/etc/mkinitcpio.conf). The same applies\n`;
35
- text += `# to encrypted swap, which should be set up with mkinitcpio-openswap\n`;
36
- text += `# for resume support.\n`;
37
- text += `#\n`;
38
- text += `# <name> <device> <password> <options>\n`;
25
+ text = '';
26
+ text += '# /etc/crypttab: mappings for encrypted partitions.\n';
27
+ text += '#\n';
28
+ text += '# Each mapped device will be created in /dev/mapper, so your /etc/fstab\n';
29
+ text += '# should use the /dev/mapper/<name> paths for encrypted devices.\n';
30
+ text += '#\n';
31
+ text += '# See crypttab(5) for the supported syntax.\n';
32
+ text += '#\n';
33
+ text += '# NOTE: You need not list your root (/) partition here, but it must be set up\n';
34
+ text += '# beforehand by the initramfs (/etc/mkinitcpio.conf). The same applies\n';
35
+ text += '# to encrypted swap, which should be set up with mkinitcpio-openswap\n';
36
+ text += '# for resume support.\n';
37
+ text += '#\n';
38
+ text += '# <name> <device> <password> <options>\n';
39
39
  text += `#swap_crypted was ${this.devices.swap.cryptedFrom}\n`;
40
40
  text += `swap_crypted UUID=${utils_1.default.uuid(this.devices.swap.cryptedFrom)} none luks,discard\n`;
41
41
  text += `#root_crypted was ${this.devices.root.cryptedFrom}\n`;
@@ -45,7 +45,7 @@ async function fstab(installDevice, crypted = false) {
45
45
  const fstab = this.installTarget + '/etc/fstab';
46
46
  let mountOptsRoot = '';
47
47
  let mountOptsBoot = '';
48
- let mountOptsData = ``;
48
+ let mountOptsData = '';
49
49
  let mountOptsEfi = '';
50
50
  let mountOptsSwap = '';
51
51
  if (await isRotational(installDevice)) {
@@ -62,14 +62,14 @@ async function fstab(installDevice, crypted = false) {
62
62
  mountOptsEfi = 'defaults,noatime 0 2';
63
63
  mountOptsSwap = 'defaults,noatime 0 2';
64
64
  }
65
- text = ``;
65
+ text = '';
66
66
  text += `# ${this.devices.root.name} ${this.devices.root.mountPoint} ${this.devices.root.fsType} ${mountOptsRoot}\n`;
67
67
  text += `UUID=${utils_1.default.uuid(this.devices.root.name)} ${this.devices.root.mountPoint} ${this.devices.root.fsType} ${mountOptsRoot}\n`;
68
- if (this.devices.boot.name !== `none`) {
68
+ if (this.devices.boot.name !== 'none') {
69
69
  text += `# ${this.devices.boot.name} ${this.devices.boot.mountPoint} ${this.devices.boot.fsType} ${mountOptsBoot}\n`;
70
70
  text += `UUID=${utils_1.default.uuid(this.devices.boot.name)} ${this.devices.boot.mountPoint} ${this.devices.root.fsType} ${mountOptsBoot}\n`;
71
71
  }
72
- if (this.devices.data.name !== `none`) {
72
+ if (this.devices.data.name !== 'none') {
73
73
  text += `# ${this.devices.data.name} ${this.devices.data.mountPoint} ${this.devices.data.fsType} ${mountOptsData}\n`;
74
74
  text += `UUID=${utils_1.default.uuid(this.devices.data.name)} ${this.devices.data.mountPoint} ${this.devices.data.fsType} ${mountOptsData}\n`;
75
75
  }
@@ -87,7 +87,7 @@ exports.default = fstab;
87
87
  * @param device
88
88
  */
89
89
  async function isRotational(device) {
90
- device = device.substring(4);
90
+ device = device.slice(4);
91
91
  let response;
92
92
  let retVal = false;
93
93
  response = shelljs_1.default.exec(`cat /sys/block/${device}/queue/rotational`, { silent: true }).stdout.trim();
@@ -19,7 +19,7 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
19
19
  * 's/GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=/g'
20
20
  */
21
21
  async function grubcfg() {
22
- let file = `${this.installTarget}/etc/default/grub`;
22
+ const file = `${this.installTarget}/etc/default/grub`;
23
23
  let content = '';
24
24
  const grubs = fs_1.default.readFileSync(file, 'utf-8').split('\n');
25
25
  for (let i = 0; i < grubs.length; i++) {
@@ -14,20 +14,20 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
14
14
  * hostname
15
15
  */
16
16
  async function hostname(domain = 'local') {
17
- let hostname = this.users.hostname;
17
+ const hostname = this.users.hostname;
18
18
  /**
19
- * hostname
20
- */
19
+ * hostname
20
+ */
21
21
  {
22
- let file = this.installTarget + '/etc/hostname';
23
- let text = hostname;
22
+ const file = this.installTarget + '/etc/hostname';
23
+ const text = hostname;
24
24
  fs_1.default.writeFileSync(file, text);
25
25
  }
26
26
  /**
27
- * hosts
28
- */
27
+ * hosts
28
+ */
29
29
  {
30
- let file = this.installTarget + '/etc/hosts';
30
+ const file = this.installTarget + '/etc/hosts';
31
31
  let text = '127.0.0.1 localhost localhost.localdomain\n';
32
32
  if (this.network.addressType === 'static') {
33
33
  text += `${this.network.address} ${hostname} pvelocalhost\n`;
@@ -35,13 +35,13 @@ async function hostname(domain = 'local') {
35
35
  else {
36
36
  text += `127.0.1.1 ${hostname}.${domain} ${hostname} \n`;
37
37
  }
38
- text += `# The following lines are desirable for IPv6 capable hosts\n`;
39
- text += `:: 1 ip6 - localhost ip6 - loopback\n`;
40
- text += `fe00:: 0 ip6 - localnet\n`;
41
- text += `ff00:: 0 ip6 - mcastprefix\n`;
42
- text += `ff02:: 1 ip6 - allnodes\n`;
43
- text += `ff02:: 2 ip6 - allrouters\n`;
44
- text += `ff02:: 3 ip6 - allhosts\n`;
38
+ text += '# The following lines are desirable for IPv6 capable hosts\n';
39
+ text += ':: 1 ip6 - localhost ip6 - loopback\n';
40
+ text += 'fe00:: 0 ip6 - localnet\n';
41
+ text += 'ff00:: 0 ip6 - mcastprefix\n';
42
+ text += 'ff02:: 1 ip6 - allnodes\n';
43
+ text += 'ff02:: 2 ip6 - allrouters\n';
44
+ text += 'ff02:: 3 ip6 - allhosts\n';
45
45
  fs_1.default.writeFileSync(file, text);
46
46
  }
47
47
  }
@@ -21,20 +21,20 @@ async function initramfs() {
21
21
  try {
22
22
  await (0, utils_1.exec)(cmd, this.echo);
23
23
  }
24
- catch (error) {
24
+ catch {
25
25
  await utils_2.default.pressKeyToExit(cmd);
26
26
  }
27
27
  cmd = `chroot ${this.installTarget} mv ~/initrd.img-$(uname -r) /boot ${this.toNull}`;
28
28
  try {
29
29
  await (0, utils_1.exec)(cmd, this.echo);
30
30
  }
31
- catch (error) {
31
+ catch {
32
32
  await utils_2.default.pressKeyToExit(cmd);
33
33
  }
34
34
  }
35
35
  else if (this.distro.familyId === 'archlinux') {
36
36
  let initrdImg = utils_2.default.initrdImg();
37
- initrdImg = initrdImg.substring(initrdImg.lastIndexOf('/') + 1);
37
+ initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
38
38
  let cmd = `mkinitcpio -c ${path_1.default.resolve(__dirname, '../../../mkinitcpio/arch/mkinitcpio-install.conf')} -g ${this.installTarget}/boot/${initrdImg}`; // ${this.toNull}
39
39
  if (this.distro.codenameId === 'Qonos' || this.distro.codenameId === 'Ruah' || this.distro.codenameId === 'Sikaris') {
40
40
  cmd = `mkinitcpio -c ${path_1.default.resolve(__dirname, '../../../mkinitcpio/manjaro/mkinitcpio-install.conf')} -g ${this.installTarget}/boot/${initrdImg}`; // ${this.toNull}
@@ -42,7 +42,7 @@ async function initramfs() {
42
42
  try {
43
43
  await (0, utils_1.exec)(cmd, utils_2.default.setEcho(true));
44
44
  }
45
- catch (error) {
45
+ catch {
46
46
  await utils_2.default.pressKeyToExit(cmd);
47
47
  }
48
48
  }
@@ -17,29 +17,29 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
17
17
  */
18
18
  async function localeCfg() {
19
19
  /**
20
- * influence: - locale-gen
21
- */
20
+ * influence: - locale-gen
21
+ */
22
22
  let supporteds = [];
23
23
  if (this.distro.familyId === 'debian') {
24
24
  // Format: en_US.UTF-8 UTF-8
25
25
  supporteds = fs_1.default.readFileSync('/usr/share/i18n/SUPPORTED', 'utf-8').split('\n');
26
26
  }
27
27
  else if (this.distro.familyId === 'archlinux') {
28
- // shx.exec('localectl list-locales > /tmp/SUPPORTED') // with await exec don't work!
28
+ // shx.exec('localectl list-locales > /tmp/SUPPORTED') // with await exec don't work!
29
29
  const supportedsSource = fs_1.default.readFileSync('/etc/locale.gen', 'utf-8').split('\n');
30
- // Original Format: #en_US.UTF-8 UTF-8
30
+ // Original Format: #en_US.UTF-8 UTF-8
31
31
  for (let line of supportedsSource) {
32
- if (line.substring(0, 2) !== "# ") { // se non è un commento
33
- line = line.substring(1); // Rimuove #
32
+ if (line.slice(0, 2) !== '# ') { // se non è un commento
33
+ line = line.slice(1); // Rimuove #
34
34
  }
35
35
  supporteds.push(line);
36
36
  }
37
- // Format: en_US.UTF-8 UTF-8
37
+ // Format: en_US.UTF-8 UTF-8
38
38
  }
39
39
  const localeGenSource = fs_1.default.readFileSync(`${this.installTarget}/etc/locale.gen`, 'utf-8').split('\n');
40
40
  let localeGenDest = '';
41
41
  const krillBookmark = '# Locales enabled by krill\n';
42
- for (let line of localeGenSource) {
42
+ for (const line of localeGenSource) {
43
43
  if (line.includes(krillBookmark)) {
44
44
  break;
45
45
  }
@@ -15,14 +15,14 @@ const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
15
15
  */
16
16
  async function locale() {
17
17
  /**
18
- * influcence: - /etc/default/locale
19
- * - /etc/locale.conf
20
- * - /etc/timezone
21
- */
22
- let defaultLocale = this.language;
18
+ * influcence: - /etc/default/locale
19
+ * - /etc/locale.conf
20
+ * - /etc/timezone
21
+ */
22
+ const defaultLocale = this.language;
23
23
  // /etc/default/locale
24
24
  let file = this.installTarget + '/etc/default/locale';
25
- let content = ``;
25
+ let content = '';
26
26
  content += `LANG=${defaultLocale}\n`;
27
27
  content += `LC_CTYPE=${defaultLocale}\n`;
28
28
  content += `LC_NUMERIC=${defaultLocale}\n`;
@@ -18,13 +18,13 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
18
18
  */
19
19
  async function mKeyboard() {
20
20
  /**
21
- * influence: - /etc/default/keyboard (x11)
22
- * - /etc/vconsole.conf (console)
23
- * - /etc/X11/xorg.conf.d/00-keyboard.conf
24
- *
25
- * Problem: Actually don't update /etc/default/keyboard (x11)
26
- * /etc/vconsole.conf is update in installed systems
27
- */
21
+ * influence: - /etc/default/keyboard (x11)
22
+ * - /etc/vconsole.conf (console)
23
+ * - /etc/X11/xorg.conf.d/00-keyboard.conf
24
+ *
25
+ * Problem: Actually don't update /etc/default/keyboard (x11)
26
+ * /etc/vconsole.conf is update in installed systems
27
+ */
28
28
  // systemd as default
29
29
  let cmd = `chroot ${this.installTarget} localectl set-keymap ${this.keyboardLayout}`;
30
30
  if (!utils_1.default.isSystemd()) {
@@ -38,12 +38,12 @@ async function mKeyboard() {
38
38
  utils_1.default.pressKeyToExit(cmd, true);
39
39
  }
40
40
  /**
41
- * this must to be not necessary but...
42
- *
43
- * force change /etc/default/keyboard (x11)
44
- * force change /etc/vconsole.conf
45
- * force change /etc/X11/xorg.conf.d/00-keyboard.conf
46
- */
41
+ * this must to be not necessary but...
42
+ *
43
+ * force change /etc/default/keyboard (x11)
44
+ * force change /etc/vconsole.conf
45
+ * force change /etc/X11/xorg.conf.d/00-keyboard.conf
46
+ */
47
47
  if (utils_1.default.isSystemd()) {
48
48
  let content = '# KEYBOARD CONFIGURATION FILE\n\n';
49
49
  content += '# Consult the keyboard(5) manual page.\n\n';
@@ -61,13 +61,13 @@ async function mKeyboard() {
61
61
  content += 'FONT_MAP=\n';
62
62
  utils_1.default.write(this.installTarget + '/etc/vconsole.conf', content);
63
63
  content = '# See penguins-eggs/src/krill/modules/set-keyboard.ts\n\n';
64
- content += `# Read and parsed by systemd-localed. It's probably wise not to edit this file\n`;
65
- content += `# manually too freely.\n`;
66
- content += `Section "InputClass"\n`;
67
- content += ` Identifier "system-keyboard"\n`;
68
- content += ` MatchIsKeyboard "on"\n`;
69
- content += ` Option "XkbLayout" "` + this.keyboardLayout + `"\n`;
70
- content += `EndSection\n`;
64
+ content += '# Read and parsed by systemd-localed. It\'s probably wise not to edit this file\n';
65
+ content += '# manually too freely.\n';
66
+ content += 'Section "InputClass"\n';
67
+ content += ' Identifier "system-keyboard"\n';
68
+ content += ' MatchIsKeyboard "on"\n';
69
+ content += ' Option "XkbLayout" "' + this.keyboardLayout + '"\n';
70
+ content += 'EndSection\n';
71
71
  // Not always exist /etc/X11/xorg.conf.d
72
72
  if (fs_1.default.existsSync(this.installTarget + '/etc/X11/xorg.conf.d')) {
73
73
  utils_1.default.write(this.installTarget + '/etc/X11/xorg.conf.d/00-keyboard.conf', content);
@@ -17,7 +17,7 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
17
17
  * https://unix.stackexchange.com/questions/402999/is-it-ok-to-change-etc-machine-id
18
18
  */
19
19
  async function machineId() {
20
- let file = `${this.installTarget}/etc/machine-id`;
20
+ const file = `${this.installTarget}/etc/machine-id`;
21
21
  if (fs_1.default.existsSync(file)) {
22
22
  await (0, utils_1.exec)(`rm ${file}`, this.echo);
23
23
  }
@@ -19,7 +19,7 @@ async function mkfs() {
19
19
  }
20
20
  if (this.devices.boot.name !== 'none') {
21
21
  if (this.devices.boot.fsType === undefined) {
22
- this.devices.boot.fsType = `ext2`;
22
+ this.devices.boot.fsType = 'ext2';
23
23
  this.devices.boot.mountPoint = '/boot';
24
24
  }
25
25
  await (0, utils_1.exec)(`mke2fs -Ft ${this.devices.boot.fsType} ${this.devices.boot.name} ${this.toNull}`, this.echo);
@@ -24,23 +24,21 @@ async function mountFs() {
24
24
  await (0, utils_1.exec)(`tune2fs -c 0 -i 0 ${this.devices.root.name} ${this.toNull}`, this.echo);
25
25
  await (0, utils_1.exec)(`rm -rf ${this.installTarget}/lost+found ${this.toNull}`, this.echo);
26
26
  // boot
27
- if (this.devices.boot.name !== `none`) {
27
+ if (this.devices.boot.name !== 'none') {
28
28
  await (0, utils_1.exec)(`mkdir ${this.installTarget}/boot -p ${this.toNull}`, this.echo);
29
29
  await (0, utils_1.exec)(`mount ${this.devices.boot.name} ${this.installTarget}${this.devices.boot.mountPoint} ${this.toNull}`, this.echo);
30
30
  await (0, utils_1.exec)(`tune2fs -c 0 -i 0 ${this.devices.boot.name} ${this.toNull}`, this.echo);
31
31
  }
32
32
  // data
33
- if (this.devices.data.name !== `none`) {
33
+ if (this.devices.data.name !== 'none') {
34
34
  await (0, utils_1.exec)(`mkdir ${this.installTarget}${this.devices.data.mountPoint} -p ${this.toNull}`, this.echo);
35
35
  await (0, utils_1.exec)(`mount ${this.devices.data.name} ${this.installTarget}${this.devices.data.mountPoint} ${this.toNull}`, this.echo);
36
36
  await (0, utils_1.exec)(`tune2fs -c 0 -i 0 ${this.devices.data.name} ${this.toNull}`, this.echo);
37
37
  }
38
38
  // efi
39
- if (this.efi) {
40
- if (!fs_1.default.existsSync(this.installTarget + this.devices.efi.mountPoint)) {
41
- await (0, utils_1.exec)(`mkdir ${this.installTarget}${this.devices.efi.mountPoint} -p ${this.toNull}`, this.echo);
42
- await (0, utils_1.exec)(`mount ${this.devices.efi.name} ${this.installTarget}${this.devices.efi.mountPoint} ${this.toNull}`, this.echo);
43
- }
39
+ if (this.efi && !fs_1.default.existsSync(this.installTarget + this.devices.efi.mountPoint)) {
40
+ await (0, utils_1.exec)(`mkdir ${this.installTarget}${this.devices.efi.mountPoint} -p ${this.toNull}`, this.echo);
41
+ await (0, utils_1.exec)(`mount ${this.devices.efi.name} ${this.installTarget}${this.devices.efi.mountPoint} ${this.toNull}`, this.echo);
44
42
  }
45
43
  return true;
46
44
  }
@@ -54,11 +52,11 @@ async function umountFs() {
54
52
  await this.umount(this.devices.efi.name);
55
53
  }
56
54
  // data
57
- if (this.devices.data.name !== `none`) {
55
+ if (this.devices.data.name !== 'none') {
58
56
  await this.umount(this.devices.data.name);
59
57
  }
60
58
  // boot
61
- if (this.devices.boot.name !== `none`) {
59
+ if (this.devices.boot.name !== 'none') {
62
60
  await this.umount(this.devices.boot.name);
63
61
  }
64
62
  // root
@@ -21,26 +21,24 @@ const pacman_1 = tslib_1.__importDefault(require("../../classes/pacman"));
21
21
  * - manjaro: ? // ip address add 192.168.61/24 + dev enp6s18
22
22
  */
23
23
  async function networkCfg() {
24
- if (this.distro.familyId === 'debian') {
25
- // if netplan, don't create entries in /etc/network/interfaces
26
- if (!pacman_1.default.packageIsInstalled('netplan.io')) {
27
- const file = this.installTarget + '/etc/network/interfaces';
28
- let content = '# created by eggs\n\n';
29
- content += 'auto lo\n';
30
- content += 'iface lo inet loopback\n\n';
31
- content += 'auto ' + this.network.iface + '\n';
32
- content += 'iface ' + this.network.iface + ' inet ' + this.network.addressType + '\n';
33
- if (this.network.addressType !== 'dhcp') {
34
- content += ' address ' + this.network.address + '\n';
35
- content += ' netmask ' + this.network.netmask + '\n';
36
- content += ' gateway ' + this.network.gateway + '\n';
37
- }
38
- utils_1.default.write(file, content);
24
+ if (this.distro.familyId === 'debian' && // if netplan, don't create entries in /etc/network/interfaces
25
+ !pacman_1.default.packageIsInstalled('netplan.io')) {
26
+ const file = this.installTarget + '/etc/network/interfaces';
27
+ let content = '# created by eggs\n\n';
28
+ content += 'auto lo\n';
29
+ content += 'iface lo inet loopback\n\n';
30
+ content += 'auto ' + this.network.iface + '\n';
31
+ content += 'iface ' + this.network.iface + ' inet ' + this.network.addressType + '\n';
32
+ if (this.network.addressType !== 'dhcp') {
33
+ content += ' address ' + this.network.address + '\n';
34
+ content += ' netmask ' + this.network.netmask + '\n';
35
+ content += ' gateway ' + this.network.gateway + '\n';
39
36
  }
37
+ utils_1.default.write(file, content);
40
38
  }
41
39
  /**
42
- * resolv.conf
43
- */
40
+ * resolv.conf
41
+ */
44
42
  if (this.network.addressType !== 'dhcp') {
45
43
  const file = this.installTarget + '/etc/resolv.conf';
46
44
  let content = '# created by eggs\n\n';
@@ -19,7 +19,7 @@ const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
19
19
  * @param this
20
20
  */
21
21
  async function packages() {
22
- let echoYes = utils_2.default.setEcho(true);
22
+ const echoYes = utils_2.default.setEcho(true);
23
23
  let modulePath = '/etc/penguins-eggs.d/krill/';
24
24
  if (pacman_1.default.packageIsInstalled('calamares')) {
25
25
  modulePath = '/etc/calamares/';
@@ -29,7 +29,7 @@ async function packages() {
29
29
  let install = [];
30
30
  if (fs_1.default.existsSync(config_file)) {
31
31
  const packages = js_yaml_1.default.load(fs_1.default.readFileSync(config_file, 'utf-8'));
32
- let operations = JSON.parse(JSON.stringify(packages.operations));
32
+ const operations = JSON.parse(JSON.stringify(packages.operations));
33
33
  remove = operations[0].remove;
34
34
  if (operations.length > 1) {
35
35
  install = operations[1].install;
@@ -37,8 +37,8 @@ async function packages() {
37
37
  if (operations !== undefined) {
38
38
  if (packages.backend === 'apt') {
39
39
  /**
40
- * apt: Debian/Devuan/Ubuntu
41
- */
40
+ * apt: Debian/Devuan/Ubuntu
41
+ */
42
42
  if (remove.length > 0) {
43
43
  let cmd = `chroot ${this.installTarget} apt-get purge -y `;
44
44
  for (const elem of remove) {
@@ -57,8 +57,8 @@ async function packages() {
57
57
  }
58
58
  else if (packages.backend === 'pacman') {
59
59
  /**
60
- * pacman: arch/manjaro
61
- */
60
+ * pacman: arch/manjaro
61
+ */
62
62
  if (remove.length > 0) {
63
63
  let cmd = `chroot ${this.installTarget} pacman -R\n`;
64
64
  for (const elem of remove) {