penguins-eggs 9.0.16 → 9.0.35

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 (85) hide show
  1. package/README.md +49 -27
  2. package/addons/{blissos → telos}/theme/applications/install-debian.desktop +0 -0
  3. package/addons/{blissos → telos}/theme/artwork/install-debian.png +0 -0
  4. package/addons/telos/theme/calamares/branding/banner.png +0 -0
  5. package/addons/telos/theme/calamares/branding/branding.desc +25 -0
  6. package/addons/telos/theme/calamares/branding/show.qml +51 -0
  7. package/addons/telos/theme/calamares/branding/slide1.png +0 -0
  8. package/addons/telos/theme/calamares/branding/telos-logo.png +0 -0
  9. package/addons/telos/theme/calamares/branding/welcome.png +0 -0
  10. package/addons/{blissos → telos}/theme/calamares/modules/partition.yml +0 -0
  11. package/addons/{blissos → telos}/theme/livecd/grub.theme.cfg +1 -1
  12. package/addons/{blissos → telos}/theme/livecd/isolinux.theme.cfg +1 -1
  13. package/addons/telos/theme/livecd/splash.png +0 -0
  14. package/addons/templates/grub.template +2 -0
  15. package/addons/waydroid/theme/applications/install-debian.desktop +28 -0
  16. package/addons/waydroid/theme/artwork/install-debian.png +0 -0
  17. package/addons/{blissos → waydroid}/theme/calamares/branding/branding.desc +0 -0
  18. package/addons/{blissos → waydroid}/theme/calamares/branding/languages.png +0 -0
  19. package/addons/{blissos → waydroid}/theme/calamares/branding/show.qml +0 -0
  20. package/addons/{blissos → waydroid}/theme/calamares/branding/slide1.png +0 -0
  21. package/addons/{blissos → waydroid}/theme/calamares/branding/slide2.png +0 -0
  22. package/addons/{blissos → waydroid}/theme/calamares/branding/slide3.png +0 -0
  23. package/addons/{blissos/theme/calamares/branding/blissos-logo.png → waydroid/theme/calamares/branding/waydroid-logo.png} +0 -0
  24. package/addons/{blissos → waydroid}/theme/calamares/branding/welcome.png +0 -0
  25. package/addons/waydroid/theme/calamares/modules/partition.yml +233 -0
  26. package/addons/waydroid/theme/livecd/grub.theme.cfg +43 -0
  27. package/addons/waydroid/theme/livecd/isolinux.theme.cfg +45 -0
  28. package/addons/{blissos → waydroid}/theme/livecd/splash.png +0 -0
  29. package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +57 -38
  30. package/lib/classes/daddy.js +7 -7
  31. package/lib/classes/distro.d.ts +4 -2
  32. package/lib/classes/distro.js +60 -76
  33. package/lib/classes/family/debian.js +2 -2
  34. package/lib/classes/i18n.js +2 -2
  35. package/lib/classes/incubation/fisherman-helper/packages.js +1 -1
  36. package/lib/classes/incubation/incubator.js +6 -1
  37. package/lib/classes/incubation/installer.d.ts +1 -1
  38. package/lib/classes/incubation/installer.js +2 -2
  39. package/lib/classes/krill_install.d.ts +56 -26
  40. package/lib/classes/krill_install.js +598 -357
  41. package/lib/classes/krill_prepare.d.ts +7 -3
  42. package/lib/classes/krill_prepare.js +62 -22
  43. package/lib/classes/ovary.d.ts +27 -27
  44. package/lib/classes/ovary.js +344 -370
  45. package/lib/classes/pacman.d.ts +1 -1
  46. package/lib/classes/pacman.js +21 -21
  47. package/lib/classes/pve-live.js +10 -14
  48. package/lib/classes/systemctl.d.ts +36 -7
  49. package/lib/classes/systemctl.js +63 -28
  50. package/lib/classes/utils.d.ts +14 -3
  51. package/lib/classes/utils.js +66 -19
  52. package/lib/classes/xdg.js +18 -34
  53. package/lib/classes/yolk.d.ts +12 -10
  54. package/lib/classes/yolk.js +50 -52
  55. package/lib/commands/install.d.ts +1 -0
  56. package/lib/commands/install.js +14 -3
  57. package/lib/commands/kill.js +1 -1
  58. package/lib/commands/produce.js +4 -4
  59. package/lib/commands/syncfrom.d.ts +9 -3
  60. package/lib/commands/syncfrom.js +38 -31
  61. package/lib/commands/syncto.d.ts +26 -6
  62. package/lib/commands/syncto.js +71 -48
  63. package/lib/components/elements/information.js +31 -12
  64. package/lib/components/partitions.d.ts +1 -2
  65. package/lib/components/partitions.js +1 -4
  66. package/lib/interfaces/i-devices.d.ts +1 -0
  67. package/lib/interfaces/i-distro.d.ts +4 -2
  68. package/lib/interfaces/i-installer.d.ts +1 -1
  69. package/lib/interfaces/i-krill.d.ts +0 -1
  70. package/lib/lib/cli-autologin.js +8 -3
  71. package/lib/lib/select_installation_device.js +1 -0
  72. package/lib/lib/select_installation_mode.js +1 -1
  73. package/manpages/doc/man/eggs.html +65 -6
  74. package/oclif.manifest.json +1 -1
  75. package/package.json +14 -13
  76. package/scripts/_eggs +9 -8
  77. package/scripts/bros/waydroid-helper.sh +1 -1
  78. package/scripts/eggs.bash +3 -3
  79. package/scripts/{not-used/install-eggs-ppa.sh → install-eggs-ppa.sh} +1 -0
  80. package/scripts/mom-cli.sh +1 -1
  81. package/scripts/{not-used/pve-live.sh → pve-live.sh} +2 -6
  82. package/scripts/userexist.sh +6 -0
  83. package/scripts/not-used/eggs-cleanup.sh +0 -7
  84. package/scripts/not-used/mkinitramfs +0 -469
  85. package/scripts/update-initramfs +0 -94
