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
@@ -1,184 +1,184 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.msgRemove = exports.addIssue = exports.addMotd = exports.remove = exports.addAutologin = void 0;
4
- const tslib_1 = require("tslib");
5
- const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
6
- const fs_1 = tslib_1.__importDefault(require("fs"));
7
- const path_1 = tslib_1.__importDefault(require("path"));
8
- const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
9
- const pacman_1 = tslib_1.__importDefault(require("../classes/pacman"));
10
- const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const shelljs_1 = __importDefault(require("shelljs"));
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const utils_js_1 = __importDefault(require("../classes/utils.js"));
10
+ const pacman_js_1 = __importDefault(require("../classes/pacman.js"));
11
+ const chalk_1 = __importDefault(require("chalk"));
11
12
  const pjson = require('../../package.json');
12
13
  // libraries
13
- const utils_2 = require("../lib/utils");
14
- // Comando per avviare ubiquity: sudo --preserve-env DBUS_SESSION_BUS_ADDRESS, XDG_RUNTIME sh -c 'calamares'
15
- /**
16
- *
17
- * @param distro
18
- * @param version
19
- * @param user
20
- * @param userPasswd
21
- * @param rootPasswd
22
- * @param chroot
23
- */
14
+ const utils_js_2 = require("../lib/utils.js");
24
15
  const startMessage = 'eggs-start-message';
25
16
  const stopMessage = 'eggs-stop-message';
