penguins-eggs 9.3.26 → 9.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.oclif.manifest.json +1 -1
- package/conf/derivatives.yaml +7 -0
- package/dist/classes/compressors.js +3 -3
- package/dist/classes/daddy.js +8 -8
- package/dist/classes/distro.js +23 -22
- package/dist/classes/family/archlinux.js +1 -1
- package/dist/classes/family/debian.js +5 -5
- package/dist/classes/incubation/branding.js +4 -4
- package/dist/classes/incubation/distros/jessie.js +1 -1
- package/dist/classes/incubation/distros/rolling.js +4 -4
- package/dist/classes/incubation/fisherman-helper/packages.js +8 -8
- package/dist/classes/incubation/fisherman.js +5 -7
- package/dist/classes/incubation/incubator.js +7 -7
- package/dist/classes/keyboards.js +16 -16
- package/dist/classes/locales.js +9 -9
- package/dist/classes/network.js +5 -7
- package/dist/classes/ovary.js +80 -84
- package/dist/classes/pacman.js +2 -4
- package/dist/classes/pxe.js +131 -131
- package/dist/classes/settings.js +2 -2
- package/dist/classes/sources_list.js +20 -22
- package/dist/classes/systemctl.js +2 -2
- package/dist/classes/tailor.js +216 -225
- package/dist/classes/users.js +24 -24
- package/dist/classes/xdg.js +17 -17
- package/dist/classes/yolk.js +2 -4
- package/dist/commands/adapt.js +2 -2
- package/dist/commands/analyze.js +34 -3
- package/dist/commands/calamares.js +6 -6
- package/dist/commands/config.js +8 -12
- package/dist/commands/cuckoo.js +8 -8
- package/dist/commands/dad.js +4 -4
- package/dist/commands/export/deb.js +7 -7
- package/dist/commands/export/iso.js +6 -6
- package/dist/commands/install.js +15 -15
- package/dist/commands/kill.js +3 -3
- package/dist/commands/mom.js +2 -2
- package/dist/commands/produce.js +9 -9
- package/dist/commands/status.js +2 -2
- package/dist/commands/syncfrom.js +11 -13
- package/dist/commands/syncto.js +36 -41
- package/dist/commands/tools/clean.js +3 -3
- package/dist/commands/tools/ppa.js +10 -10
- package/dist/commands/tools/skel.js +3 -3
- package/dist/commands/tools/stat.js +5 -5
- package/dist/commands/tools/yolk.js +2 -2
- package/dist/commands/update.js +4 -4
- package/dist/commands/wardrobe/get.js +5 -5
- package/dist/commands/wardrobe/list.js +13 -13
- package/dist/commands/wardrobe/show.js +12 -12
- package/dist/commands/wardrobe/wear.js +8 -8
- package/dist/interfaces/i-packages.js +1 -1
- package/dist/interfaces/i-pxe.js +39 -0
- package/dist/krill/modules/add-user.js +2 -2
- package/dist/krill/modules/bootloader-config-ubuntu.js +1 -1
- package/dist/krill/modules/bootloader.js +2 -2
- package/dist/krill/modules/fstab.js +21 -21
- package/dist/krill/modules/grubcfg.js +1 -1
- package/dist/krill/modules/hostname.js +15 -15
- package/dist/krill/modules/initramfs.js +4 -4
- package/dist/krill/modules/locale-cfg.js +8 -8
- package/dist/krill/modules/locale.js +6 -6
- package/dist/krill/modules/m-keyboard.js +20 -20
- package/dist/krill/modules/machine-id.js +1 -1
- package/dist/krill/modules/mkfs.js +1 -1
- package/dist/krill/modules/mount-fs.js +7 -9
- package/dist/krill/modules/network-cfg.js +15 -17
- package/dist/krill/modules/packages.js +6 -6
- package/dist/krill/modules/partition.js +91 -84
- package/dist/krill/modules/remove-installer-link.js +1 -1
- package/dist/krill/modules/unpackfs.js +1 -1
- package/dist/lib/cli-autologin.js +7 -7
- package/dist/lib/dependencies.js +10 -10
- package/dist/lib/get_address.js +2 -2
- package/dist/lib/get_dns.js +2 -2
- package/dist/lib/get_domain.js +2 -2
- package/dist/lib/get_gateway.js +2 -2
- package/dist/lib/get_hostname.js +2 -2
- package/dist/lib/get_netmask.js +2 -2
- package/dist/lib/get_password.js +4 -4
- package/dist/lib/get_root_password.js +3 -3
- package/dist/lib/get_userfullname.js +2 -2
- package/dist/lib/get_username.js +2 -2
- package/dist/lib/select_address_type.js +2 -2
- package/dist/lib/select_filesystem_type.js +2 -2
- package/dist/lib/select_installation_device.js +2 -2
- package/dist/lib/select_installation_mode.js +2 -2
- package/dist/lib/select_interface.js +2 -2
- package/dist/lib/select_keyboard_layout.js +4 -4
- package/dist/lib/select_keyboard_model.js +4 -4
- package/dist/lib/select_keyboard_option.js +4 -4
- package/dist/lib/select_keyboard_variant.js +4 -4
- package/dist/lib/select_languages.js +3 -3
- package/dist/lib/select_regions.js +2 -2
- package/dist/lib/select_user_swap_choice.js +2 -2
- package/dist/lib/select_zones.js +8 -8
- package/dist/lib/utils.js +3 -3
- package/dist/types/etrick.js +1 -0
- package/package.json +8 -2
- package/dist/dhcpd/dhcpd.js +0 -222
- package/dist/dhcpd/index.js +0 -7
- package/dist/dhcpd/packet/converters.js +0 -377
- package/dist/dhcpd/packet/options.js +0 -2
- package/dist/dhcpd/packet/types.js +0 -2
- package/dist/dhcpd/packet.js +0 -251
- package/dist/dhcpd/proxy.js +0 -152
- package/dist/dhcpd/server.js +0 -152
- package/dist/dhcpd/sprintf.js +0 -170
- package/dist/dhcpd/utils.js +0 -190
- package/dist/interfaces/i-pxe-options.js +0 -2
package/dist/classes/users.js
CHANGED
|
@@ -24,7 +24,7 @@ class Users {
|
|
|
24
24
|
* @param verbose
|
|
25
25
|
*/
|
|
26
26
|
async getValues() {
|
|
27
|
-
|
|
27
|
+
const fLevels = [
|
|
28
28
|
{ path: 'bin', saveIt: false },
|
|
29
29
|
{ path: 'boot', saveIt: false },
|
|
30
30
|
{ path: 'dev', saveIt: false },
|
|
@@ -45,63 +45,63 @@ class Users {
|
|
|
45
45
|
{ path: 'srv', saveIt: true },
|
|
46
46
|
{ path: 'tmp', saveIt: false },
|
|
47
47
|
{ path: 'usr', saveIt: true },
|
|
48
|
-
{ path: 'var', saveIt: true }
|
|
48
|
+
{ path: 'var', saveIt: true },
|
|
49
49
|
];
|
|
50
50
|
let hasHome = false;
|
|
51
51
|
let saveIt = false;
|
|
52
52
|
let size = 0;
|
|
53
53
|
// Only users not services
|
|
54
|
-
if (parseInt(this.uid) >= 1000) {
|
|
54
|
+
if (Number.parseInt(this.uid) >= 1000) {
|
|
55
55
|
if (this.home != undefined) {
|
|
56
56
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
for (
|
|
62
|
-
if (
|
|
63
|
-
saveIt =
|
|
57
|
+
* analyze firstLevel and
|
|
58
|
+
* excluded to be saved
|
|
59
|
+
*/
|
|
60
|
+
const fLevel = this.home.split('/')[1];
|
|
61
|
+
for (const fLevel_ of fLevels) {
|
|
62
|
+
if (fLevel_.path === fLevel) {
|
|
63
|
+
saveIt = fLevel_.saveIt;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
* analize second level
|
|
68
|
+
* examples: /var/run, /var/cache, /var/spool, etc
|
|
69
|
+
*/
|
|
70
70
|
if (saveIt) {
|
|
71
|
-
|
|
71
|
+
const sLevel = this.home.split('/')[2];
|
|
72
72
|
if (sLevel === 'cache' || sLevel === 'run' || sLevel === 'spool') {
|
|
73
73
|
saveIt = false;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
* exclude to save if home don't exist
|
|
78
|
+
*/
|
|
79
79
|
if (!fs_1.default.existsSync(this.home)) {
|
|
80
80
|
saveIt = false;
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
* others motivations to exclude
|
|
84
|
+
*/
|
|
85
85
|
if (saveIt) {
|
|
86
86
|
switch (this.home) {
|
|
87
87
|
/**
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
* exclude always /
|
|
89
|
+
*/
|
|
90
90
|
case '/':
|
|
91
91
|
{
|
|
92
92
|
break;
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
* excludes: under /usr
|
|
96
|
+
*/
|
|
97
97
|
case '/usr/bin':
|
|
98
98
|
case '/usr/sbin': {
|
|
99
99
|
saveIt = false;
|
|
100
100
|
break;
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
* excludes: under var
|
|
104
|
+
*/
|
|
105
105
|
case '/var/backups':
|
|
106
106
|
case '/var/lib/colord':
|
|
107
107
|
case '/var/lib/geoclue':
|
package/dist/classes/xdg.js
CHANGED
|
@@ -90,13 +90,13 @@ class Xdg {
|
|
|
90
90
|
* LIGHTDM
|
|
91
91
|
*/
|
|
92
92
|
if (pacman_1.default.packageIsInstalled('lightdm')) {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
const dc = `${chroot}/etc/lightdm/`;
|
|
94
|
+
const files = node_fs_1.default.readdirSync(dc);
|
|
95
95
|
for (const elem of files) {
|
|
96
96
|
const curFile = dc + elem;
|
|
97
97
|
if (!n8_1.default.isDirectory(curFile)) {
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
const content = node_fs_1.default.readFileSync(curFile, 'utf8');
|
|
99
|
+
const find = '[Seat:*]';
|
|
100
100
|
if (content.includes(find)) {
|
|
101
101
|
shelljs_1.default.sed('-i', `autologin-user=${olduser}`, `autologin-user=${newuser}`, curFile);
|
|
102
102
|
}
|
|
@@ -108,23 +108,23 @@ class Xdg {
|
|
|
108
108
|
*/
|
|
109
109
|
if (pacman_1.default.packageIsInstalled('sddm')) {
|
|
110
110
|
let sddmChanged = false;
|
|
111
|
-
|
|
111
|
+
const curFile = `${chroot}/etc/sddm.conf`;
|
|
112
112
|
if (node_fs_1.default.existsSync(curFile)) {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
const content = node_fs_1.default.readFileSync(curFile, 'utf8');
|
|
114
|
+
const find = '[Autologin]';
|
|
115
115
|
if (content.includes(find)) {
|
|
116
116
|
shelljs_1.default.sed('-i', `User=${olduser}`, `User=${newuser}`, curFile);
|
|
117
117
|
sddmChanged = true;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
if (!sddmChanged) {
|
|
121
|
-
|
|
121
|
+
const dc = `${chroot}/etc/sddm.conf.d/`;
|
|
122
122
|
if (node_fs_1.default.existsSync(dc)) {
|
|
123
|
-
|
|
123
|
+
const files = node_fs_1.default.readdirSync(dc);
|
|
124
124
|
for (const elem of files) {
|
|
125
125
|
const curFile = dc + elem;
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
const content = node_fs_1.default.readFileSync(curFile, 'utf8');
|
|
127
|
+
const find = '[Autologin]';
|
|
128
128
|
if (content.includes(find)) {
|
|
129
129
|
shelljs_1.default.sed('-i', `User=${olduser}`, `User=${newuser}`, curFile);
|
|
130
130
|
sddmChanged = true;
|
|
@@ -134,12 +134,12 @@ class Xdg {
|
|
|
134
134
|
}
|
|
135
135
|
// sddm.conf don't exists, generate it
|
|
136
136
|
if (!sddmChanged) {
|
|
137
|
-
let session =
|
|
137
|
+
let session = 'plasma';
|
|
138
138
|
if (pacman_1.default.isInstalledWayland()) {
|
|
139
|
-
session =
|
|
139
|
+
session = 'plasma-wayland';
|
|
140
140
|
}
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
const content = `[Autologin]\nUser=${newuser}\nSession=${session}\n`;
|
|
142
|
+
const curFile = `${chroot}/etc/sddm.conf`;
|
|
143
143
|
node_fs_1.default.writeFileSync(curFile, content, 'utf8');
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -219,7 +219,7 @@ class Xdg {
|
|
|
219
219
|
else if (pacman_1.default.packageIsInstalled('xfce4-session')) {
|
|
220
220
|
// use .config/xfce4 NOT .config/xfce4/
|
|
221
221
|
await rsyncIfExist(`/home/${user}/.config/xfce4`, '/etc/skel/.config', verbose);
|
|
222
|
-
await (0, utils_2.exec)(
|
|
222
|
+
await (0, utils_2.exec)('mkdir /etc/skel/.local/share -p', echo);
|
|
223
223
|
await rsyncIfExist(`/home/${user}/.local/share/recently-used.xbel`, '/etc/skel/.local/share', verbose);
|
|
224
224
|
}
|
|
225
225
|
/**
|
|
@@ -234,7 +234,7 @@ class Xdg {
|
|
|
234
234
|
// we need to copy: .linuxfx ,kde and ,cinnamon
|
|
235
235
|
await rsyncIfExist(`/home/${user}/.cinnamon`, '/etc/skel', verbose);
|
|
236
236
|
await rsyncIfExist(`/home/${user}/.kde`, '/etc/skel', verbose);
|
|
237
|
-
await rsyncIfExist(`/home/${user}/.linuxfx`,
|
|
237
|
+
await rsyncIfExist(`/home/${user}/.linuxfx`, '/etc/skel', verbose);
|
|
238
238
|
await rsyncIfExist(`/home/${user}/.local`, '/etc/skel', verbose);
|
|
239
239
|
}
|
|
240
240
|
await (0, utils_2.exec)('chown root:root /etc/skel -R', echo);
|
package/dist/classes/yolk.js
CHANGED
|
@@ -93,10 +93,8 @@ class Yolk {
|
|
|
93
93
|
// select for downloads only packages NOT already installed
|
|
94
94
|
const toDownloads = [];
|
|
95
95
|
for (const depend of depends) {
|
|
96
|
-
if (depend !== '') {
|
|
97
|
-
|
|
98
|
-
toDownloads.push(depend);
|
|
99
|
-
}
|
|
96
|
+
if (depend !== '' && !pacman_1.default.packageIsInstalled(depend)) {
|
|
97
|
+
toDownloads.push(depend);
|
|
100
98
|
}
|
|
101
99
|
}
|
|
102
100
|
// now we go to downloads them
|
package/dist/commands/adapt.js
CHANGED
|
@@ -24,9 +24,9 @@ class Adapt extends core_1.Command {
|
|
|
24
24
|
exports.default = Adapt;
|
|
25
25
|
Adapt.flags = {
|
|
26
26
|
help: core_1.Flags.help({ char: 'h' }),
|
|
27
|
-
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
27
|
+
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
28
28
|
};
|
|
29
29
|
Adapt.description = 'adapt monitor resolution for VM only';
|
|
30
30
|
Adapt.examples = [
|
|
31
|
-
|
|
31
|
+
'eggs adapt',
|
|
32
32
|
];
|
package/dist/commands/analyze.js
CHANGED
|
@@ -13,6 +13,7 @@ const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
|
13
13
|
const promises_1 = require("fs/promises");
|
|
14
14
|
const fs_2 = require("fs");
|
|
15
15
|
const users_1 = tslib_1.__importDefault(require("../classes/users"));
|
|
16
|
+
const systeminformation_1 = tslib_1.__importDefault(require("systeminformation"));
|
|
16
17
|
class Analyze extends core_1.Command {
|
|
17
18
|
constructor() {
|
|
18
19
|
super(...arguments);
|
|
@@ -30,6 +31,36 @@ class Analyze extends core_1.Command {
|
|
|
30
31
|
const echo = utils_1.default.setEcho(verbose);
|
|
31
32
|
let totalSize = 0;
|
|
32
33
|
if (utils_1.default.isRoot(this.id)) {
|
|
34
|
+
const audio = await systeminformation_1.default.audio();
|
|
35
|
+
const bios = await systeminformation_1.default.bios();
|
|
36
|
+
const blockDevices = await systeminformation_1.default.blockDevices();
|
|
37
|
+
const chassis = await systeminformation_1.default.chassis();
|
|
38
|
+
const cpu = await systeminformation_1.default.cpu();
|
|
39
|
+
const diskLayout = await systeminformation_1.default.diskLayout();
|
|
40
|
+
const mem = await systeminformation_1.default.mem();
|
|
41
|
+
const usb = await systeminformation_1.default.usb();
|
|
42
|
+
console.log(`chassis: ${chassis.manufacturer} model: ${chassis.manufacturer}`);
|
|
43
|
+
console.log(`bios vendor: ${bios.vendor} version: ${bios.version} revision: ${bios.revision}`);
|
|
44
|
+
console.log(`processor: ${cpu.brand} core: ${cpu.cores} `);
|
|
45
|
+
if (diskLayout[0].device !== undefined) {
|
|
46
|
+
console.log(`disk0: ${diskLayout[0].device}`);
|
|
47
|
+
}
|
|
48
|
+
if (diskLayout[1] !== undefined) {
|
|
49
|
+
console.log(`disk1: ${diskLayout[1].device}`);
|
|
50
|
+
}
|
|
51
|
+
if (diskLayout[2] !== undefined) {
|
|
52
|
+
console.log(`disk1: ${diskLayout[2].device}`);
|
|
53
|
+
}
|
|
54
|
+
console.log(`name: ${blockDevices[0].name} fs: ${blockDevices[0].fsType}`);
|
|
55
|
+
console.log(`name: ${blockDevices[1].name} fs: ${blockDevices[1].fsType}`);
|
|
56
|
+
console.log(`name: ${blockDevices[2].name} fs: ${blockDevices[2].fsType}`);
|
|
57
|
+
console.log(`name: ${blockDevices[3].name} fs: ${blockDevices[3].fsType}`);
|
|
58
|
+
console.log(`usb: ${usb[0].name}`);
|
|
59
|
+
/**
|
|
60
|
+
* Windows: "/Documents and Settings", "/Programs", "/AppData"
|
|
61
|
+
* MacOS: "/Users"
|
|
62
|
+
* Linux: "/home"
|
|
63
|
+
*/
|
|
33
64
|
utils_1.default.warning('eggs will analyze your system, to get users and servers data');
|
|
34
65
|
const users = await this.fill();
|
|
35
66
|
for (let i = 0; i < users.length; i++)
|
|
@@ -52,8 +83,8 @@ class Analyze extends core_1.Command {
|
|
|
52
83
|
const usersArray = [];
|
|
53
84
|
await (0, promises_1.access)('/etc/passwd', fs_2.constants.R_OK | fs_2.constants.W_OK);
|
|
54
85
|
const passwd = fs_1.default.readFileSync('/etc/passwd', 'utf-8').split('\n');
|
|
55
|
-
for (
|
|
56
|
-
|
|
86
|
+
for (const element of passwd) {
|
|
87
|
+
const line = element.split(':');
|
|
57
88
|
const users = new users_1.default(line[0], line[1], line[2], line[3], line[4], line[5], line[6]);
|
|
58
89
|
await users.getValues();
|
|
59
90
|
if (users.password !== undefined) {
|
|
@@ -71,7 +102,7 @@ class Analyze extends core_1.Command {
|
|
|
71
102
|
exports.default = Analyze;
|
|
72
103
|
Analyze.flags = {
|
|
73
104
|
help: core_1.Flags.help({ char: 'h' }),
|
|
74
|
-
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
105
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' }),
|
|
75
106
|
};
|
|
76
107
|
Analyze.description = 'analyze for syncto';
|
|
77
108
|
Analyze.examples = ['sudo eggs analyze'];
|
|
@@ -43,7 +43,7 @@ class Calamares extends core_1.Command {
|
|
|
43
43
|
if (flags.theme !== undefined) {
|
|
44
44
|
theme = flags.theme;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
const nointeractive = flags.nointeractive;
|
|
47
47
|
console.log(`theme: ${theme}`);
|
|
48
48
|
if (utils_1.default.isRoot(this.id)) {
|
|
49
49
|
let installer = 'krill';
|
|
@@ -107,12 +107,12 @@ Calamares.flags = {
|
|
|
107
107
|
release: core_1.Flags.boolean({ char: 'r', description: "release: remove calamares and all it's dependencies after the installation" }),
|
|
108
108
|
remove: core_1.Flags.boolean({ description: "remove calamares and it's dependencies" }),
|
|
109
109
|
theme: core_1.Flags.string({ description: 'theme/branding for eggs and calamares' }),
|
|
110
|
-
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
110
|
+
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
111
111
|
};
|
|
112
112
|
Calamares.description = 'configure calamares or install or configure it';
|
|
113
113
|
Calamares.examples = [
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
'sudo eggs calamares',
|
|
115
|
+
'sudo eggs calamares --install',
|
|
116
|
+
'sudo eggs calamares --install --theme=/path/to/theme',
|
|
117
|
+
'sudo eggs calamares --remove',
|
|
118
118
|
];
|
package/dist/commands/config.js
CHANGED
|
@@ -73,14 +73,10 @@ class Config extends core_1.Command {
|
|
|
73
73
|
if (utils_1.default.machineArch() !== 'i386') {
|
|
74
74
|
i.efi = !pacman_1.default.isUefi();
|
|
75
75
|
}
|
|
76
|
-
if (!cryptedclone) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
// se nointeractive i.calamares=false
|
|
81
|
-
i.calamares = nointeractive ? false : await utils_1.default.customConfirm('Want You install calamares?');
|
|
82
|
-
}
|
|
83
|
-
}
|
|
76
|
+
if (!cryptedclone && !(await pacman_1.default.calamaresCheck()) && pacman_1.default.isInstalledGui() && pacman_1.default.isCalamaresAvailable() && !pacman_1.default.packageIsInstalled('live-installer')) {
|
|
77
|
+
utils_1.default.warning('Config: you are on a graphic system, I suggest to install the GUI installer calamares');
|
|
78
|
+
// se nointeractive i.calamares=false
|
|
79
|
+
i.calamares = nointeractive ? false : await utils_1.default.customConfirm('Want You install calamares?');
|
|
84
80
|
}
|
|
85
81
|
i.configurationInstall = !pacman_1.default.configurationCheck();
|
|
86
82
|
if (!i.configurationInstall) {
|
|
@@ -211,11 +207,11 @@ Config.flags = {
|
|
|
211
207
|
clean: core_1.Flags.boolean({ char: 'c', description: 'remove old configuration before to create new one' }),
|
|
212
208
|
help: core_1.Flags.help({ char: 'h' }),
|
|
213
209
|
nointeractive: core_1.Flags.boolean({ char: 'n', description: 'no user interaction' }),
|
|
214
|
-
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
210
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' }),
|
|
215
211
|
};
|
|
216
212
|
Config.description = 'Configure and install prerequisites deb packages to run it';
|
|
217
213
|
Config.examples = [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
214
|
+
'sudo eggs config',
|
|
215
|
+
'sudo eggs config --clean',
|
|
216
|
+
'sudo eggs config --clean --nointeractive',
|
|
221
217
|
];
|
package/dist/commands/cuckoo.js
CHANGED
|
@@ -22,23 +22,23 @@ class Cuckoo extends core_1.Command {
|
|
|
22
22
|
/**
|
|
23
23
|
* service proxy-dhcp
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
const dhcpOptions = {
|
|
26
26
|
subnet: n.cidr,
|
|
27
27
|
host: n.address,
|
|
28
28
|
tftpserver: n.address,
|
|
29
29
|
bios_filename: 'lpxelinux.0',
|
|
30
30
|
efi32_filename: 'ipxe32.efi',
|
|
31
|
-
efi64_filename: 'ipxe.efi'
|
|
31
|
+
efi64_filename: 'ipxe.efi',
|
|
32
32
|
};
|
|
33
33
|
pxe.dhcpStart(dhcpOptions);
|
|
34
34
|
/**
|
|
35
35
|
* service tftp
|
|
36
36
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
const tftpOptions = {
|
|
38
|
+
host: n.address,
|
|
39
|
+
port: 69,
|
|
40
|
+
root: pxeRoot,
|
|
41
|
+
denyPUT: true,
|
|
42
42
|
};
|
|
43
43
|
await pxe.tftpStart(tftpOptions);
|
|
44
44
|
/**
|
|
@@ -57,5 +57,5 @@ Cuckoo.flags = {
|
|
|
57
57
|
};
|
|
58
58
|
Cuckoo.description = 'PXE start with proxy-dhcp';
|
|
59
59
|
Cuckoo.examples = [
|
|
60
|
-
|
|
60
|
+
'sudo eggs cuckoo',
|
|
61
61
|
];
|
package/dist/commands/dad.js
CHANGED
|
@@ -34,11 +34,11 @@ Dad.flags = {
|
|
|
34
34
|
clean: core_1.Flags.boolean({ char: 'c', description: 'remove old configuration before to create' }),
|
|
35
35
|
default: core_1.Flags.boolean({ char: 'd', description: 'remove old configuration and force default' }),
|
|
36
36
|
help: core_1.Flags.help({ char: 'h' }),
|
|
37
|
-
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
37
|
+
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
38
38
|
};
|
|
39
39
|
Dad.description = 'ask help from daddy - TUI configuration helper';
|
|
40
40
|
Dad.examples = [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
'sudo dad',
|
|
42
|
+
'sudo dad --clean',
|
|
43
|
+
'sudo dad --default',
|
|
44
44
|
];
|
|
@@ -20,9 +20,9 @@ class ExportDeb extends core_1.Command {
|
|
|
20
20
|
}
|
|
21
21
|
if (flags.clean) {
|
|
22
22
|
arch += '.deb';
|
|
23
|
-
script
|
|
23
|
+
script = String(script);
|
|
24
24
|
}
|
|
25
|
-
const rmount = `/tmp/eggs-${(Math.random() + 1).toString(36).
|
|
25
|
+
const rmount = `/tmp/eggs-${(Math.random() + 1).toString(36).slice(7)}`;
|
|
26
26
|
let cmd = `rm -f ${rmount}\n`;
|
|
27
27
|
cmd += `mkdir ${rmount}\n`;
|
|
28
28
|
cmd += `sshfs ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathDeb} ${rmount}\n`;
|
|
@@ -30,7 +30,7 @@ class ExportDeb extends core_1.Command {
|
|
|
30
30
|
cmd += `rm -f ${rmount}/${Tu.config.filterDeb}${arch}\n`;
|
|
31
31
|
}
|
|
32
32
|
cmd += `cp ${Tu.config.localPathDeb}${Tu.config.filterDeb}${arch} ${rmount}\n`;
|
|
33
|
-
cmd +=
|
|
33
|
+
cmd += 'sync\n';
|
|
34
34
|
cmd += `umount ${rmount}\n`;
|
|
35
35
|
cmd += `rm -f ${rmount}\m`;
|
|
36
36
|
if (!flags.verbose) {
|
|
@@ -47,11 +47,11 @@ ExportDeb.flags = {
|
|
|
47
47
|
all: core_1.Flags.boolean({ char: 'a', description: 'export all archs' }),
|
|
48
48
|
clean: core_1.Flags.boolean({ char: 'c', description: 'remove old .deb before to copy' }),
|
|
49
49
|
help: core_1.Flags.help({ char: 'h' }),
|
|
50
|
-
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
50
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' }),
|
|
51
51
|
};
|
|
52
52
|
ExportDeb.description = 'export deb/docs/iso to the destination host';
|
|
53
53
|
ExportDeb.examples = [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
'eggs export deb',
|
|
55
|
+
'eggs export deb --clean',
|
|
56
|
+
'eggs export deb --all',
|
|
57
57
|
];
|
|
@@ -16,16 +16,16 @@ class ExportIso extends core_1.Command {
|
|
|
16
16
|
const Tu = new tools_1.default();
|
|
17
17
|
await Tu.loadSettings();
|
|
18
18
|
const echo = utils_1.default.setEcho(flags.verbose);
|
|
19
|
-
const rmount = `/tmp/eggs-${(Math.random() + 1).toString(36).
|
|
19
|
+
const rmount = `/tmp/eggs-${(Math.random() + 1).toString(36).slice(7)}`;
|
|
20
20
|
let cmd = `rm -f ${rmount}\n`;
|
|
21
|
-
|
|
21
|
+
const filter = '*.iso';
|
|
22
22
|
cmd += `mkdir ${rmount}\n`;
|
|
23
23
|
cmd += `sshfs ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathIso} ${rmount}\n`;
|
|
24
24
|
if (flags.clean) {
|
|
25
25
|
cmd += `rm -f ${rmount}/${Tu.snapshot_name}*\n`;
|
|
26
26
|
}
|
|
27
27
|
cmd += `cp ${Tu.snapshot_dir}${Tu.snapshot_name}${filter} ${rmount}\n`;
|
|
28
|
-
cmd +=
|
|
28
|
+
cmd += 'sync\n';
|
|
29
29
|
cmd += `umount ${rmount}\n`;
|
|
30
30
|
cmd += `rm -f ${rmount}\m`;
|
|
31
31
|
if (!flags.verbose) {
|
|
@@ -41,10 +41,10 @@ exports.default = ExportIso;
|
|
|
41
41
|
ExportIso.flags = {
|
|
42
42
|
clean: core_1.Flags.boolean({ char: 'c', description: 'delete old ISOs before to copy' }),
|
|
43
43
|
help: core_1.Flags.help({ char: 'h' }),
|
|
44
|
-
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
44
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' }),
|
|
45
45
|
};
|
|
46
46
|
ExportIso.description = 'export iso in the destination host';
|
|
47
47
|
ExportIso.examples = [
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
'eggs export iso',
|
|
49
|
+
'eggs export iso --clean',
|
|
50
50
|
];
|
package/dist/commands/install.js
CHANGED
|
@@ -16,7 +16,7 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
|
16
16
|
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
17
17
|
const node_https_1 = tslib_1.__importDefault(require("node:https"));
|
|
18
18
|
const agent = new node_https_1.default.Agent({
|
|
19
|
-
rejectUnauthorized: false
|
|
19
|
+
rejectUnauthorized: false,
|
|
20
20
|
});
|
|
21
21
|
/**
|
|
22
22
|
* Class Krill
|
|
@@ -36,9 +36,9 @@ class Install extends core_1.Command {
|
|
|
36
36
|
// krillConfig
|
|
37
37
|
let krillConfig = {};
|
|
38
38
|
if (custom !== undefined) {
|
|
39
|
-
|
|
39
|
+
const fname = node_path_1.default.basename(custom);
|
|
40
40
|
unattended = true;
|
|
41
|
-
|
|
41
|
+
const url = `https://raw.githubusercontent.com/pieroproietti/penguins-wardrobe/main/config/${fname}.yaml`;
|
|
42
42
|
let res;
|
|
43
43
|
await axios_1.default.get(url, { httpsAgent: agent })
|
|
44
44
|
.then(function (response) {
|
|
@@ -50,24 +50,24 @@ class Install extends core_1.Command {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
// nointeractive
|
|
53
|
-
|
|
53
|
+
const nointeractive = flags.nointeractive;
|
|
54
54
|
// hostname
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
const ip = flags.ip;
|
|
56
|
+
const random = flags.random;
|
|
57
57
|
let domain = '.local';
|
|
58
58
|
if (flags.domain) {
|
|
59
59
|
domain = flags.domain;
|
|
60
60
|
}
|
|
61
61
|
// swap
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
const suspend = flags.suspend;
|
|
63
|
+
const small = flags.small;
|
|
64
|
+
const none = flags.none;
|
|
65
65
|
let crypted = flags.crypted;
|
|
66
|
-
|
|
66
|
+
const pve = flags.pve;
|
|
67
67
|
if (pve) {
|
|
68
68
|
crypted = false;
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
const verbose = flags.verbose;
|
|
71
71
|
if (utils_1.default.isRoot()) {
|
|
72
72
|
if (utils_1.default.isLive()) {
|
|
73
73
|
const krill = new krill_prepare_1.default();
|
|
@@ -96,11 +96,11 @@ Install.flags = {
|
|
|
96
96
|
small: core_1.Flags.boolean({ char: 's', description: 'Swap small: RAM' }),
|
|
97
97
|
suspend: core_1.Flags.boolean({ char: 'S', description: 'Swap suspend: RAM x 2' }),
|
|
98
98
|
unattended: core_1.Flags.boolean({ char: 'u', description: 'Unattended installation' }),
|
|
99
|
-
verbose: core_1.Flags.boolean({ char: 'v', description: 'Verbose' })
|
|
99
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'Verbose' }),
|
|
100
100
|
};
|
|
101
101
|
Install.description = 'krill: the CLI system installer - the egg became a penguin!';
|
|
102
102
|
Install.examples = [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
'sudo eggs install',
|
|
104
|
+
'sudo eggs install --unattended',
|
|
105
|
+
'sudo eggs install --custom it',
|
|
106
106
|
];
|
package/dist/commands/kill.js
CHANGED
|
@@ -25,7 +25,7 @@ class Kill extends core_1.Command {
|
|
|
25
25
|
if (flags.verbose) {
|
|
26
26
|
verbose = true;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
const nointeractive = flags.nointeractive;
|
|
29
29
|
const echo = utils_1.default.setEcho(verbose);
|
|
30
30
|
if (utils_1.default.isRoot()) {
|
|
31
31
|
// Utils.warning('Cleaning the nest...')
|
|
@@ -46,9 +46,9 @@ exports.default = Kill;
|
|
|
46
46
|
Kill.flags = {
|
|
47
47
|
help: core_1.Flags.help({ char: 'h' }),
|
|
48
48
|
nointeractive: core_1.Flags.boolean({ char: 'n', description: 'no user interaction' }),
|
|
49
|
-
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
49
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' }),
|
|
50
50
|
};
|
|
51
51
|
Kill.description = 'kill the eggs/free the nest';
|
|
52
52
|
Kill.examples = [
|
|
53
|
-
|
|
53
|
+
'sudo eggs kill',
|
|
54
54
|
];
|
package/dist/commands/mom.js
CHANGED
|
@@ -25,9 +25,9 @@ class Mom extends core_1.Command {
|
|
|
25
25
|
}
|
|
26
26
|
exports.default = Mom;
|
|
27
27
|
Mom.flags = {
|
|
28
|
-
help: core_1.Flags.help({ char: 'h' })
|
|
28
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
29
29
|
};
|
|
30
30
|
Mom.description = 'ask help from mommy - TUI helper';
|
|
31
31
|
Mom.examples = [
|
|
32
|
-
|
|
32
|
+
'eggs mom',
|
|
33
33
|
];
|
package/dist/commands/produce.js
CHANGED
|
@@ -80,7 +80,7 @@ class Produce extends core_1.Command {
|
|
|
80
80
|
theme = flags.theme;
|
|
81
81
|
if (theme.includes('/')) {
|
|
82
82
|
if (theme.endsWith('/')) {
|
|
83
|
-
theme = theme.
|
|
83
|
+
theme = theme.slice(0, Math.max(0, theme.length - 1));
|
|
84
84
|
}
|
|
85
85
|
if (!node_fs_1.default.existsSync(theme + '/theme')) {
|
|
86
86
|
console.log('Cannot find theme: ' + theme);
|
|
@@ -139,12 +139,12 @@ Produce.flags = {
|
|
|
139
139
|
};
|
|
140
140
|
Produce.description = 'produce a live image from your system whithout your data';
|
|
141
141
|
Produce.examples = [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
142
|
+
'sudo eggs produce',
|
|
143
|
+
'sudo eggs produce --standard',
|
|
144
|
+
'sudo eggs produce --max',
|
|
145
|
+
'sudo eggs produce --max --basename=colibri',
|
|
146
|
+
'sudo eggs produce --cryptedclone',
|
|
147
|
+
'sudo eggs produce --clone',
|
|
148
|
+
'sudo eggs produce --basename=colibri',
|
|
149
|
+
'sudo eggs produce --basename=colibri --theme /path/to/theme --addons adapt',
|
|
150
150
|
];
|
package/dist/commands/status.js
CHANGED
|
@@ -25,9 +25,9 @@ class Status extends core_1.Command {
|
|
|
25
25
|
exports.default = Status;
|
|
26
26
|
Status.flags = {
|
|
27
27
|
help: core_1.Flags.help({ char: 'h' }),
|
|
28
|
-
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
28
|
+
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
29
29
|
};
|
|
30
30
|
Status.description = 'informations about eggs status';
|
|
31
31
|
Status.examples = [
|
|
32
|
-
|
|
32
|
+
'eggs status',
|
|
33
33
|
];
|