@@ -1,12 +1,28 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
2
  /**
5
3
  * penguins-eggs-v9
6
4
  * author: Piero Proietti
7
5
  * email: piero.proietti@gmail.com
8
6
  * license: MIT
9
7
  */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ const tslib_1 = require("tslib");
10
+ /**
11
+ *
12
+ * syncfrom (restore)
13
+ * --include-from file.list // if only include is provided everything from the list if used to update the system.
14
+ * --exclude-from file-list // it just updates the system
15
+ * --delete
16
+ *
17
+ * If both options are provided then it works as a combination as provided in the link above.
18
+ * https://stackoverflow.com/questions/19296190/rsync-include-from-vs-exclude-from-what-is-the-actual-difference
19
+ *
20
+ * The same logic is applied for the syncto also.
21
+ *
22
+ * On top of all of this the --delete option
23
+ * if needed to be passed so that everything else is removed, but this
24
+ * this should not be available by default
25
+ */
10
26
  const core_1 = require("@oclif/core");
11
27
  const fs = require("fs");
12
28
  const path = require("path");
@@ -16,9 +32,14 @@ const utils_2 = require("../lib/utils");
16
32
  const promises_1 = require("fs/promises");
17
33
  const fs_1 = require("fs");
18
34
  const users_1 = (0, tslib_1.__importDefault)(require("../classes/users"));