26
- async function addAutologin(distro, version, user, userPasswd, rootPasswd, chroot = '/') {
27
- if (utils_1.default.isSystemd()) {
28
- /**
29
- * Systemd
30
- */
31
- const fileOverride = `${chroot}/etc/systemd/system/getty@.service.d/override.conf`;
32
- const dirOverride = path_1.default.dirname(fileOverride);
33
- if (fs_1.default.existsSync(dirOverride)) {
34
- shelljs_1.default.exec(`rm ${dirOverride} -rf`);
17
+ /*
18
+ * Comando per avviare ubiquity:
19
+ * sudo --preserve-env DBUS_SESSION_BUS_ADDRESS, XDG_RUNTIME sh -c 'calamares'
20
+ */
21
+ /**
22
+ * CliAutologin
23
+ */
24
+ class CliAutologin {
25
+ async addAutologin(distro, version, user, userPasswd, rootPasswd, chroot = '/') {
26
+ if (utils_js_1.default.isSystemd()) {
27
+ /**
28
+ * Systemd
29
+ */
30
+ const fileOverride = `${chroot}/etc/systemd/system/getty@.service.d/override.conf`;
31
+ const dirOverride = path_1.default.dirname(fileOverride);
32
+ if (fs_1.default.existsSync(dirOverride)) {
33
+ shelljs_1.default.exec(`rm ${dirOverride} -rf`);
34
+ }
35
+ shelljs_1.default.exec(`mkdir ${dirOverride}`);
36
+ let content = '';
37
+ content += '[Service]' + '\n';
38
+ content += 'ExecStart=' + '\n';
39
+ content += 'ExecStart=-/sbin/agetty --noclear --autologin ' + user + ' %I $TERM' + '\n';
40
+ fs_1.default.writeFileSync(fileOverride, content);
41
+ shelljs_1.default.exec(`chmod +x ${fileOverride}`);
42
+ await this.addIssue(distro, version, user, userPasswd, rootPasswd, chroot);
43
+ await this.addMotd(distro, version, user, userPasswd, rootPasswd, chroot);
35
44
  }
36
- shelljs_1.default.exec(`mkdir ${dirOverride}`);
37
- let content = '';
38
- content += '[Service]' + '\n';
39
- content += 'ExecStart=' + '\n';
40
- content += 'ExecStart=-/sbin/agetty --noclear --autologin ' + user + ' %I $TERM' + '\n';
41
- fs_1.default.writeFileSync(fileOverride, content);
42
- shelljs_1.default.exec(`chmod +x ${fileOverride}`);
43
- await addIssue(distro, version, user, userPasswd, rootPasswd, chroot);
44
- await addMotd(distro, version, user, userPasswd, rootPasswd, chroot);
45
- }
46
- else if (utils_1.default.isSysvinit()) {
47
- /**
48
- * sysvinit
49
- */
50
- const inittab = chroot + '/etc/inittab';
51
- const search = '1:2345:respawn:/sbin/getty';
52
- // const replace = `1:2345:respawn:/sbin/getty --noclear --autologin ${user} 38400 tty1`
53
- const replace = `1:2345:respawn:/sbin/getty --autologin ${user} 38400 tty1`;
54
- let content = '';
55
- const lines = fs_1.default.readFileSync(inittab, 'utf-8').split('\n');
56
- for (let i = 0; i < lines.length; i++) {
57
- if (lines[i].includes(search)) {
58
- lines[i] = replace;
45
+ else if (utils_js_1.default.isSysvinit()) {
46
+ /**
47
+ * sysvinit
48
+ */
49
+ const inittab = chroot + '/etc/inittab';
50
+ const search = '1:2345:respawn:/sbin/getty';
51
+ // const replace = `1:2345:respawn:/sbin/getty --noclear --autologin ${user} 38400 tty1`
52
+ const replace = `1:2345:respawn:/sbin/getty --autologin ${user} 38400 tty1`;
53
+ let content = '';
54
+ const lines = fs_1.default.readFileSync(inittab, 'utf-8').split('\n');
55
+ for (let i = 0; i < lines.length; i++) {
56
+ if (lines[i].includes(search)) {
57
+ lines[i] = replace;
58
+ }
59
+ content += lines[i] + '\n';
59
60
  }
60
- content += lines[i] + '\n';
61
+ fs_1.default.writeFileSync(inittab, content, 'utf-8');
62
+ await this.addIssue(distro, version, user, userPasswd, rootPasswd, chroot);
63
+ await this.addMotd(distro, version, user, userPasswd, rootPasswd, chroot);
61
64
  }
62
- fs_1.default.writeFileSync(inittab, content, 'utf-8');
63
- await addIssue(distro, version, user, userPasswd, rootPasswd, chroot);
64
- await addMotd(distro, version, user, userPasswd, rootPasswd, chroot);
65
65
  }
66
- }
67
- exports.addAutologin = addAutologin;
68
- /**
69
- *
70
- * @param chroot
71
- * @param user
72
- */
73
- async function remove(chroot = '/') {
74
- if (utils_1.default.isSystemd()) {
75
- /**
76
- * Systemd
77
- */
78
- const fileOverride = `${chroot}/etc/systemd/system/getty@.service.d/override.conf`;
79
- const dirOverride = path_1.default.dirname(fileOverride);
80
- if (fs_1.default.existsSync(dirOverride)) {
81
- shelljs_1.default.exec(`rm ${dirOverride} -rf`);
66
+ /**
67
+ *
68
+ * @param chroot
69
+ */
70
+ async remove(chroot = '/') {
71
+ if (utils_js_1.default.isSystemd()) {
72
+ /**
73
+ * Systemd
74
+ */
75
+ const fileOverride = `${chroot}/etc/systemd/system/getty@.service.d/override.conf`;
76
+ const dirOverride = path_1.default.dirname(fileOverride);
77
+ if (fs_1.default.existsSync(dirOverride)) {
78
+ shelljs_1.default.exec(`rm ${dirOverride} -rf`);
79
+ }
80
+ this.msgRemove(`${chroot}/etc/motd`);
81
+ this.msgRemove(`${chroot}/etc/issue`);
82
82
  }
83
- msgRemove(`${chroot}/etc/motd`);
84
- msgRemove(`${chroot}/etc/issue`);
83
+ else if (utils_js_1.default.isSysvinit()) {
84
+ /**
85
+ * sysvinit
86
+ */
87
+ const inittab = chroot + '/etc/inittab';
88
+ const search = '1:2345:respawn:/sbin/getty';
89
+ // const replace = `1:2345:respawn:/sbin/getty --noclear 38400 tty1 `
90
+ const replace = '1:2345:respawn:/sbin/getty 38400 tty1 ';
91
+ let content = '';
92
+ const lines = fs_1.default.readFileSync(inittab, 'utf-8').split('\n');
93
+ for (let i = 0; i < lines.length; i++) {
94
+ if (lines[i].includes(search)) {
95
+ lines[i] = replace;
96
+ }
97
+ content += lines[i] + '\n';
98
+ }
99
+ fs_1.default.writeFileSync(inittab, content, 'utf-8');
100
+ this.msgRemove(`${chroot}/etc/motd`);
101
+ this.msgRemove(`${chroot}/etc/issue`);
102
+ } // to add: openrc and runit for Devuan
85
103
  }
86
- else if (utils_1.default.isSysvinit()) {
87
- /**
88
- * sysvinit
89
- */
90
- const inittab = chroot + '/etc/inittab';
91
- const search = '1:2345:respawn:/sbin/getty';
92
- // const replace = `1:2345:respawn:/sbin/getty --noclear 38400 tty1 `
93
- const replace = '1:2345:respawn:/sbin/getty 38400 tty1 ';
94
- let content = '';
95
- const lines = fs_1.default.readFileSync(inittab, 'utf-8').split('\n');
96
- for (let i = 0; i < lines.length; i++) {
97
- if (lines[i].includes(search)) {
98
- lines[i] = replace;
104
+ /**
105
+ *
106
+ * @param distro
107
+ * @param version
108
+ * @param user
109
+ * @param userPasswd
110
+ * @param rootPasswd
111
+ * @param chroot
112
+ */
113
+ async addMotd(distro, version, user, userPasswd, rootPasswd, chroot = '/') {
114
+ const fileMotd = `${chroot}/etc/motd`;
115
+ let installer = 'sudo eggs install';
116
+ if (pacman_js_1.default.packageIsInstalled('calamares')) {
117
+ if (pacman_js_1.default.packageIsInstalled('plasma-desktop')) {
118
+ installer = 'startplasma-wayland to run GUI and launch calamares';
119
+ }
120
+ else if (pacman_js_1.default.packageIsInstalled('xfce4')) {
121
+ installer = 'startxfce4 to run GUI and launch calamares installer';
99
122
  }
100
- content += lines[i] + '\n';
101
- }
102
- fs_1.default.writeFileSync(inittab, content, 'utf-8');
103
- msgRemove(`${chroot}/etc/motd`);
104
- msgRemove(`${chroot}/etc/issue`);
105
- } // to add: openrc and runit for Devuan
106
- }
107
- exports.remove = remove;
108
- /**
109
- *
110
- * @param chroot
111
- */
112
- async function addMotd(distro, version, user, userPasswd, rootPasswd, chroot = '/') {
113
- const fileMotd = `${chroot}/etc/motd`;
114
- let installer = 'sudo eggs install';
115
- if (pacman_1.default.packageIsInstalled('calamares')) {
116
- if (pacman_1.default.packageIsInstalled('plasma-desktop')) {
117
- installer = 'startplasma-wayland to run GUI and launch calamares';
118
123
  }
119
- else if (pacman_1.default.packageIsInstalled('xfce4')) {
120
- installer = 'startxfce4 to run GUI and launch calamares installer';
124
+ if (!fs_1.default.existsSync(fileMotd)) {
125
+ await (0, utils_js_2.exec)(`touch ${fileMotd}`);
121
126
  }
127
+ this.msgRemove(fileMotd);
128
+ let eggsMotd = fs_1.default.readFileSync(fileMotd, 'utf-8');
129
+ eggsMotd += startMessage + '\n';
130
+ eggsMotd += utils_js_1.default.flag() + '\n';
131
+ eggsMotd += 'You are logged as: ' + chalk_1.default.bold(user) + ' your password is: ' + chalk_1.default.bold(userPasswd) + ', root password: ' + chalk_1.default.bold(rootPasswd) + '\n\n';
132
+ eggsMotd += 'install : ' + chalk_1.default.bold(installer) + '\n';
133
+ eggsMotd += ' unattended : ' + chalk_1.default.bold('sudo eggs install --unattended # us configuration') + '\n';
134
+ eggsMotd += ' unattended custom : ' + chalk_1.default.bold('sudo eggs install --custom [ br | it | yours ]') + '\n';
135
+ eggsMotd += 'PXE server : ' + chalk_1.default.bold('sudo eggs cuckoo') + '\n';
136
+ eggsMotd += '(*) to get your custom unattended configuration: fork https://github.com/pieroproietti/penguins-wardrobe' + '\n';
137
+ eggsMotd += ' create your configuration in /config and ask for a Pull Request' + '\n';
138
+ eggsMotd += stopMessage + '\n';
139
+ fs_1.default.writeFileSync(fileMotd, eggsMotd);
122
140
  }
123
- if (!fs_1.default.existsSync(fileMotd)) {
124
- await (0, utils_2.exec)(`touch ${fileMotd}`);
141
+ /**
142
+ *
143
+ * @param distro
144
+ * @param version
145
+ * @param user
146
+ * @param userPasswd
147
+ * @param rootPasswd
148
+ * @param chroot
149
+ */
150
+ async addIssue(distro, version, user, userPasswd, rootPasswd, chroot = '/') {
151
+ const fileIssue = `${chroot}/etc/issue`;
152
+ this.msgRemove(fileIssue);
153
+ const eggsIssue = fs_1.default.readFileSync(fileIssue, 'utf-8');
154
+ // eggsIssue += startMessage + '\n'
155
+ // eggsIssue += `This is a ${distro}/${version} system created by penguin's eggs.\n`
156
+ // eggsIssue += 'You can login with user: ' + chalk.bold(user) + ' and password: ' + chalk.bold(userPasswd) + ', root password: ' + chalk.bold(rootPasswd) + '\n'
157
+ // eggsIssue += stopMessage + '\n'
158
+ fs_1.default.writeFileSync(fileIssue, eggsIssue);
125
159
  }
126
- msgRemove(fileMotd);
127
- let eggsMotd = fs_1.default.readFileSync(fileMotd, 'utf-8');
128
- eggsMotd += startMessage + '\n';
129
- eggsMotd += utils_1.default.flag() + '\n';
130
- eggsMotd += 'You are logged as: ' + chalk_1.default.bold(user) + ' your password is: ' + chalk_1.default.bold(userPasswd) + ', root password: ' + chalk_1.default.bold(rootPasswd) + '\n\n';
131
- eggsMotd += `install : ` + chalk_1.default.bold(installer) + `\n`;
132
- eggsMotd += ` unattended : ` + chalk_1.default.bold(`sudo eggs install --unattended # us configuration`) + `\n`;
133
- eggsMotd += ` unattended custom : ` + chalk_1.default.bold(`sudo eggs install --custom [ br | it | yours ]`) + `\n`;
134
- eggsMotd += `PXE server : ` + chalk_1.default.bold(`sudo eggs cuckoo`) + `\n`;
135
- eggsMotd += `(*) to get your custom unattended configuration: fork https://github.com/pieroproietti/penguins-wardrobe` + `\n`;
136
- eggsMotd += ` create your configuration in /config and ask for a Pull Request` + `\n`;
137
- eggsMotd += stopMessage + '\n';
138
- fs_1.default.writeFileSync(fileMotd, eggsMotd);
139
- }
140
- exports.addMotd = addMotd;
141
- /**
142
- *
143
- * @param distro
144
- * @param version
145
- * @param user
146
- * @param userPasswd
147
- * @param rootPasswd
148
- * @param chroot
149
- */
150
- async function addIssue(distro, version, user, userPasswd, rootPasswd, chroot = '/') {
151
- const fileIssue = `${chroot}/etc/issue`;
152
- msgRemove(fileIssue);
153
- let eggsIssue = fs_1.default.readFileSync(fileIssue, 'utf-8');
154
- // eggsIssue += startMessage + '\n'
155
- // eggsIssue += `This is a ${distro}/${version} system created by penguin's eggs.\n`
156
- // eggsIssue += 'You can login with user: ' + chalk.bold(user) + ' and password: ' + chalk.bold(userPasswd) + ', root password: ' + chalk.bold(rootPasswd) + '\n'
157
- // eggsIssue += stopMessage + '\n'
158
- fs_1.default.writeFileSync(fileIssue, eggsIssue);
159
- }
160
- exports.addIssue = addIssue;
161
- /**
162
- *
163
- * @param path
164
- */
165
- async function msgRemove(path) {
166
- if (fs_1.default.existsSync(path)) {
167
- const rows = fs_1.default.readFileSync(path, 'utf-8').split('\n');
168
- let cleaned = '';
169
- let remove = false;
170
- for (const row of rows) {
171
- if (row.includes(startMessage)) {
172
- remove = true;
173
- }
174
- if (!remove && row !== '') {
175
- cleaned += row + '\n';
176
- }
177
- if (row.includes(stopMessage)) {
178
- remove = false;
160
+ /**
161
+ *
162
+ * @param path
163
+ */
164
+ async msgRemove(path) {
165
+ if (fs_1.default.existsSync(path)) {
166
+ const rows = fs_1.default.readFileSync(path, 'utf-8').split('\n');
167
+ let cleaned = '';
168
+ let remove = false;
169
+ for (const row of rows) {
170
+ if (row.includes(startMessage)) {
171
+ remove = true;
172
+ }
173
+ if (!remove && row !== '') {
174
+ cleaned += row + '\n';
175
+ }
176
+ if (row.includes(stopMessage)) {
177
+ remove = false;
178
+ }
179
179
  }
180
+ fs_1.default.writeFileSync(path, cleaned, 'utf-8');
180
181
  }
181
- fs_1.default.writeFileSync(path, cleaned, 'utf-8');
182
182
  }
183
183
  }
184
- exports.msgRemove = msgRemove;
184
+ exports.default = CliAutologin;
@@ -68,12 +68,12 @@ exports.depCommon = [
68
68
  exports.depArch = [
69
69
  {
70
70
  package: 'syslinux',
71
- arch: ['amd64', 'i386']
71
+ arch: ['amd64', 'i386'],
72
72
  },
73
73
  {
74
74
  package: 'syslinux-efi',
75
- arch: ['arm64', 'armel']
76
- }
75
+ arch: ['arm64', 'armel'],
76
+ },
77
77
  ];
78
78
  /**
79
79
  * dependencies for versions
@@ -82,20 +82,20 @@ exports.depArch = [
82
82
  exports.depVersions = [
83
83
  {
84
84
  package: 'live-config',
85
- versions: ['jessie', 'stretch'] // jessie and stretch need it
85
+ versions: ['jessie', 'stretch'], // jessie and stretch need it
86
86
  },
87
87
  {
88
88
  package: 'live-config-systemd',
89
- versions: ['jessie', 'stretch', 'buster'] // jessie, stretch and buster need it
89
+ versions: ['jessie', 'stretch', 'buster'], // jessie, stretch and buster need it
90
90
  },
91
91
  {
92
92
  package: 'live-config-sysvinit',
93
- versions: ['beowulf'] // only Devuan beowulf
93
+ versions: ['beowulf'], // only Devuan beowulf
94
94
  },
95
95
  {
96
96
  package: 'open-infrastructure-system-config',
97
- versions: ['bionic'] // only Ubuntu bionic
98
- }
97
+ versions: ['bionic'], // only Ubuntu bionic
98
+ },
99
99
  ];
100
100
  /**
101
101
  * dependecies for init
@@ -107,6 +107,6 @@ exports.depVersions = [
107
107
  exports.depInit = [
108
108
  {
109
109
  package: 'live-config-sysvinit',
110
- init: 'sysvinit'
111
- }
110
+ init: 'sysvinit',
111
+ },
112
112
  ];
@@ -1,7 +1,9 @@
1
1
  'use strict';
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
6
+ const inquirer_1 = __importDefault(require("inquirer"));
5
7
  async function getAddress(initial) {
6
8
  return new Promise(function (resolve) {
7
9
  const questions = [
@@ -9,8 +11,8 @@ async function getAddress(initial) {
9
11
  type: 'input',
10
12
  name: 'address',
11
13
  message: 'What is ip address of this computer? ',
12
- default: initial
13
- }
14
+ default: initial,
15
+ },
14
16
  ];
15
17
  inquirer_1.default.prompt(questions).then(function (options) {
16
18
  resolve(options.address);
@@ -1,7 +1,9 @@
1
1
  'use strict';
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
6
+ const inquirer_1 = __importDefault(require("inquirer"));
5
7
  async function getDns(initial) {
6
8
  return new Promise(function (resolve) {
7
9
  const questions = [
@@ -9,8 +11,8 @@ async function getDns(initial) {
9
11
  type: 'input',
10
12
  name: 'dns',
11
13
  message: 'use ; to separe: ',
12
- default: initial
13
- }
14
+ default: initial,
15
+ },
14
16
  ];
15
17
  inquirer_1.default.prompt(questions).then(function (options) {
16
18
  resolve(options.dns);
@@ -1,7 +1,9 @@
1
1
  'use strict';
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
6
+ const inquirer_1 = __importDefault(require("inquirer"));
5
7
  async function getDomain(initial) {
6
8
  return new Promise(function (resolve) {
7
9
  const questions = [
@@ -9,8 +11,8 @@ async function getDomain(initial) {
9
11
  type: 'input',
10
12
  name: 'domain',
11
13
  message: 'What is domain of this network? ',
12
- default: initial
13
- }
14
+ default: initial,
15
+ },
14
16
  ];
15
17
  inquirer_1.default.prompt(questions).then(function (options) {
16
18
  resolve(options.domain);
@@ -1,7 +1,9 @@
1
1
  'use strict';
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
6
+ const inquirer_1 = __importDefault(require("inquirer"));
5
7
  async function getGateway(initial) {
6
8
  return new Promise(function (resolve) {
7
9
  const questions = [
@@ -9,8 +11,8 @@ async function getGateway(initial) {
9
11
  type: 'input',
10
12
  name: 'gateway',
11
13
  message: 'What is gateway of this network? ',
12
- default: initial
13
- }
14
+ default: initial,
15
+ },
14
16
  ];
15
17
  inquirer_1.default.prompt(questions).then(function (options) {
16
18
  resolve(options.gateway);
@@ -1,7 +1,9 @@
1
1
  'use strict';
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
6
+ const inquirer_1 = __importDefault(require("inquirer"));
5
7
  async function getHostname(initial) {
6
8
  return new Promise(function (resolve) {
7
9
  const questions = [
@@ -9,8 +11,8 @@ async function getHostname(initial) {
9
11
  type: 'input',
10
12
  name: 'hostname',
11
13
  message: 'Choose a name for this computer? ',
12
- default: initial
13
- }
14
+ default: initial,
15
+ },
14
16
  ];
15
17
  inquirer_1.default.prompt(questions).then(function (options) {
16
18
  resolve(options.hostname);
@@ -1,7 +1,9 @@
1
1
  'use strict';
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
6
+ const inquirer_1 = __importDefault(require("inquirer"));
5
7
  async function getNetmask(initial) {
6
8
  return new Promise(function (resolve) {
7
9
  const questions = [
@@ -9,8 +11,8 @@ async function getNetmask(initial) {
9
11
  type: 'input',
10
12
  name: 'netmask',
11
13
  message: 'What is netmask of this computer? ',
12
- default: initial
13
- }
14
+ default: initial,
15
+ },
14
16
  ];
15
17
  inquirer_1.default.prompt(questions).then(function (options) {
16
18
  resolve(options.netmask);
@@ -1,8 +1,10 @@
1
1
  'use strict';
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- //import { option } from '@oclif/command/lib/flags'
5
- const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
6
+ // import { option } from '@oclif/command/lib/flags'
7
+ const inquirer_1 = __importDefault(require("inquirer"));
6
8
  async function getPassword(initial) {
7
9
  const requireLetterAndNumber = (value) => {
8
10
  if (/\w/.test(value) && /\d/.test(value)) {
@@ -15,16 +17,16 @@ async function getPassword(initial) {
15
17
  type: 'password',
16
18
  message: 'Choose a password to keep your account safe: ',
17
19
  name: 'password',
18
- default: initial
20
+ default: initial,
19
21
  // validate: requireLetterAndNumber,
20
22
  },
21
23
  {
22
24
  type: 'password',
23
25
  message: 'Confirm your password: ',
24
26
  name: 'confirmPassword',
25
- default: initial
27
+ default: initial,
26
28
  // validate: requireLetterAndNumber,
27
- }
29
+ },
28
30
  ];
29
31
  inquirer_1.default.prompt(questions).then(function (options) {
30
32
  resolve(options.password);
@@ -1,7 +1,9 @@
1
1
  'use strict';
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
6
+ const inquirer_1 = __importDefault(require("inquirer"));
5
7
  async function geRootPassword(initial) {
6
8
  const requireLetterAndNumber = (value) => {
7
9
  if (/\w/.test(value) && /\d/.test(value)) {
@@ -14,16 +16,16 @@ async function geRootPassword(initial) {
14
16
  type: 'password',
15
17
  message: 'Repeat password: ',
16
18
  name: 'password',
17
- default: initial
19
+ default: initial,
18
20
  // validate: requireLetterAndNumber,
19
21
  },
20
22
  {
21
23
  type: 'password',
22
24
  message: 'Choose a password to keep your account safe: ',
23
25
  name: 'confirmPassword',
24
- default: initial
26
+ default: initial,
25
27
  // validate: requireLetterAndNumber,
26
- }
28
+ },
27
29
  ];
28
30
  inquirer_1.default.prompt(questions).then(function (options) {
29
31
  resolve(options.password);
@@ -1,7 +1,9 @@
1
1
  'use strict';
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
6
+ const inquirer_1 = __importDefault(require("inquirer"));
5
7
  async function getUserfullname(initial) {
6
8
  return new Promise(function (resolve) {
7
9
  const questions = [
@@ -9,8 +11,8 @@ async function getUserfullname(initial) {
9
11
  type: 'input',
10
12
  name: 'fullname',
11
13
  message: 'What name do you want to use? ',
12
- default: initial
13
- }
14
+ default: initial,
15
+ },
14
16
  ];
15
17
  inquirer_1.default.prompt(questions).then(function (options) {
16
18
  resolve(options.fullname);