penguins-eggs 10.0.2 → 10.0.7
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.
- package/.oclif.manifest.json +26 -30
- package/README.md +106 -1164
- package/addons/eggs/theme/livecd/grub.main.cfg +3 -3
- package/addons/eggs/theme/livecd/isolinux.main.cfg +3 -3
- package/assets/calamares/install-system.sh +9 -5
- package/conf/derivatives.yaml +2 -1
- package/dist/classes/bleach.d.ts +6 -6
- package/dist/classes/bleach.js +6 -6
- package/dist/classes/cfs.d.ts +6 -6
- package/dist/classes/cfs.js +6 -6
- package/dist/classes/compressors.d.ts +8 -7
- package/dist/classes/compressors.js +19 -9
- package/dist/classes/daddy.d.ts +6 -6
- package/dist/classes/daddy.js +13 -13
- package/dist/classes/distro.d.ts +12 -2
- package/dist/classes/distro.js +41 -46
- package/dist/classes/families/archlinux.d.ts +6 -6
- package/dist/classes/families/archlinux.js +7 -11
- package/dist/classes/families/debian.d.ts +6 -6
- package/dist/classes/families/debian.js +6 -6
- package/dist/classes/families/mockup.js +2 -4
- package/dist/classes/families/suse.d.ts +2 -2
- package/dist/classes/families/suse.js +2 -2
- package/dist/classes/incubation/branding.js +24 -25
- package/dist/classes/incubation/distros/focal.js +1 -1
- package/dist/classes/incubation/distros/rolling.d.ts +4 -4
- package/dist/classes/incubation/distros/rolling.js +4 -4
- package/dist/classes/incubation/fisherman-helper/packages.js +9 -6
- package/dist/classes/incubation/incubator.js +6 -7
- package/dist/classes/incubation/installer.js +1 -2
- package/dist/classes/initrd.d.ts +6 -6
- package/dist/classes/initrd.js +6 -6
- package/dist/classes/keyboards.d.ts +6 -6
- package/dist/classes/keyboards.js +6 -6
- package/dist/classes/locales.d.ts +12 -12
- package/dist/classes/locales.js +14 -14
- package/dist/classes/n8.d.ts +6 -6
- package/dist/classes/n8.js +6 -6
- package/dist/classes/network.d.ts +6 -6
- package/dist/classes/network.js +9 -11
- package/dist/classes/ovary.d.ts +43 -43
- package/dist/classes/ovary.js +215 -217
- package/dist/classes/pacman.d.ts +6 -6
- package/dist/classes/pacman.js +8 -10
- package/dist/classes/pve-live.d.ts +6 -6
- package/dist/classes/pve-live.js +6 -6
- package/dist/classes/pxe.d.ts +34 -25
- package/dist/classes/pxe.js +205 -190
- package/dist/classes/settings.d.ts +6 -6
- package/dist/classes/settings.js +9 -9
- package/dist/classes/sources_list.d.ts +16 -16
- package/dist/classes/sources_list.js +20 -20
- package/dist/classes/systemctl.js +2 -2
- package/dist/classes/tailor.d.ts +22 -22
- package/dist/classes/tailor.js +88 -88
- package/dist/classes/tools.d.ts +6 -6
- package/dist/classes/tools.js +6 -6
- package/dist/classes/users.d.ts +9 -9
- package/dist/classes/users.js +33 -35
- package/dist/classes/xdg.d.ts +6 -6
- package/dist/classes/xdg.js +13 -9
- package/dist/classes/yolk.d.ts +8 -8
- package/dist/classes/yolk.js +9 -15
- package/dist/commands/adapt.d.ts +2 -2
- package/dist/commands/adapt.js +2 -4
- package/dist/commands/analyze.d.ts +2 -2
- package/dist/commands/analyze.js +1 -1
- package/dist/commands/calamares.d.ts +8 -8
- package/dist/commands/calamares.js +8 -13
- package/dist/commands/config.d.ts +6 -7
- package/dist/commands/config.js +11 -23
- package/dist/commands/cuckoo.d.ts +2 -2
- package/dist/commands/cuckoo.js +11 -10
- package/dist/commands/dad.d.ts +4 -4
- package/dist/commands/dad.js +2 -6
- package/dist/commands/export/deb.d.ts +4 -4
- package/dist/commands/export/deb.js +2 -6
- package/dist/commands/export/iso.d.ts +4 -4
- package/dist/commands/export/iso.js +2 -5
- package/dist/commands/install.d.ts +15 -15
- package/dist/commands/install.js +7 -25
- package/dist/commands/kill.d.ts +4 -4
- package/dist/commands/kill.js +3 -5
- package/dist/commands/mom.d.ts +1 -1
- package/dist/commands/mom.js +2 -4
- package/dist/commands/produce.d.ts +19 -18
- package/dist/commands/produce.js +16 -18
- package/dist/commands/status.d.ts +2 -2
- package/dist/commands/status.js +2 -4
- package/dist/commands/syncfrom.d.ts +7 -7
- package/dist/commands/syncfrom.js +6 -9
- package/dist/commands/syncto.d.ts +4 -4
- package/dist/commands/syncto.js +8 -12
- package/dist/commands/tools/clean.d.ts +3 -3
- package/dist/commands/tools/clean.js +3 -5
- package/dist/commands/tools/ppa.d.ts +5 -5
- package/dist/commands/tools/ppa.js +14 -17
- package/dist/commands/tools/skel.d.ts +3 -3
- package/dist/commands/tools/skel.js +2 -5
- package/dist/commands/tools/stat.d.ts +3 -3
- package/dist/commands/tools/stat.js +3 -7
- package/dist/commands/tools/yolk.d.ts +2 -2
- package/dist/commands/tools/yolk.js +2 -4
- package/dist/commands/update.d.ts +2 -2
- package/dist/commands/update.js +4 -6
- package/dist/commands/wardrobe/get.d.ts +3 -3
- package/dist/commands/wardrobe/get.js +4 -7
- package/dist/commands/wardrobe/list.d.ts +4 -4
- package/dist/commands/wardrobe/list.js +11 -15
- package/dist/commands/wardrobe/show.d.ts +5 -5
- package/dist/commands/wardrobe/show.js +11 -15
- package/dist/commands/wardrobe/wear.d.ts +6 -6
- package/dist/commands/wardrobe/wear.js +3 -7
- package/dist/interfaces/i-packages.d.ts +4 -17
- package/dist/interfaces/i-packages.js +0 -14
- package/dist/interfaces/i-pxe.d.ts +35 -11
- package/dist/interfaces/i-pxe.js +0 -7
- package/dist/interfaces/i-settings.d.ts +15 -21
- package/dist/krill/modules/change-password.d.ts +4 -4
- package/dist/krill/modules/change-password.js +4 -4
- package/dist/krill/modules/del-live-user.d.ts +3 -3
- package/dist/krill/modules/del-live-user.js +3 -3
- package/dist/krill/modules/fstab.d.ts +3 -3
- package/dist/krill/modules/fstab.js +5 -5
- package/dist/krill/modules/grubcfg.d.ts +6 -6
- package/dist/krill/modules/grubcfg.js +6 -6
- package/dist/krill/modules/hostname.js +4 -4
- package/dist/krill/modules/initramfs.d.ts +2 -2
- package/dist/krill/modules/initramfs.js +2 -2
- package/dist/krill/modules/locale-cfg.js +8 -7
- package/dist/krill/modules/locale.d.ts +2 -2
- package/dist/krill/modules/locale.js +6 -6
- package/dist/krill/modules/m-keyboard.js +14 -14
- package/dist/krill/modules/mkfs.d.ts +2 -2
- package/dist/krill/modules/mkfs.js +2 -2
- package/dist/krill/modules/mount-fs.d.ts +2 -2
- package/dist/krill/modules/mount-fs.js +2 -2
- package/dist/krill/modules/mount-vfs.d.ts +4 -4
- package/dist/krill/modules/mount-vfs.js +4 -4
- package/dist/krill/modules/packages.js +39 -37
- package/dist/krill/modules/partition.js +38 -38
- package/dist/krill/modules/remove-installer-link.d.ts +2 -2
- package/dist/krill/modules/remove-installer-link.js +2 -2
- package/dist/krill/modules/umount.d.ts +3 -3
- package/dist/krill/modules/umount.js +4 -4
- package/dist/krill/modules/unpackfs.d.ts +2 -2
- package/dist/krill/modules/unpackfs.js +2 -2
- package/dist/krill/prepare.d.ts +2 -1
- package/dist/krill/prepare.js +4 -2
- package/dist/krill/sequence.d.ts +2 -1
- package/dist/krill/sequence.js +64 -43
- package/dist/lib/cli-autologin.js +4 -4
- package/dist/lib/get_address.js +2 -3
- package/dist/lib/get_dns.js +2 -3
- package/dist/lib/get_domain.js +2 -3
- package/dist/lib/get_gateway.js +2 -3
- package/dist/lib/get_hostname.js +2 -3
- package/dist/lib/get_netmask.js +2 -3
- package/dist/lib/get_password.js +3 -4
- package/dist/lib/get_userfullname.js +2 -3
- package/dist/lib/get_username.js +2 -2
- package/dist/lib/kill_me_softly.js +3 -18
- package/dist/lib/select_address_type.js +2 -2
- package/dist/lib/select_filesystem_type.js +9 -3
- package/dist/lib/select_installation_device.js +2 -2
- package/dist/lib/select_installation_mode.js +2 -3
- package/dist/lib/select_interface.js +2 -2
- package/dist/lib/select_keyboard_layout.d.ts +2 -2
- package/dist/lib/select_keyboard_layout.js +4 -4
- package/dist/lib/select_keyboard_model.d.ts +2 -2
- package/dist/lib/select_keyboard_model.js +4 -4
- package/dist/lib/select_keyboard_option.d.ts +2 -2
- package/dist/lib/select_keyboard_option.js +4 -4
- package/dist/lib/select_keyboard_variant.d.ts +2 -2
- package/dist/lib/select_keyboard_variant.js +4 -4
- package/dist/lib/select_languages.js +2 -2
- package/dist/lib/select_regions.js +2 -3
- package/dist/lib/select_user_swap_choice.js +2 -3
- package/dist/lib/select_zones.js +8 -10
- package/dist/lib/utils.js +1 -1
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +21 -27
- package/package.json +27 -24
- package/scripts/_eggs +354 -314
- package/scripts/eggs.bash +8 -8
package/dist/classes/users.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ./src/classes/users.ts
|
|
3
|
-
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
2
|
+
* ./src/classes/users.ts
|
|
3
|
+
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
8
|
import fs from 'node:fs';
|
|
9
9
|
import { exec } from '../lib/utils.js';
|
|
10
10
|
/**
|
|
@@ -34,9 +34,9 @@ export default class Users {
|
|
|
34
34
|
this.saveIt = false;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
* getSize
|
|
38
|
+
* @param verbose
|
|
39
|
+
*/
|
|
40
40
|
async getValues() {
|
|
41
41
|
const fLevels = [
|
|
42
42
|
{ path: 'bin', saveIt: false },
|
|
@@ -59,7 +59,7 @@ export default class Users {
|
|
|
59
59
|
{ path: 'srv', saveIt: true },
|
|
60
60
|
{ path: 'tmp', saveIt: false },
|
|
61
61
|
{ path: 'usr', saveIt: true },
|
|
62
|
-
{ path: 'var', saveIt: true }
|
|
62
|
+
{ path: 'var', saveIt: true }
|
|
63
63
|
];
|
|
64
64
|
let hasHome = false;
|
|
65
65
|
let saveIt = false;
|
|
@@ -68,9 +68,9 @@ export default class Users {
|
|
|
68
68
|
if (Number.parseInt(this.uid) >= 1000) {
|
|
69
69
|
if (this.home != undefined) {
|
|
70
70
|
/**
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
* analyze firstLevel and
|
|
72
|
+
* excluded to be saved
|
|
73
|
+
*/
|
|
74
74
|
const fLevel = this.home.split('/')[1];
|
|
75
75
|
for (const fLevel_ of fLevels) {
|
|
76
76
|
if (fLevel_.path === fLevel) {
|
|
@@ -78,9 +78,9 @@ export default class Users {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
* analize second level
|
|
82
|
+
* examples: /var/run, /var/cache, /var/spool, etc
|
|
83
|
+
*/
|
|
84
84
|
if (saveIt) {
|
|
85
85
|
const sLevel = this.home.split('/')[2];
|
|
86
86
|
if (sLevel === 'cache' || sLevel === 'run' || sLevel === 'spool') {
|
|
@@ -88,43 +88,41 @@ export default class Users {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
* exclude to save if home don't exist
|
|
92
|
+
*/
|
|
93
93
|
if (!fs.existsSync(this.home)) {
|
|
94
94
|
saveIt = false;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
* others motivations to exclude
|
|
98
|
+
*/
|
|
99
99
|
if (saveIt) {
|
|
100
100
|
switch (this.home) {
|
|
101
101
|
/**
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
case '/':
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
102
|
+
* exclude always /
|
|
103
|
+
*/
|
|
104
|
+
case '/': {
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
108
107
|
/**
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
* excludes: under /usr
|
|
109
|
+
*/
|
|
111
110
|
case '/usr/bin':
|
|
112
111
|
case '/usr/sbin': {
|
|
113
112
|
saveIt = false;
|
|
114
113
|
break;
|
|
115
114
|
}
|
|
116
115
|
/**
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
* excludes: under var
|
|
117
|
+
*/
|
|
119
118
|
case '/var/backups':
|
|
120
119
|
case '/var/lib/colord':
|
|
121
120
|
case '/var/lib/geoclue':
|
|
122
121
|
case '/var/lib/misc':
|
|
123
|
-
case '/var/mail':
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
122
|
+
case '/var/mail': {
|
|
123
|
+
saveIt = false;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
128
126
|
default: {
|
|
129
127
|
if (fs.existsSync(this.home)) {
|
|
130
128
|
hasHome = true;
|
package/dist/classes/xdg.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ./src/classes/xdg.ts
|
|
3
|
-
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
2
|
+
* ./src/classes/xdg.ts
|
|
3
|
+
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
9
|
* Xdg: xdg-user-dirs, etc
|
|
10
10
|
* @remarks all the utilities
|
package/dist/classes/xdg.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ./src/classes/xdg.ts
|
|
3
|
-
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
2
|
+
* ./src/classes/xdg.ts
|
|
3
|
+
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
8
|
import fs from 'node:fs';
|
|
9
9
|
import path from 'node:path';
|
|
10
10
|
import shx from 'shelljs';
|
|
@@ -198,9 +198,10 @@ export default class Xdg {
|
|
|
198
198
|
}
|
|
199
199
|
else if (Pacman.packageIsInstalled('cinnamon-common')) {
|
|
200
200
|
// before the check was against cinnamon-core
|
|
201
|
-
// use .cinnamon NOT cinnamon/
|
|
202
201
|
await rsyncIfExist(`/home/${user}/.config`, '/etc/skel', verbose);
|
|
203
|
-
|
|
202
|
+
// use .cinnamon NOT cinnamon/
|
|
203
|
+
// removed because it's not necessary
|
|
204
|
+
//await rsyncIfExist(`/home/${user}/.cinnamon`, '/etc/skel', verbose)
|
|
204
205
|
}
|
|
205
206
|
else if (Pacman.packageIsInstalled('plasma-desktop')) {
|
|
206
207
|
// use .kde NOT .kde/
|
|
@@ -231,6 +232,9 @@ export default class Xdg {
|
|
|
231
232
|
/**
|
|
232
233
|
* special cases
|
|
233
234
|
*/
|
|
235
|
+
// Riccardo suggestion
|
|
236
|
+
await rsyncIfExist(`/home/${user}/.mozilla`, '/etc/skel', verbose);
|
|
237
|
+
await rsyncIfExist(`/home/${user}/.kodi`, '/etc/skel', verbose);
|
|
234
238
|
// waydroid
|
|
235
239
|
if (fs.existsSync(`/home/${user}/waydroid-package-manager`)) {
|
|
236
240
|
await rsyncIfExist(`/home/${user}/waydroid-package-manager`, '/etc/skel', verbose);
|
|
@@ -268,7 +272,7 @@ export default class Xdg {
|
|
|
268
272
|
await rmIfExist('/etc/skel/.config/user-dirs.dirs');
|
|
269
273
|
await rmIfExist('/etc/skel/.config/user-dirs.locale');
|
|
270
274
|
await rmIfExist('/etc/skel/.config/gtk-3.0/bookmarks/', 'r');
|
|
271
|
-
// Manuel Senpai suggestion
|
|
275
|
+
// Manuel Senpai suggestion
|
|
272
276
|
// await exec(`grep -IE -r /etc/skel -e ${user}`)
|
|
273
277
|
await rmIfExist('/etc/skel/.local/share/recently-used.xbel');
|
|
274
278
|
await rmIfExist('/etc/skel/.config/xfce4/desktop/', 'r');
|
package/dist/classes/yolk.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ./src/classes/yolk.ts
|
|
3
|
-
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
2
|
+
* ./src/classes/yolk.ts
|
|
3
|
+
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
@@ -21,8 +21,8 @@ export default class Yolk {
|
|
|
21
21
|
*/
|
|
22
22
|
erase(): Promise<void>;
|
|
23
23
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
* Check if yoil exists and it's a repo
|
|
25
|
+
*/
|
|
26
26
|
exists(): boolean;
|
|
27
27
|
/**
|
|
28
28
|
* if depends are not Installed
|
package/dist/classes/yolk.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ./src/classes/yolk.ts
|
|
3
|
-
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
2
|
+
* ./src/classes/yolk.ts
|
|
3
|
+
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
8
|
import fs from 'node:fs';
|
|
9
9
|
import shx from 'shelljs';
|
|
10
10
|
import { exec } from '../lib/utils.js';
|
|
@@ -52,13 +52,7 @@ export default class Yolk {
|
|
|
52
52
|
await exec(`chown _apt:root ${this.yolkDir} -R`, this.echo);
|
|
53
53
|
}
|
|
54
54
|
// packages we need
|
|
55
|
-
const pkgs = [
|
|
56
|
-
'cryptsetup',
|
|
57
|
-
'grub-efi-amd64',
|
|
58
|
-
'grub-pc',
|
|
59
|
-
'keyutils',
|
|
60
|
-
'shim-signed',
|
|
61
|
-
];
|
|
55
|
+
const pkgs = ['cryptsetup', 'grub-efi-amd64', 'grub-pc', 'keyutils', 'shim-signed'];
|
|
62
56
|
process.chdir(this.yolkDir);
|
|
63
57
|
Utils.warning(`Downloading packages and its dependencies`);
|
|
64
58
|
for (const pkg of pkgs) {
|
|
@@ -89,8 +83,8 @@ export default class Yolk {
|
|
|
89
83
|
await exec(`rm ${this.yolkDir}/*`, this.echo);
|
|
90
84
|
}
|
|
91
85
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
* Check if yoil exists and it's a repo
|
|
87
|
+
*/
|
|
94
88
|
exists() {
|
|
95
89
|
const check = `${this.yolkDir}/Packages.gz`;
|
|
96
90
|
return fs.existsSync(check);
|
package/dist/commands/adapt.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export default class Adapt extends Command {
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static examples: string[];
|
|
12
12
|
static flags: {
|
|
13
|
-
help: import("@oclif/core/
|
|
14
|
-
verbose: import("@oclif/core/
|
|
13
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
14
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
15
|
};
|
|
16
16
|
run(): Promise<void>;
|
|
17
17
|
}
|
package/dist/commands/adapt.js
CHANGED
|
@@ -10,12 +10,10 @@ import Utils from '../classes/utils.js';
|
|
|
10
10
|
import { exec } from '../lib/utils.js';
|
|
11
11
|
export default class Adapt extends Command {
|
|
12
12
|
static description = 'adapt monitor resolution for VM only';
|
|
13
|
-
static examples = [
|
|
14
|
-
'eggs adapt',
|
|
15
|
-
];
|
|
13
|
+
static examples = ['eggs adapt'];
|
|
16
14
|
static flags = {
|
|
17
15
|
help: Flags.help({ char: 'h' }),
|
|
18
|
-
verbose: Flags.boolean({ char: 'v' })
|
|
16
|
+
verbose: Flags.boolean({ char: 'v' })
|
|
19
17
|
};
|
|
20
18
|
async run() {
|
|
21
19
|
const { args, flags } = await this.parse(Adapt);
|
|
@@ -12,8 +12,8 @@ export default class Analyze extends Command {
|
|
|
12
12
|
static description: string;
|
|
13
13
|
static examples: string[];
|
|
14
14
|
static flags: {
|
|
15
|
-
help: import("@oclif/core/
|
|
16
|
-
verbose: import("@oclif/core/
|
|
15
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
16
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
17
|
};
|
|
18
18
|
config_file: string;
|
|
19
19
|
snapshot_dir: string;
|
package/dist/commands/analyze.js
CHANGED
|
@@ -16,7 +16,7 @@ export default class Analyze extends Command {
|
|
|
16
16
|
static examples = ['sudo eggs analyze'];
|
|
17
17
|
static flags = {
|
|
18
18
|
help: Flags.help({ char: 'h' }),
|
|
19
|
-
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
19
|
+
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
20
20
|
};
|
|
21
21
|
config_file = '/etc/penguins-eggs.d/eggs.yaml';
|
|
22
22
|
snapshot_dir = '';
|
|
@@ -13,14 +13,14 @@ export default class Calamares extends Command {
|
|
|
13
13
|
static description: string;
|
|
14
14
|
static examples: string[];
|
|
15
15
|
static flags: {
|
|
16
|
-
help: import("@oclif/core/
|
|
17
|
-
install: import("@oclif/core/
|
|
18
|
-
nointeractive: import("@oclif/core/
|
|
19
|
-
policies: import("@oclif/core/
|
|
20
|
-
release: import("@oclif/core/
|
|
21
|
-
remove: import("@oclif/core/
|
|
22
|
-
theme: import("@oclif/core/
|
|
23
|
-
verbose: import("@oclif/core/
|
|
16
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
17
|
+
install: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
nointeractive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
policies: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
release: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
remove: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
theme: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
24
|
};
|
|
25
25
|
incubator: Incubator;
|
|
26
26
|
remix: IRemix;
|
|
@@ -14,21 +14,16 @@ import Settings from '../classes/settings.js';
|
|
|
14
14
|
import Utils from '../classes/utils.js';
|
|
15
15
|
export default class Calamares extends Command {
|
|
16
16
|
static description = 'configure calamares or install or configure it';
|
|
17
|
-
static examples = [
|
|
18
|
-
'sudo eggs calamares',
|
|
19
|
-
'sudo eggs calamares --install',
|
|
20
|
-
'sudo eggs calamares --install --theme=/path/to/theme',
|
|
21
|
-
'sudo eggs calamares --remove',
|
|
22
|
-
];
|
|
17
|
+
static examples = ['sudo eggs calamares', 'sudo eggs calamares --install', 'sudo eggs calamares --install --theme=/path/to/theme', 'sudo eggs calamares --remove'];
|
|
23
18
|
static flags = {
|
|
24
19
|
help: Flags.help({ char: 'h' }),
|
|
25
|
-
install: Flags.boolean({ char: 'i', description:
|
|
20
|
+
install: Flags.boolean({ char: 'i', description: 'install calamares and its dependencies' }),
|
|
26
21
|
nointeractive: Flags.boolean({ char: 'n', description: 'no user interaction' }),
|
|
27
22
|
policies: Flags.boolean({ char: 'p', description: 'configure calamares policies' }),
|
|
28
|
-
release: Flags.boolean({ char: 'r', description:
|
|
29
|
-
remove: Flags.boolean({ description:
|
|
23
|
+
release: Flags.boolean({ char: 'r', description: 'release: remove calamares and all its dependencies after the installation' }),
|
|
24
|
+
remove: Flags.boolean({ description: 'remove calamares and its dependencies' }),
|
|
30
25
|
theme: Flags.string({ description: 'theme/branding for eggs and calamares' }),
|
|
31
|
-
verbose: Flags.boolean({ char: 'v' })
|
|
26
|
+
verbose: Flags.boolean({ char: 'v' })
|
|
32
27
|
};
|
|
33
28
|
incubator = {};
|
|
34
29
|
remix = {};
|
|
@@ -68,7 +63,7 @@ export default class Calamares extends Command {
|
|
|
68
63
|
installer = 'calamares';
|
|
69
64
|
}
|
|
70
65
|
if (installer === 'calamares') {
|
|
71
|
-
if (!nointeractive || await Utils.customConfirm('Select yes to continue...')) {
|
|
66
|
+
if (!nointeractive || (await Utils.customConfirm('Select yes to continue...'))) {
|
|
72
67
|
if (remove) {
|
|
73
68
|
if (Pacman.calamaresExists()) {
|
|
74
69
|
await Pacman.calamaresRemove();
|
|
@@ -93,8 +88,8 @@ export default class Calamares extends Command {
|
|
|
93
88
|
}
|
|
94
89
|
}
|
|
95
90
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
* Configure
|
|
92
|
+
*/
|
|
98
93
|
if (await this.settings.load()) {
|
|
99
94
|
Utils.warning(`Configuring ${installer}`);
|
|
100
95
|
await this.settings.loadRemix(this.settings.config.snapshot_basename, theme);
|
|
@@ -14,23 +14,22 @@ export default class Config extends Command {
|
|
|
14
14
|
static description: string;
|
|
15
15
|
static examples: string[];
|
|
16
16
|
static flags: {
|
|
17
|
-
clean: import("@oclif/core/
|
|
18
|
-
help: import("@oclif/core/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
verbose: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
17
|
+
clean: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
19
|
+
nointeractive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
21
|
};
|
|
23
22
|
/**
|
|
24
23
|
*
|
|
25
24
|
* @param i
|
|
26
25
|
* @param verbose
|
|
27
26
|
*/
|
|
28
|
-
static install(i: IInstall, nointeractive?: boolean,
|
|
27
|
+
static install(i: IInstall, nointeractive?: boolean, verbose?: boolean): Promise<void>;
|
|
29
28
|
/**
|
|
30
29
|
*
|
|
31
30
|
*
|
|
32
31
|
* @param verbose
|
|
33
32
|
*/
|
|
34
|
-
static thatWeNeed(nointeractive?: boolean,
|
|
33
|
+
static thatWeNeed(nointeractive?: boolean, verbose?: boolean, cryptedclone?: boolean): Promise<IInstall>;
|
|
35
34
|
run(): Promise<void>;
|
|
36
35
|
}
|
package/dist/commands/config.js
CHANGED
|
@@ -16,24 +16,19 @@ import { exec } from '../lib/utils.js';
|
|
|
16
16
|
*/
|
|
17
17
|
export default class Config extends Command {
|
|
18
18
|
static description = 'Configure eggs to run it';
|
|
19
|
-
static examples = [
|
|
20
|
-
'sudo eggs config',
|
|
21
|
-
'sudo eggs config --clean',
|
|
22
|
-
'sudo eggs config --clean --nointeractive',
|
|
23
|
-
];
|
|
19
|
+
static examples = ['sudo eggs config', 'sudo eggs config --clean', 'sudo eggs config --clean --nointeractive'];
|
|
24
20
|
static flags = {
|
|
25
21
|
clean: Flags.boolean({ char: 'c', description: 'remove old configuration before to create new one' }),
|
|
26
22
|
help: Flags.help({ char: 'h' }),
|
|
27
|
-
noicons: Flags.boolean({ char: 'N', description: 'no icons' }),
|
|
28
23
|
nointeractive: Flags.boolean({ char: 'n', description: 'no user interaction' }),
|
|
29
|
-
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
24
|
+
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
30
25
|
};
|
|
31
26
|
/**
|
|
32
27
|
*
|
|
33
28
|
* @param i
|
|
34
29
|
* @param verbose
|
|
35
30
|
*/
|
|
36
|
-
static async install(i, nointeractive = false,
|
|
31
|
+
static async install(i, nointeractive = false, verbose = false) {
|
|
37
32
|
const echo = Utils.setEcho(verbose);
|
|
38
33
|
Utils.warning('config: so, we install');
|
|
39
34
|
if (i.configurationInstall) {
|
|
@@ -62,8 +57,7 @@ export default class Config extends Command {
|
|
|
62
57
|
await exec('apt-get install grub-efi-' + Utils.uefiArch() + '-bin --yes', echo);
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
|
-
if (
|
|
66
|
-
i.calamares && Pacman.isCalamaresAvailable()) {
|
|
60
|
+
if (i.calamares && Pacman.isCalamaresAvailable()) {
|
|
67
61
|
if (nointeractive) {
|
|
68
62
|
Utils.warning('I suggest You to install calamares GUI installer before to produce your ISO.\nJust write:\n sudo eggs calamares --install');
|
|
69
63
|
}
|
|
@@ -86,20 +80,15 @@ export default class Config extends Command {
|
|
|
86
80
|
*
|
|
87
81
|
* @param verbose
|
|
88
82
|
*/
|
|
89
|
-
static async thatWeNeed(nointeractive = false,
|
|
83
|
+
static async thatWeNeed(nointeractive = false, verbose = false, cryptedclone = false) {
|
|
90
84
|
const i = {};
|
|
91
85
|
i.distroTemplate = !Pacman.distroTemplateCheck();
|
|
92
86
|
if (Utils.uefiArch() !== 'i386') {
|
|
93
87
|
i.efi = !Pacman.isUefi();
|
|
94
88
|
}
|
|
95
|
-
if (!cryptedclone && !
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
Utils.warning('Config: you are on a graphic system, I suggest to install the GUI installer calamares');
|
|
101
|
-
i.calamares = nointeractive ? false : await Utils.customConfirm('Want You install calamares?');
|
|
102
|
-
}
|
|
89
|
+
if (!cryptedclone && !Pacman.calamaresExists() && Pacman.isInstalledGui() && Pacman.isCalamaresAvailable() && !Pacman.packageIsInstalled('live-installer')) {
|
|
90
|
+
Utils.warning('Config: you are on a graphic system, I suggest to install the GUI installer calamares');
|
|
91
|
+
i.calamares = nointeractive ? false : await Utils.customConfirm('Want You install calamares?');
|
|
103
92
|
}
|
|
104
93
|
i.configurationInstall = !Pacman.configurationCheck();
|
|
105
94
|
if (!i.configurationInstall) {
|
|
@@ -159,7 +148,6 @@ export default class Config extends Command {
|
|
|
159
148
|
async run() {
|
|
160
149
|
const { flags } = await this.parse(Config);
|
|
161
150
|
const { nointeractive } = flags;
|
|
162
|
-
const { noicons } = flags;
|
|
163
151
|
const { verbose } = flags;
|
|
164
152
|
if (!nointeractive) {
|
|
165
153
|
Utils.titles(this.id + ' ' + this.argv);
|
|
@@ -187,13 +175,13 @@ export default class Config extends Command {
|
|
|
187
175
|
}
|
|
188
176
|
// Vediamo che cosa c'è da fare...
|
|
189
177
|
Utils.warning('what we need?');
|
|
190
|
-
const i = await Config.thatWeNeed(nointeractive,
|
|
178
|
+
const i = await Config.thatWeNeed(nointeractive, verbose);
|
|
191
179
|
if (i.needApt || i.configurationInstall || i.configurationRefresh || i.distroTemplate) {
|
|
192
180
|
if (nointeractive) {
|
|
193
|
-
await Config.install(i, nointeractive,
|
|
181
|
+
await Config.install(i, nointeractive, verbose);
|
|
194
182
|
}
|
|
195
183
|
else if (await Utils.customConfirm()) {
|
|
196
|
-
await Config.install(i, nointeractive,
|
|
184
|
+
await Config.install(i, nointeractive, verbose);
|
|
197
185
|
}
|
|
198
186
|
}
|
|
199
187
|
}
|
|
@@ -10,7 +10,7 @@ export default class Cuckoo extends Command {
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static examples: string[];
|
|
12
12
|
static flags: {
|
|
13
|
-
help: import("@oclif/core/
|
|
13
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
14
14
|
};
|
|
15
|
-
run(
|
|
15
|
+
run(): Promise<void>;
|
|
16
16
|
}
|
package/dist/commands/cuckoo.js
CHANGED
|
@@ -9,21 +9,22 @@ import { Command, Flags } from '@oclif/core';
|
|
|
9
9
|
import network from '../classes/network.js';
|
|
10
10
|
import Pxe from '../classes/pxe.js';
|
|
11
11
|
import Utils from '../classes/utils.js';
|
|
12
|
-
|
|
12
|
+
import Settings from '../classes/settings.js';
|
|
13
13
|
export default class Cuckoo extends Command {
|
|
14
14
|
static description = 'PXE start with proxy-dhcp';
|
|
15
|
-
static examples = [
|
|
16
|
-
'sudo eggs cuckoo',
|
|
17
|
-
];
|
|
15
|
+
static examples = ['sudo eggs cuckoo'];
|
|
18
16
|
static flags = {
|
|
19
|
-
help: Flags.help({ char: 'h' })
|
|
17
|
+
help: Flags.help({ char: 'h' })
|
|
20
18
|
};
|
|
21
|
-
async run(
|
|
19
|
+
async run() {
|
|
22
20
|
const { args, flags } = await this.parse(Cuckoo);
|
|
23
21
|
Utils.titles(this.id + ' ' + this.argv);
|
|
24
22
|
if (Utils.isRoot()) {
|
|
25
|
-
const
|
|
26
|
-
|
|
23
|
+
const settings = new Settings();
|
|
24
|
+
settings.load();
|
|
25
|
+
const nest = settings.config.snapshot_mnt;
|
|
26
|
+
const pxeRoot = nest + 'pxe';
|
|
27
|
+
const pxe = new Pxe(nest, pxeRoot);
|
|
27
28
|
await pxe.fertilization();
|
|
28
29
|
await pxe.build();
|
|
29
30
|
const n = new network();
|
|
@@ -36,7 +37,7 @@ export default class Cuckoo extends Command {
|
|
|
36
37
|
efi64_filename: 'ipxe.efi',
|
|
37
38
|
host: n.address,
|
|
38
39
|
subnet: n.cidr,
|
|
39
|
-
tftpserver: n.address
|
|
40
|
+
tftpserver: n.address
|
|
40
41
|
};
|
|
41
42
|
pxe.dhcpStart(dhcpOptions);
|
|
42
43
|
/**
|
|
@@ -46,7 +47,7 @@ export default class Cuckoo extends Command {
|
|
|
46
47
|
denyPUT: true,
|
|
47
48
|
host: n.address,
|
|
48
49
|
port: 69,
|
|
49
|
-
root: pxeRoot
|
|
50
|
+
root: pxeRoot
|
|
50
51
|
};
|
|
51
52
|
await pxe.tftpStart(tftpOptions);
|
|
52
53
|
/**
|
package/dist/commands/dad.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ export default class Dad extends Command {
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static examples: string[];
|
|
12
12
|
static flags: {
|
|
13
|
-
clean: import("@oclif/core/
|
|
14
|
-
default: import("@oclif/core/
|
|
15
|
-
help: import("@oclif/core/
|
|
16
|
-
verbose: import("@oclif/core/
|
|
13
|
+
clean: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
default: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
16
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
17
|
};
|
|
18
18
|
run(): Promise<void>;
|
|
19
19
|
}
|
package/dist/commands/dad.js
CHANGED
|
@@ -12,16 +12,12 @@ import Utils from '../classes/utils.js';
|
|
|
12
12
|
import { exec } from '../lib/utils.js';
|
|
13
13
|
export default class Dad extends Command {
|
|
14
14
|
static description = 'ask help from daddy - TUI configuration helper';
|
|
15
|
-
static examples = [
|
|
16
|
-
'sudo dad',
|
|
17
|
-
'sudo dad --clean',
|
|
18
|
-
'sudo dad --default',
|
|
19
|
-
];
|
|
15
|
+
static examples = ['sudo dad', 'sudo dad --clean', 'sudo dad --default'];
|
|
20
16
|
static flags = {
|
|
21
17
|
clean: Flags.boolean({ char: 'c', description: 'remove old configuration before to create' }),
|
|
22
18
|
default: Flags.boolean({ char: 'd', description: 'remove old configuration and force default' }),
|
|
23
19
|
help: Flags.help({ char: 'h' }),
|
|
24
|
-
verbose: Flags.boolean({ char: 'v' })
|
|
20
|
+
verbose: Flags.boolean({ char: 'v' })
|
|
25
21
|
};
|
|
26
22
|
async run() {
|
|
27
23
|
Utils.titles(this.id + ' ' + this.argv);
|
|
@@ -10,10 +10,10 @@ export default class ExportDeb extends Command {
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static examples: string[];
|
|
12
12
|
static flags: {
|
|
13
|
-
all: import("@oclif/core/
|
|
14
|
-
clean: import("@oclif/core/
|
|
15
|
-
help: import("@oclif/core/
|
|
16
|
-
verbose: import("@oclif/core/
|
|
13
|
+
all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
clean: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
16
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
17
|
};
|
|
18
18
|
run(): Promise<void>;
|
|
19
19
|
}
|
|
@@ -11,16 +11,12 @@ import Utils from '../../classes/utils.js';
|
|
|
11
11
|
import { exec } from '../../lib/utils.js';
|
|
12
12
|
export default class ExportDeb extends Command {
|
|
13
13
|
static description = 'export deb/docs/iso to the destination host';
|
|
14
|
-
static examples = [
|
|
15
|
-
'eggs export deb',
|
|
16
|
-
'eggs export deb --clean',
|
|
17
|
-
'eggs export deb --all',
|
|
18
|
-
];
|
|
14
|
+
static examples = ['eggs export deb', 'eggs export deb --clean', 'eggs export deb --all'];
|
|
19
15
|
static flags = {
|
|
20
16
|
all: Flags.boolean({ char: 'a', description: 'export all archs' }),
|
|
21
17
|
clean: Flags.boolean({ char: 'c', description: 'remove old .deb before to copy' }),
|
|
22
18
|
help: Flags.help({ char: 'h' }),
|
|
23
|
-
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
19
|
+
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
24
20
|
};
|
|
25
21
|
async run() {
|
|
26
22
|
const { args, flags } = await this.parse(ExportDeb);
|