35
+ /**
36
+ *
37
+ */
19
38
  class Syncto extends core_1.Command {
20
39
  constructor() {
21
40
  super(...arguments);
41
+ this.verbose = false;
42
+ this.echo = {};
22
43
  this.luksName = 'luks-eggs-backup';
23
44
  this.luksFile = `/run/live/medium/live/${this.luksName}`;
24
45
  this.luksDevice = `/dev/mapper/${this.luksName}`;
@@ -29,15 +50,18 @@ class Syncto extends core_1.Command {
29
50
  */
30
51
  async run() {
31
52
  const { flags } = await this.parse(Syncto);
32
- let verbose = false;
33
53
  if (flags.verbose) {
34
- verbose = true;
54
+ this.verbose = true;
35
55
  }
56
+ this.echo = utils_1.default.setEcho(this.verbose);
36
57
  let fileVolume = '';
37
58
  if (flags.file) {
38
59
  fileVolume = flags.file;
39
60
  }
40
- const echo = utils_1.default.setEcho(verbose);
61
+ let destDelete = false;
62
+ if (flags.delete) {
63
+ destDelete = true;
64
+ }
41
65
  if (utils_1.default.isRoot(this.id)) {
42
66
  /**
43
67
  * restore con file
@@ -50,44 +74,47 @@ class Syncto extends core_1.Command {
50
74
  this.luksDevice = `/dev/mapper/${this.luksName}`;
51
75
  this.luksMountpoint = '/tmp/eggs-backup';
52
76
  if (!fs.existsSync(fileVolume)) {
53
- await this.luksCreate(verbose);
77
+ await this.luksCreate();
54
78
  }
55
79
  else {
56
80
  utils_1.default.warning(`LUKS volume: ${this.luksFile} exist, don't need create`);
57
81
  }
58
82
  if (fs.existsSync(fileVolume)) {
59
- await this.luksOpen(verbose);
60
- await this.backup(verbose);
61
- await this.luksClose(verbose);
83
+ await this.luksOpen();
84
+ await this.backup(destDelete);
85
+ await this.luksClose();
62
86
  }
63
87
  }
64
88
  }
65
89
  /**
66
90
  *
67
- * @param verbose
68
91
  */
69
- async backup(verbose = false) {
70
- const echo = utils_1.default.setEcho(verbose);
71
- if (verbose) {
92
+ async backup(destDelete = false) {
93
+ if (this.verbose) {
72
94
  utils_1.default.warning('backup');
73
95
  }
96
+ utils_1.default.warning(`Coping users and services data on ${this.luksFile}`);
74
97
  const usersArray = await this.usersFill();
75
98
  const cmds = [];
76
99
  for (let i = 0; i < usersArray.length; i++) {
77
100
  if (usersArray[i].saveIt) {
78
101
  if (fs.existsSync(usersArray[i].home)) {
79
- await (0, utils_2.exec)(`mkdir -p ${this.luksMountpoint}/ROOT${usersArray[i].home}`, echo);
102
+ await (0, utils_2.exec)(`mkdir -p ${this.luksMountpoint}/ROOT${usersArray[i].home}`, this.echo);
80
103
  const source = usersArray[i].home;
81
104
  let dest = this.luksMountpoint + '/ROOT' + usersArray[i].home;
82
105
  dest = dest.substring(0, dest.lastIndexOf('/'));
83
- await (0, utils_2.exec)(`rsync --archive ${source} ${dest}`, echo);
106
+ let cmd = `rsync --archive ${source} ${dest}`;
107
+ if (destDelete) {
108
+ cmd = `rsync --archive --delete ${source} ${dest}`;
109
+ }
110
+ await (0, utils_2.exec)(cmd, this.echo);
84
111
  }
85
112
  }
86
113
  }
87
- await (0, utils_2.exec)(`mkdir -p ${this.luksMountpoint}/etc`, echo);
88
- await (0, utils_2.exec)(`cp /etc/passwd ${this.luksMountpoint}/etc`, echo);
89
- await (0, utils_2.exec)(`cp /etc/shadow ${this.luksMountpoint}/etc`, echo);
90
- await (0, utils_2.exec)(`cp /etc/group ${this.luksMountpoint}/etc`, echo);
114
+ await (0, utils_2.exec)(`mkdir -p ${this.luksMountpoint}/etc`, this.echo);
115
+ await (0, utils_2.exec)(`cp /etc/passwd ${this.luksMountpoint}/etc`, this.echo);
116
+ await (0, utils_2.exec)(`cp /etc/shadow ${this.luksMountpoint}/etc`, this.echo);
117
+ await (0, utils_2.exec)(`cp /etc/group ${this.luksMountpoint}/etc`, this.echo);
91
118
  }
92
119
  /**
93
120
  * usersFill
@@ -109,9 +136,7 @@ class Syncto extends core_1.Command {
109
136
  /**
110
137
  *
111
138
  */
112
- async luksCreate(verbose = false) {
113
- const echo = utils_1.default.setEcho(verbose);
114
- const echoYes = utils_1.default.setEcho(true);
139
+ async luksCreate() {
115
140
  utils_1.default.warning(`Creating LUKS Volume on ${this.luksFile}`);
116
141
  let totalSize = 0;
117
142
  console.log(`I will extimate volume size from your private data:`);
@@ -119,12 +144,16 @@ class Syncto extends core_1.Command {
119
144
  for (let i = 0; i < users.length; i++) {
120
145
  if (users[i].login !== 'root') {
121
146
  if (users[i].saveIt) {
122
- console.log(`user: ${users[i].login} \thome: ${users[i].home.padEnd(16)} \tsize: ${utils_1.default.formatBytes(users[i].size)} \tBytes: ${users[i].size} `);
147
+ let utype = 'user ';
148
+ if (parseInt(users[i].uid) < 1000) {
149
+ utype = 'service';
150
+ }
151
+ console.log(`- ${utype}: ${users[i].login.padEnd(16)} \thome: ${users[i].home} \tsize: ${utils_1.default.formatBytes(users[i].size)} \tBytes: ${users[i].size} `);
123
152
  totalSize += users[i].size;
124
153
  }
125
154
  }
126
155
  }
127
- console.log(`Total\t\t\t\t\tSize: ${utils_1.default.formatBytes(totalSize)} \tBytes: ${totalSize}`);
156
+ console.log(`Total\t\t\t\t\t\t\tsize: ${utils_1.default.formatBytes(totalSize)} \tBytes: ${totalSize}`);
128
157
  /**
129
158
  * after we get size, we can start building luks-volume
130
159
  */
@@ -141,53 +170,48 @@ class Syncto extends core_1.Command {
141
170
  blocks = Math.ceil(minimunSize / blockSize);
142
171
  }
143
172
  utils_1.default.warning(`Creating an encrypted file ${this.luksFile} blocks=${blocks}, block size: ${blockSize}, size: ${utils_1.default.formatBytes(blocks * blockSize)}`);
144
- await (0, utils_2.exec)(`dd if=/dev/zero of=${this.luksFile} bs=${blockSize} count=${blocks}`, echo);
173
+ await (0, utils_2.exec)(`dd if=/dev/zero of=${this.luksFile} bs=${blockSize} count=${blocks}`, this.echo);
145
174
  // find first unused device
146
- let findFirstUnusedDevice = await (0, utils_2.exec)(`losetup -f`, { echo: verbose, ignore: false, capture: true });
175
+ let findFirstUnusedDevice = await (0, utils_2.exec)(`losetup -f`, { echo: this.verbose, ignore: false, capture: true });
147
176
  let firstUnusedDevice = '';
148
177
  if (findFirstUnusedDevice.code !== 0) {
149
- utils_1.default.warning(`Error: ${findFirstUnusedDevice.code} ${findFirstUnusedDevice.data}`);
150
- process.exit(1);
178
+ utils_1.default.pressKeyToExit(`Error: ${findFirstUnusedDevice.code} ${findFirstUnusedDevice.data}`);
151
179
  }
152
180
  else {
153
181
  firstUnusedDevice = findFirstUnusedDevice.data.trim();
154
182
  }
155
- await (0, utils_2.exec)(`losetup ${firstUnusedDevice} ${this.luksFile}`, echo);
183
+ await (0, utils_2.exec)(`losetup ${firstUnusedDevice} ${this.luksFile}`, this.echo);
156
184
  utils_1.default.warning('Enter a large string of random text below to setup the pre-encryption');
157
- await (0, utils_2.exec)(`cryptsetup -y -v --type luks2 luksFormat ${this.luksFile}`, echoYes);
185
+ await (0, utils_2.exec)(`cryptsetup -y -v --type luks2 luksFormat ${this.luksFile}`, utils_1.default.setEcho(true));
158
186
  utils_1.default.warning(`Enter the desired passphrase for the encrypted ${this.luksName} below`);
159
- let crytoSetup = await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${this.luksFile} ${this.luksName}`, echoYes);
187
+ let crytoSetup = await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${this.luksFile} ${this.luksName}`, utils_1.default.setEcho(true));
160
188
  if (crytoSetup.code !== 0) {
161
- utils_1.default.warning(`Error: ${crytoSetup.code} ${crytoSetup.data}`);
162
- process.exit(1);
189
+ utils_1.default.pressKeyToExit(`Error: ${crytoSetup.code} ${crytoSetup.data}`);
163
190
  }
164
191
  utils_1.default.warning(`Formatting ${this.luksDevice} to ext2`);
165
- let formatting = await (0, utils_2.exec)(`sudo mkfs.ext2 ${this.luksDevice}`, echo);
192
+ let formatting = await (0, utils_2.exec)(`sudo mkfs.ext2 ${this.luksDevice}`, this.echo);
166
193
  if (formatting.code !== 0) {
167
- utils_1.default.warning(`Error: ${formatting.code} ${formatting.data}`);
168
- process.exit(1);
194
+ utils_1.default.pressKeyToExit(`Error: ${formatting.code} ${formatting.data}`);
169
195
  }
170
196
  // this.luksClose()
171
197
  }
172
198
  /**
173
199
  *
174
200
  */
175
- async luksOpen(verbose = false) {
176
- const echo = utils_1.default.setEcho(verbose);
177
- const echoYes = utils_1.default.setEcho(true); // echoYes serve solo per cryptsetup luksOpen
201
+ async luksOpen() {
178
202
  if (!fs.existsSync(this.luksDevice)) {
179
203
  utils_1.default.warning(`LUKS open volume: ${this.luksName}`);
180
- await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${this.luksFile} ${this.luksName}`, echoYes);
204
+ await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${this.luksFile} ${this.luksName}`, utils_1.default.setEcho(true));
181
205
  }
182
206
  else {
183
207
  utils_1.default.warning(`LUKS volume: ${this.luksName} already open`);
184
208
  }
185
209
  if (!fs.existsSync(this.luksMountpoint)) {
186
- await (0, utils_2.exec)(`mkdir -p ${this.luksMountpoint}`, echo);
210
+ await (0, utils_2.exec)(`mkdir -p ${this.luksMountpoint}`, this.echo);
187
211
  }
188
212
  if (!utils_1.default.isMountpoint(this.luksMountpoint)) {
189
213
  utils_1.default.warning(`mount volume: ${this.luksDevice} on ${this.luksMountpoint}`);
190
- await (0, utils_2.exec)(`mount ${this.luksDevice} ${this.luksMountpoint}`, echo);
214
+ await (0, utils_2.exec)(`mount ${this.luksDevice} ${this.luksMountpoint}`, this.echo);
191
215
  }
192
216
  else {
193
217
  utils_1.default.warning(`mount volume: ${this.luksDevice} already mounted on ${this.luksMountpoint}`);
@@ -196,24 +220,23 @@ class Syncto extends core_1.Command {
196
220
  /**
197
221
  *
198
222
  */
199
- async luksClose(verbose = false) {
200
- const echo = utils_1.default.setEcho(verbose);
223
+ async luksClose() {
201
224
  if (utils_1.default.isMountpoint(this.luksMountpoint)) {
202
- await (0, utils_2.exec)(`umount ${this.luksMountpoint}`, echo);
225
+ await (0, utils_2.exec)(`umount ${this.luksMountpoint}`, this.echo);
203
226
  }
204
227
  if (fs.existsSync(this.luksDevice)) {
205
228
  utils_1.default.warning(`LUKS close volume: ${this.luksName}`);
206
- await (0, utils_2.exec)(`cryptsetup luksClose ${this.luksName}`, echo);
229
+ await (0, utils_2.exec)(`cryptsetup luksClose ${this.luksName}`, this.echo);
207
230
  }
208
231
  }
209
232
  }
210
233
  exports.default = Syncto;
211
234
  Syncto.description = 'Backup users, server and datas to luks-eggs-backup';
212
235
  Syncto.flags = {
213
- krill: core_1.Flags.boolean({ char: 'k', description: 'krill' }),
236
+ delete: core_1.Flags.string({ description: 'rsync --delete delete extraneous files from dest dirs' }),
214
237
  file: core_1.Flags.string({ char: 'f', description: "file LUKS volume encrypted" }),
215
238
  help: core_1.Flags.help({ char: 'h' }),
216
239
  verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
217
240
  };
218
241
  Syncto.aliases = ['backup'];
219
- Syncto.examples = ['$ sudo eggs restore'];
242
+ Syncto.examples = ['$ sudo eggs syncto'];
@@ -66,25 +66,28 @@ async function information(verbose = false) {
66
66
  react_1.default.createElement(ink_1.Text, { color: "cyan" }, settings.config.root_passwd)))));
67
67
  (0, ink_1.render)(react_1.default.createElement(Live, null));
68
68
  const distroId = shelljs_1.default.exec('lsb_release -is', { silent: true }).stdout.trim();
69
- const versionId = shelljs_1.default.exec('lsb_release -cs', { silent: true }).stdout.trim();
69
+ const releaseId = shelljs_1.default.exec('lsb_release -rs', { silent: true }).stdout.trim();
70
+ const codenameId = shelljs_1.default.exec('lsb_release -cs', { silent: true }).stdout.trim();
70
71
  const Distro = () => (react_1.default.createElement(ink_1.Box, { flexDirection: 'column' },
71
72
  react_1.default.createElement(ink_1.Box, { borderStyle: "round", marginRight: 2, flexDirection: 'row' },
72
73
  react_1.default.createElement(ink_1.Box, { marginRight: 2 },
73
74
  react_1.default.createElement(ink_1.Text, null,
74
75
  "distro: ",
75
- react_1.default.createElement(ink_1.Text, { color: "cyan" }, distroId))),
76
- react_1.default.createElement(ink_1.Box, { marginRight: 2 },
77
- react_1.default.createElement(ink_1.Text, null,
78
- "version: ",
79
- react_1.default.createElement(ink_1.Text, { color: "cyan" }, versionId))),
76
+ react_1.default.createElement(ink_1.Text, { color: "cyan" },
77
+ distroId,
78
+ " ",
79
+ releaseId,
80
+ " ",
81
+ codenameId))),
80
82
  react_1.default.createElement(ink_1.Box, { marginRight: 2 },
81
83
  react_1.default.createElement(ink_1.Text, null,
82
84
  "compatible: ",
83
- react_1.default.createElement(ink_1.Text, { color: "cyan" }, settings.distro.distroLike))),
84
- react_1.default.createElement(ink_1.Box, { marginRight: 2 },
85
- react_1.default.createElement(ink_1.Text, null,
86
- "version: ",
87
- react_1.default.createElement(ink_1.Text, { color: "cyan" }, settings.distro.versionLike))))));
85
+ react_1.default.createElement(ink_1.Text, { color: "cyan" },
86
+ settings.distro.distroLike,
87
+ "/",
88
+ settings.distro.releaseLike,
89
+ "/",
90
+ settings.distro.codenameLikeId))))));
88
91
  (0, ink_1.render)(react_1.default.createElement(Distro, null));
89
92
  const dependencies = await pacman_1.default.prerequisitesCheck();
90
93
  const configurations = pacman_1.default.configurationCheck();
@@ -104,6 +107,18 @@ async function information(verbose = false) {
104
107
  (0, ink_1.render)(react_1.default.createElement(CLI, null));
105
108
  const GUI = () => (react_1.default.createElement(ink_1.Text, { backgroundColor: "green" }, "GUI"));
106
109
  (0, ink_1.render)(react_1.default.createElement(GUI, null));
110
+ let initType = '';
111
+ if (utils_1.default.isSysvinit()) {
112
+ initType = 'sysvinit';
113
+ }
114
+ if (utils_1.default.isSystemd()) {
115
+ if (initType === 'sysvinit') {
116
+ initType += '/';
117
+ }
118
+ initType = 'systemd';
119
+ }
120
+ const sysvinit = utils_1.default.isSysvinit();
121
+ const systemd = utils_1.default.isSystemd();
107
122
  const Checks = () => (react_1.default.createElement(ink_1.Box, { borderStyle: "round", marginRight: 2, flexDirection: "row" },
108
123
  react_1.default.createElement(ink_1.Box, { marginRight: 2 },
109
124
  react_1.default.createElement(ink_1.Text, null,
@@ -120,7 +135,11 @@ async function information(verbose = false) {
120
135
  react_1.default.createElement(ink_1.Box, { marginRight: 2 },
121
136
  react_1.default.createElement(ink_1.Text, null,
122
137
  "uefi: ",
123
- uefi ? react_1.default.createElement(Ok, null) : react_1.default.createElement(Ko, null)))));
138
+ uefi ? react_1.default.createElement(Ok, null) : react_1.default.createElement(Ko, null))),
139
+ react_1.default.createElement(ink_1.Box, { marginRight: 2 },
140
+ react_1.default.createElement(ink_1.Text, null,
141
+ "init: ",
142
+ react_1.default.createElement(ink_1.Text, { color: "cyan" }, initType)))));
124
143
  (0, ink_1.render)(react_1.default.createElement(Checks, null));
125
144
  const Presentation = () => (react_1.default.createElement(react_1.default.Fragment, null,
126
145
  react_1.default.createElement(ink_1.Box, null,
@@ -2,9 +2,8 @@
2
2
  declare type partitionsProps = {
3
3
  installationDevice?: string;
4
4
  installationMode?: string;
5
- luksPassphrase: string;
6
5
  filesystemType?: string;
7
6
  userSwapChoice?: string;
8
7
  };
9
- export default function Partitions({ installationDevice, installationMode, luksPassphrase, filesystemType, userSwapChoice }: partitionsProps): JSX.Element;
8
+ export default function Partitions({ installationDevice, installationMode, filesystemType, userSwapChoice }: partitionsProps): JSX.Element;
10
9
  export {};
@@ -10,7 +10,7 @@ const title_1 = (0, tslib_1.__importDefault)(require("./elements/title"));
10
10
  const steps_1 = (0, tslib_1.__importDefault)(require("./elements/steps"));
11
11
  const js_yaml_1 = (0, tslib_1.__importDefault)(require("js-yaml"));
12
12
  const fs_1 = (0, tslib_1.__importDefault)(require("fs"));
13
- function Partitions({ installationDevice, installationMode, luksPassphrase, filesystemType, userSwapChoice }) {
13
+ function Partitions({ installationDevice, installationMode, filesystemType, userSwapChoice }) {
14
14
  let installer = 'krill';
15
15
  let productName = 'unknown';
16
16
  let version = 'x.x.x';
@@ -63,9 +63,6 @@ function Partitions({ installationDevice, installationMode, luksPassphrase, file
63
63
  react_1.default.createElement(ink_1.Box, null,
64
64
  react_1.default.createElement(ink_1.Text, null, "Installation mode: "),
65
65
  react_1.default.createElement(ink_1.Text, { color: "cyan" }, installationMode)),
66
- react_1.default.createElement(ink_1.Box, null,
67
- react_1.default.createElement(ink_1.Text, null, "LUKS passphrase: "),
68
- react_1.default.createElement(ink_1.Text, { color: "cyan" }, luksPassphrase)),
69
66
  react_1.default.createElement(ink_1.Box, null,
70
67
  react_1.default.createElement(ink_1.Text, null, "Filesystem: "),
71
68
  react_1.default.createElement(ink_1.Text, { color: "cyan" }, filesystemType)),
@@ -2,6 +2,7 @@ export interface IDevice {
2
2
  name: string;
3
3
  fsType: string;
4
4
  mountPoint: string;
5
+ cryptedFrom: string;
5
6
  }
6
7
  export interface IDevices {
7
8
  efi: IDevice;
@@ -2,8 +2,10 @@ export interface IDistro {
2
2
  familyId: string;
3
3
  distroId: string;
4
4
  distroLike: string;
5
- versionId: string;
6
- versionLike: string;
5
+ codenameId: string;
6
+ codenameLikeId: string;
7
+ releaseId: string;
8
+ releaseLike: string;
7
9
  usrLibPath: string;
8
10
  isolinuxPath: string;
9
11
  syslinuxPath: string;
@@ -4,7 +4,7 @@
4
4
  * modules = configuration + 'modules/'
5
5
  * modulesMultiarch = '/usr/lib/' + arch-linux-gnu + '/' + installer + '/'
6
6
  *
7
- * template = '/etc/penguins-eggs/' + .distro.versionLike + '/' + installer + '/'
7
+ * template = '/etc/penguins-eggs/' + .distro.codenameLikeId + '/' + installer + '/'
8
8
  * templateModules = template + '/modules/'
9
9
  * templateMultiarch = template + installer + '-modules/'
10
10
  */
@@ -14,7 +14,6 @@ export interface IKeyboard {
14
14
  export interface IPartitions {
15
15
  installationDevice: string;
16
16
  installationMode: string;
17
- luksPassphrase: string;
18
17
  filesystemType: string;
19
18
  userSwapChoice: string;
20
19
  }
@@ -7,7 +7,9 @@ const fs = require("fs");
7
7
  const path = require("path");
8
8
  const utils_1 = (0, tslib_1.__importDefault)(require("../classes/utils"));
9
9
  const pacman_1 = (0, tslib_1.__importDefault)(require("../classes/pacman"));
10
- const chalk = require("chalk");
10
+ const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
11
+ // libraries
12
+ const utils_2 = require("../lib/utils");
11
13
  // Comando per avviare ubiquity: sudo --preserve-env DBUS_SESSION_BUS_ADDRESS, XDG_RUNTIME sh -c 'calamares'
12
14
  /**
13
15
  *
@@ -117,10 +119,13 @@ async function addMotd(distro, version, user, userPasswd, rootPasswd, chroot = '
117
119
  installer = 'startxfce4 to run GUI and launch calamares, or from terminal sudo eggs install -c';
118
120
  }
119
121
  }
122
+ if (!fs.existsSync(fileMotd)) {
123
+ await (0, utils_2.exec)(`touch ${fileMotd}`);
124
+ }
120
125
  msgRemove(fileMotd);
121
126
  let eggsMotd = fs.readFileSync(fileMotd, 'utf-8');
122
127
  eggsMotd += startMessage + '\n';
123
- eggsMotd += 'You are logged as: ' + chalk.bold(user) + ' your password is: ' + chalk.bold(userPasswd) + ', root password: ' + chalk.bold(rootPasswd) + '\n';
128
+ 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';
124
129
  eggsMotd += `to install the system: ${installer}\n`;
125
130
  eggsMotd += stopMessage + '\n';
126
131
  fs.writeFileSync(fileMotd, eggsMotd);
@@ -141,7 +146,7 @@ async function addIssue(distro, version, user, userPasswd, rootPasswd, chroot =
141
146
  let eggsIssue = fs.readFileSync(fileIssue, 'utf-8');
142
147
  eggsIssue += startMessage + '\n';
143
148
  eggsIssue += `This is a ${distro}/${version} system created by penguin's eggs.\n`;
144
- eggsIssue += 'You can login with user: ' + chalk.bold(user) + ' and password: ' + chalk.bold(userPasswd) + ', root password: ' + chalk.bold(rootPasswd) + '\n';
149
+ eggsIssue += 'You can login with user: ' + chalk_1.default.bold(user) + ' and password: ' + chalk_1.default.bold(userPasswd) + ', root password: ' + chalk_1.default.bold(rootPasswd) + '\n';
145
150
  eggsIssue += stopMessage + '\n';
146
151
  fs.writeFileSync(fileIssue, eggsIssue);
147
152
  }
@@ -10,6 +10,7 @@ async function selectInstallationDevice() {
10
10
  driveList.push('/dev/' + element);
11
11
  });
12
12
  const questions = [
13
+ // nvme0n1p1, nvme0n1p2, nvme0n1p3
13
14
  {
14
15
  type: 'list',
15
16
  name: 'installationDevice',
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const inquirer = require("inquirer");
4
4
  async function selectInstallationMode() {
5
- const modes = ['standard', 'full-encrypted'];
5
+ const modes = ['standard', 'full-encrypted', 'lvm2'];
6
6
  const questions = [
7
7
  {
8
8
  type: 'list',
@@ -6,10 +6,10 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
7
  </head>
8
8
  <body>
9
- <h1>eggs(1) -- the reproductive system of penguins: eggs v9.0.7-1</h1>
9
+ <h1>eggs(1) -- the reproductive system of penguins: eggs v9.0.18-1</h1>
10
10
  <h1>SYNOPSIS</h1>
11
11
  <p>deb package</p>
12
- <pre><code>$ sudo dpkg -i eggs_9.0.7-1_amd64.deb
12
+ <pre><code>$ sudo dpkg -i eggs_9.0.18-1_amd64.deb
13
13
  </code></pre>
14
14
  <p>npm package</p>
15
15
  <pre><code>$ npm install -g penguins-eggs
@@ -17,7 +17,7 @@ $ eggs COMMAND
17
17
  running command...
18
18
  $ eggs (-v|--version|version)
19
19
 
20
- penguins-eggs/9.0.7-1 linux-x64 node-v16.13.2
20
+ penguins-eggs/9.0.18-1 linux-x64 node-v16.13.2
21
21
  $ eggs --help [COMMAND]
22
22
 
23
23
  USAGE
@@ -40,6 +40,7 @@ sudo eggs dad
40
40
  <h1>COMMANDS</h1>
41
41
  <ul>
42
42
  <li><a href="#eggs-adapt"><code>eggs adapt</code></a></li>
43
+ <li><a href="#eggs-analyze"><code>eggs analyze</code></a></li>
43
44
  <li><a href="#eggs-autocomplete-shell"><code>eggs autocomplete [SHELL]</code></a></li>
44
45
  <li><a href="#eggs-bro"><code>eggs bro</code></a></li>
45
46
  <li><a href="#eggs-calamares"><code>eggs calamares</code></a></li>
@@ -55,6 +56,8 @@ sudo eggs dad
55
56
  <li><a href="#eggs-mom"><code>eggs mom</code></a></li>
56
57
  <li><a href="#eggs-produce"><code>eggs produce</code></a></li>
57
58
  <li><a href="#eggs-remove"><code>eggs remove</code></a></li>
59
+ <li><a href="#eggs-syncfrom"><code>eggs syncfrom</code></a></li>
60
+ <li><a href="#eggs-syncto"><code>eggs syncto</code></a></li>
58
61
  <li><a href="#eggs-tools-clean"><code>eggs tools clean</code></a></li>
59
62
  <li><a href="#eggs-tools-locales"><code>eggs tools locales</code></a></li>
60
63
  <li><a href="#eggs-tools-skel"><code>eggs tools skel</code></a></li>
@@ -77,6 +80,21 @@ DESCRIPTION
77
80
 
78
81
  ALIASES
79
82
  $ eggs adjust
83
+ </code></pre>
84
+ <h2><code>eggs analyze</code></h2>
85
+ <p>analyze situation</p>
86
+ <pre><code>USAGE
87
+ $ eggs analyze [-h] [-v]
88
+
89
+ FLAGS
90
+ -h, --help Show CLI help.
91
+ -v, --verbose verbose
92
+
93
+ DESCRIPTION
94
+ analyze situation
95
+
96
+ EXAMPLES
97
+ $ sudo eggs analyze
80
98
  </code></pre>
81
99
  <h2><code>eggs autocomplete [SHELL]</code></h2>
82
100
  <p>display autocomplete installation instructions</p>
@@ -240,11 +258,12 @@ DESCRIPTION
240
258
  <h2><code>eggs install</code></h2>
241
259
  <p>command-line system installer - the egg became a penguin!</p>
242
260
  <pre><code>USAGE
243
- $ eggs install [-c] [-h] [-v]
261
+ $ eggs install [-c] [-k] [-h] [-v]
244
262
 
245
263
  FLAGS
246
264
  -c, --cli force use CLI installer
247
265
  -h, --help Show CLI help.
266
+ -k, --crypted crypted CLI installation
248
267
  -v, --verbose verbose
249
268
 
250
269
  DESCRIPTION
@@ -286,7 +305,7 @@ DESCRIPTION
286
305
  ask for mommy - gui helper
287
306
  </code></pre>
288
307
  <h2><code>eggs produce</code></h2>
289
- <p>the system produce an egg: iso image of your system</p>
308
+ <p>produce a live image from your system whithout your data</p>
290
309
  <pre><code>USAGE
291
310
  $ eggs produce [-p &#x3C;value>] [--basename &#x3C;value>] [-b] [-f] [-n] [-m] [-v] [-y] [-s] [-h] [--theme &#x3C;value>]
292
311
  [--addons &#x3C;value>] [--release]
@@ -307,7 +326,7 @@ FLAGS
307
326
  --theme=&#x3C;value> theme for livecd, calamares branding and partitions
308
327
 
309
328
  DESCRIPTION
310
- the system produce an egg: iso image of your system
329
+ produce a live image from your system whithout your data
311
330
 
312
331
  ALIASES
313
332
  $ eggs spawn
@@ -367,6 +386,46 @@ EXAMPLES
367
386
 
368
387
  $ sudo eggs remove --autoremove
369
388
  remove eggs, eggs configurations, packages dependencies
389
+ </code></pre>
390
+ <h2><code>eggs syncfrom</code></h2>
391
+ <p>Restore users, server and datas from luks-eggs-backup</p>
392
+ <pre><code>USAGE
393
+ $ eggs syncfrom [-f &#x3C;value>] [-r &#x3C;value>] [-h] [-v]
394
+
395
+ FLAGS
396
+ -f, --file=&#x3C;value> file with LUKS volume encrypted
397
+ -h, --help Show CLI help.
398
+ -r, --rootdir=&#x3C;value> rootdir of the installed system, when used from live
399
+ -v, --verbose verbose
400
+
401
+ DESCRIPTION
402
+ Restore users, server and datas from luks-eggs-backup
403
+
404
+ ALIASES
405
+ $ eggs restore
406
+
407
+ EXAMPLES
408
+ $ sudo eggs restore
409
+ </code></pre>
410
+ <h2><code>eggs syncto</code></h2>
411
+ <p>Backup users, server and datas to luks-eggs-backup</p>
412
+ <pre><code>USAGE
413
+ $ eggs syncto [-k] [-f &#x3C;value>] [-h] [-v]
414
+
415
+ FLAGS
416
+ -f, --file=&#x3C;value> file LUKS volume encrypted
417
+ -h, --help Show CLI help.
418
+ -k, --krill krill
419
+ -v, --verbose verbose
420
+
421
+ DESCRIPTION
422
+ Backup users, server and datas to luks-eggs-backup
423
+
424
+ ALIASES
425
+ $ eggs backup
426
+
427
+ EXAMPLES
428
+ $ sudo eggs restore
370
429
  </code></pre>
371
430
  <h2><code>eggs tools clean</code></h2>
372
431
  <p>clean system log, apt, etc</p>