penguins-eggs 9.3.27 → 9.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.oclif.manifest.json +1 -1
- package/dist/classes/bleach.js +26 -24
- package/dist/classes/compressors.js +4 -2
- package/dist/classes/daddy.js +30 -28
- package/dist/classes/distro.js +7 -5
- package/dist/classes/family/archlinux.js +21 -19
- package/dist/classes/family/debian.js +28 -26
- package/dist/classes/family/fedora.js +19 -17
- package/dist/classes/family/suse.js +19 -17
- package/dist/classes/incubation/branding.js +4 -2
- package/dist/classes/incubation/distros/bionic.js +5 -3
- package/dist/classes/incubation/distros/buster.js +5 -3
- package/dist/classes/incubation/distros/focal.js +5 -3
- package/dist/classes/incubation/distros/jessie.js +5 -3
- package/dist/classes/incubation/distros/rolling.js +5 -3
- package/dist/classes/incubation/fisherman-helper/displaymanager.js +5 -3
- package/dist/classes/incubation/fisherman-helper/packages.js +9 -7
- package/dist/classes/incubation/fisherman.js +14 -12
- package/dist/classes/incubation/incubator.js +30 -28
- package/dist/classes/incubation/installer.js +8 -6
- package/dist/classes/initrd.js +5 -3
- package/dist/classes/keyboards.js +9 -7
- package/dist/classes/locales.js +10 -8
- package/dist/classes/n8.js +4 -2
- package/dist/classes/network.js +4 -2
- package/dist/classes/ovary.js +214 -211
- package/dist/classes/pacman.js +127 -125
- package/dist/classes/pve-live.js +7 -5
- package/dist/classes/pxe.js +66 -63
- package/dist/classes/settings.js +32 -30
- package/dist/classes/sources_list.js +12 -10
- package/dist/classes/systemctl.js +14 -12
- package/dist/classes/tailor.js +64 -62
- package/dist/classes/tools.js +7 -5
- package/dist/classes/users.js +6 -4
- package/dist/classes/utils.js +22 -20
- package/dist/classes/xdg.js +44 -42
- package/dist/classes/yolk.js +32 -30
- package/dist/commands/adapt.js +12 -10
- package/dist/commands/analyze.js +15 -13
- package/dist/commands/calamares.js +22 -20
- package/dist/commands/config.js +71 -69
- package/dist/commands/cuckoo.js +11 -9
- package/dist/commands/dad.js +12 -10
- package/dist/commands/export/deb.js +12 -10
- package/dist/commands/export/iso.js +11 -9
- package/dist/commands/install.js +16 -14
- package/dist/commands/kill.js +14 -12
- package/dist/commands/mom.js +9 -7
- package/dist/commands/produce.js +21 -19
- package/dist/commands/status.js +5 -3
- package/dist/commands/syncfrom.js +39 -37
- package/dist/commands/syncto.js +47 -45
- package/dist/commands/tools/clean.js +10 -8
- package/dist/commands/tools/ppa.js +21 -19
- package/dist/commands/tools/skel.js +15 -13
- package/dist/commands/tools/stat.js +7 -5
- package/dist/commands/tools/yolk.js +11 -9
- package/dist/commands/update.js +25 -23
- package/dist/commands/wardrobe/get.js +10 -8
- package/dist/commands/wardrobe/list.js +12 -10
- package/dist/commands/wardrobe/show.js +13 -11
- package/dist/commands/wardrobe/wear.js +16 -14
- package/dist/components/elements/information.js +21 -19
- package/dist/components/elements/steps.js +4 -2
- package/dist/components/elements/title.js +4 -2
- package/dist/components/finished.js +10 -8
- package/dist/components/install.js +10 -8
- package/dist/components/keyboard.js +10 -8
- package/dist/components/location.js +10 -8
- package/dist/components/network.js +10 -8
- package/dist/components/partitions.js +10 -8
- package/dist/components/summary.js +10 -8
- package/dist/components/users.js +33 -8
- package/dist/components/welcome.js +10 -8
- package/dist/krill/krill-prepare.js +92 -90
- package/dist/krill/krill-sequence.js +148 -145
- package/dist/krill/modules/add-user.js +9 -7
- package/dist/krill/modules/bootloader-config-ubuntu.js +24 -22
- package/dist/krill/modules/bootloader.js +9 -7
- package/dist/krill/modules/change-password.js +2 -2
- package/dist/krill/modules/del-live-user.js +8 -6
- package/dist/krill/modules/fstab.js +14 -12
- package/dist/krill/modules/grubcfg.js +7 -5
- package/dist/krill/modules/hostname.js +4 -2
- package/dist/krill/modules/initramfs-cfg.js +6 -4
- package/dist/krill/modules/initramfs.js +13 -11
- package/dist/krill/modules/locale-cfg.js +4 -2
- package/dist/krill/modules/locale.js +7 -5
- package/dist/krill/modules/m-keyboard.js +13 -11
- package/dist/krill/modules/m-timezone.js +7 -5
- package/dist/krill/modules/machine-id.js +7 -5
- package/dist/krill/modules/mkfs.js +6 -6
- package/dist/krill/modules/mount-fs.js +17 -15
- package/dist/krill/modules/mount-vfs.js +12 -12
- package/dist/krill/modules/network-cfg.js +8 -6
- package/dist/krill/modules/packages.js +15 -13
- package/dist/krill/modules/partition.js +74 -72
- package/dist/krill/modules/remove-installer-link.js +4 -2
- package/dist/krill/modules/umount.js +9 -7
- package/dist/krill/modules/unpackfs.js +7 -5
- package/dist/lib/cli-autologin.js +163 -163
- package/dist/lib/get_address.js +4 -2
- package/dist/lib/get_dns.js +4 -2
- package/dist/lib/get_domain.js +4 -2
- package/dist/lib/get_gateway.js +4 -2
- package/dist/lib/get_hostname.js +4 -2
- package/dist/lib/get_netmask.js +4 -2
- package/dist/lib/get_password.js +4 -2
- package/dist/lib/get_root_password.js +4 -2
- package/dist/lib/get_userfullname.js +4 -2
- package/dist/lib/get_username.js +4 -2
- package/dist/lib/select_address_type.js +4 -2
- package/dist/lib/select_filesystem_type.js +6 -4
- package/dist/lib/select_installation_device.js +5 -3
- package/dist/lib/select_installation_mode.js +4 -2
- package/dist/lib/select_interface.js +4 -2
- package/dist/lib/select_keyboard_layout.js +6 -4
- package/dist/lib/select_keyboard_model.js +6 -4
- package/dist/lib/select_keyboard_option.js +6 -4
- package/dist/lib/select_keyboard_variant.js +6 -4
- package/dist/lib/select_languages.js +6 -4
- package/dist/lib/select_regions.js +4 -2
- package/dist/lib/select_user_swap_choice.js +6 -4
- package/dist/lib/select_zones.js +4 -2
- package/package.json +6 -5
- package/dist/types/etrick.js +0 -1
package/dist/classes/pacman.js
CHANGED
|
@@ -5,20 +5,22 @@
|
|
|
5
5
|
* email: piero.proietti@gmail.com
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const settings_1 = tslib_1.__importDefault(require("./settings"));
|
|
12
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
13
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
14
|
+
const shelljs_1 = __importDefault(require("shelljs"));
|
|
15
|
+
const utils_js_1 = __importDefault(require("./utils.js"));
|
|
16
|
+
const distro_js_1 = __importDefault(require("./distro.js"));
|
|
17
|
+
const settings_js_1 = __importDefault(require("./settings.js"));
|
|
16
18
|
const node_child_process_1 = require("node:child_process");
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
19
|
+
const utils_js_2 = require("../lib/utils.js");
|
|
20
|
+
const debian_js_1 = __importDefault(require("./family/debian.js"));
|
|
21
|
+
const fedora_js_1 = __importDefault(require("./family/fedora.js"));
|
|
22
|
+
const archlinux_js_1 = __importDefault(require("./family/archlinux.js"));
|
|
23
|
+
const suse_js_1 = __importDefault(require("./family/suse.js"));
|
|
22
24
|
const config_file = '/etc/penguins-eggs.d/eggs.yaml';
|
|
23
25
|
const config_tools = '/etc/penguins-eggs.d/tools.yaml';
|
|
24
26
|
/**
|
|
@@ -36,7 +38,7 @@ class Pacman {
|
|
|
36
38
|
*/
|
|
37
39
|
static distro() {
|
|
38
40
|
const remix = {};
|
|
39
|
-
const distro = new
|
|
41
|
+
const distro = new distro_js_1.default(remix);
|
|
40
42
|
return distro;
|
|
41
43
|
}
|
|
42
44
|
static whichGrubIsInstalled() {
|
|
@@ -68,21 +70,21 @@ class Pacman {
|
|
|
68
70
|
static isInstalledXorg() {
|
|
69
71
|
let installed = false;
|
|
70
72
|
if (this.distro().familyId === 'debian') {
|
|
71
|
-
if (
|
|
73
|
+
if (debian_js_1.default.isInstalledXorg()) {
|
|
72
74
|
installed = true;
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
else if (this.distro().familyId === 'fedora') {
|
|
76
|
-
if (
|
|
78
|
+
if (fedora_js_1.default.isInstalledXorg()) {
|
|
77
79
|
installed = true;
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
else if (this.distro().familyId === 'archlinux') {
|
|
81
|
-
if (
|
|
83
|
+
if (archlinux_js_1.default.isInstalledXorg()) {
|
|
82
84
|
installed = true;
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
|
-
else if (this.distro().familyId === 'suse' &&
|
|
87
|
+
else if (this.distro().familyId === 'suse' && suse_js_1.default.isInstalledXorg()) {
|
|
86
88
|
installed = true;
|
|
87
89
|
}
|
|
88
90
|
return installed;
|
|
@@ -94,21 +96,21 @@ class Pacman {
|
|
|
94
96
|
static isInstalledWayland() {
|
|
95
97
|
let installed = false;
|
|
96
98
|
if (this.distro().familyId === 'debian') {
|
|
97
|
-
if (
|
|
99
|
+
if (debian_js_1.default.isInstalledWayland()) {
|
|
98
100
|
installed = true;
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
else if (this.distro().familyId === 'fedora') {
|
|
102
|
-
if (
|
|
104
|
+
if (fedora_js_1.default.isInstalledWayland()) {
|
|
103
105
|
installed = true;
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
else if (this.distro().familyId === 'archlinux') {
|
|
107
|
-
if (
|
|
109
|
+
if (archlinux_js_1.default.isInstalledWayland()) {
|
|
108
110
|
installed = true;
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
|
-
else if (this.distro().familyId === 'suse' &&
|
|
113
|
+
else if (this.distro().familyId === 'suse' && suse_js_1.default.isInstalledWayland()) {
|
|
112
114
|
installed = true;
|
|
113
115
|
}
|
|
114
116
|
return installed;
|
|
@@ -120,7 +122,7 @@ class Pacman {
|
|
|
120
122
|
static isUefi() {
|
|
121
123
|
let isUefi = false;
|
|
122
124
|
if (this.distro().familyId === 'debian') {
|
|
123
|
-
if (
|
|
125
|
+
if (utils_js_1.default.machineArch() !== 'i386' && this.packageIsInstalled('grub-efi-' + utils_js_1.default.machineArch() + '-bin')) {
|
|
124
126
|
isUefi = true;
|
|
125
127
|
}
|
|
126
128
|
}
|
|
@@ -202,16 +204,16 @@ class Pacman {
|
|
|
202
204
|
static async prerequisitesInstall(verbose = true) {
|
|
203
205
|
let retVal = false;
|
|
204
206
|
if (this.distro().familyId === 'debian') {
|
|
205
|
-
retVal = await
|
|
207
|
+
retVal = await debian_js_1.default.prerequisitesInstall(verbose);
|
|
206
208
|
}
|
|
207
209
|
else if (this.distro().familyId === 'fedora') {
|
|
208
|
-
retVal = await
|
|
210
|
+
retVal = await fedora_js_1.default.prerequisitesInstall(verbose);
|
|
209
211
|
}
|
|
210
212
|
else if (this.distro().familyId === 'archlinux') {
|
|
211
|
-
retVal = await
|
|
213
|
+
retVal = await archlinux_js_1.default.prerequisitesInstall(verbose);
|
|
212
214
|
}
|
|
213
215
|
else if (this.distro().familyId === 'suse') {
|
|
214
|
-
retVal = await
|
|
216
|
+
retVal = await suse_js_1.default.prerequisitesInstall(verbose);
|
|
215
217
|
}
|
|
216
218
|
return retVal;
|
|
217
219
|
}
|
|
@@ -221,16 +223,16 @@ class Pacman {
|
|
|
221
223
|
static async calamaresCheck() {
|
|
222
224
|
let installed = true;
|
|
223
225
|
if (this.distro().familyId === 'debian') {
|
|
224
|
-
installed = await
|
|
226
|
+
installed = await debian_js_1.default.calamaresCheck();
|
|
225
227
|
}
|
|
226
228
|
else if (this.distro().familyId === 'fedora') {
|
|
227
|
-
installed = await
|
|
229
|
+
installed = await fedora_js_1.default.calamaresCheck();
|
|
228
230
|
}
|
|
229
231
|
else if (this.distro().familyId === 'archlinux') {
|
|
230
|
-
installed = await
|
|
232
|
+
installed = await archlinux_js_1.default.calamaresCheck();
|
|
231
233
|
}
|
|
232
234
|
else if (this.distro().familyId === 'suse') {
|
|
233
|
-
installed = await
|
|
235
|
+
installed = await suse_js_1.default.calamaresCheck();
|
|
234
236
|
}
|
|
235
237
|
return installed;
|
|
236
238
|
}
|
|
@@ -251,19 +253,19 @@ class Pacman {
|
|
|
251
253
|
static async calamaresInstall(verbose = false) {
|
|
252
254
|
if (this.isInstalledGui()) {
|
|
253
255
|
if (this.distro().familyId === 'debian') {
|
|
254
|
-
await
|
|
256
|
+
await debian_js_1.default.calamaresInstall(verbose);
|
|
255
257
|
}
|
|
256
258
|
else if (this.distro().familyId === 'fedora') {
|
|
257
|
-
await
|
|
259
|
+
await fedora_js_1.default.calamaresInstall(verbose);
|
|
258
260
|
}
|
|
259
261
|
else if (this.distro().familyId === 'archlinux') {
|
|
260
|
-
await
|
|
262
|
+
await archlinux_js_1.default.calamaresInstall(verbose);
|
|
261
263
|
}
|
|
262
264
|
else if (this.distro().familyId === 'suse') {
|
|
263
|
-
await
|
|
265
|
+
await suse_js_1.default.calamaresInstall(verbose);
|
|
264
266
|
}
|
|
265
267
|
// remove calamares link
|
|
266
|
-
await (0,
|
|
268
|
+
await (0, utils_js_2.exec)('rm -f /usr/share/applications/calamares.desktop');
|
|
267
269
|
}
|
|
268
270
|
}
|
|
269
271
|
/**
|
|
@@ -271,16 +273,16 @@ class Pacman {
|
|
|
271
273
|
*/
|
|
272
274
|
static async calamaresPolicies() {
|
|
273
275
|
if (this.distro().familyId === 'debian') {
|
|
274
|
-
await
|
|
276
|
+
await debian_js_1.default.calamaresPolicies();
|
|
275
277
|
}
|
|
276
278
|
else if (this.distro().familyId === 'fedora') {
|
|
277
|
-
await
|
|
279
|
+
await fedora_js_1.default.calamaresPolicies();
|
|
278
280
|
}
|
|
279
281
|
else if (this.distro().familyId === 'archlinux') {
|
|
280
|
-
await
|
|
282
|
+
await archlinux_js_1.default.calamaresPolicies();
|
|
281
283
|
}
|
|
282
284
|
else if (this.distro().familyId === 'suse') {
|
|
283
|
-
await
|
|
285
|
+
await suse_js_1.default.calamaresPolicies();
|
|
284
286
|
}
|
|
285
287
|
}
|
|
286
288
|
/**
|
|
@@ -289,16 +291,16 @@ class Pacman {
|
|
|
289
291
|
static async calamaresRemove(verbose = true) {
|
|
290
292
|
let retVal = false;
|
|
291
293
|
if (this.distro().familyId === 'debian') {
|
|
292
|
-
retVal = await
|
|
294
|
+
retVal = await debian_js_1.default.calamaresRemove(verbose);
|
|
293
295
|
}
|
|
294
296
|
else if (this.distro().familyId === 'fedora') {
|
|
295
|
-
retVal = await
|
|
297
|
+
retVal = await fedora_js_1.default.calamaresRemove(verbose);
|
|
296
298
|
}
|
|
297
299
|
else if (this.distro().familyId === 'archlinux') {
|
|
298
|
-
retVal = await
|
|
300
|
+
retVal = await archlinux_js_1.default.calamaresRemove(verbose);
|
|
299
301
|
}
|
|
300
302
|
else if (this.distro().familyId === 'suse') {
|
|
301
|
-
retVal = await
|
|
303
|
+
retVal = await suse_js_1.default.calamaresRemove(verbose);
|
|
302
304
|
}
|
|
303
305
|
return retVal;
|
|
304
306
|
}
|
|
@@ -314,9 +316,9 @@ class Pacman {
|
|
|
314
316
|
* Ritorna vero se machine-id è uguale
|
|
315
317
|
*/
|
|
316
318
|
static async configurationMachineNew(verbose = false) {
|
|
317
|
-
const settings = new
|
|
319
|
+
const settings = new settings_js_1.default();
|
|
318
320
|
await settings.load();
|
|
319
|
-
const result =
|
|
321
|
+
const result = utils_js_1.default.machineId() !== settings.config.machine_id;
|
|
320
322
|
if (verbose && result) {
|
|
321
323
|
console.log('configurationMachineNew: True');
|
|
322
324
|
}
|
|
@@ -327,7 +329,7 @@ class Pacman {
|
|
|
327
329
|
*/
|
|
328
330
|
static async configurationFresh() {
|
|
329
331
|
const config = {};
|
|
330
|
-
config.version =
|
|
332
|
+
config.version = utils_js_1.default.getPackageVersion();
|
|
331
333
|
config.snapshot_dir = '/home/eggs';
|
|
332
334
|
config.snapshot_prefix = '';
|
|
333
335
|
config.snapshot_excludes = '/usr/local/share/penguins-eggs/exclude.list';
|
|
@@ -353,15 +355,15 @@ class Pacman {
|
|
|
353
355
|
}
|
|
354
356
|
if (!Pacman.isUefi()) {
|
|
355
357
|
config.make_efi = false;
|
|
356
|
-
console.log('Due the lacks of grub-efi-' +
|
|
358
|
+
console.log('Due the lacks of grub-efi-' + utils_js_1.default.machineArch() + '-bin package set make_efi = false');
|
|
357
359
|
}
|
|
358
360
|
/**
|
|
359
361
|
* Salvo la configurazione di eggs.yaml
|
|
360
362
|
*/
|
|
361
|
-
config.machine_id =
|
|
362
|
-
config.vmlinuz =
|
|
363
|
-
config.initrd_img =
|
|
364
|
-
const settings = new
|
|
363
|
+
config.machine_id = utils_js_1.default.machineId();
|
|
364
|
+
config.vmlinuz = utils_js_1.default.vmlinuz();
|
|
365
|
+
config.initrd_img = utils_js_1.default.initrdImg();
|
|
366
|
+
const settings = new settings_js_1.default();
|
|
365
367
|
await settings.save(config);
|
|
366
368
|
}
|
|
367
369
|
/**
|
|
@@ -410,15 +412,15 @@ class Pacman {
|
|
|
410
412
|
* Rimozione dei file di configurazione
|
|
411
413
|
*/
|
|
412
414
|
static async configurationRemove(verbose = true) {
|
|
413
|
-
const echo =
|
|
415
|
+
const echo = utils_js_1.default.setEcho(verbose);
|
|
414
416
|
if (node_fs_1.default.existsSync('/etc/penguins-eggs.d')) {
|
|
415
|
-
await (0,
|
|
417
|
+
await (0, utils_js_2.exec)('rm /etc/penguins-eggs.d -rf', echo);
|
|
416
418
|
}
|
|
417
419
|
if (node_fs_1.default.existsSync('/usr/local/share/penguins-eggs/exclude.list')) {
|
|
418
|
-
await (0,
|
|
420
|
+
await (0, utils_js_2.exec)('rm /usr/local/share/penguins-eggs/exclude.list', echo);
|
|
419
421
|
}
|
|
420
422
|
if (node_fs_1.default.existsSync('/etc/calamares')) {
|
|
421
|
-
await (0,
|
|
423
|
+
await (0, utils_js_2.exec)('rm /etc/calamares -rf', echo);
|
|
422
424
|
}
|
|
423
425
|
}
|
|
424
426
|
/**
|
|
@@ -429,15 +431,15 @@ class Pacman {
|
|
|
429
431
|
if (this.distro().familyId === 'debian') {
|
|
430
432
|
if (Pacman.packageIsInstalled('bash-completion')) {
|
|
431
433
|
if (node_fs_1.default.existsSync('/usr/share/bash-completion/completions/')) {
|
|
432
|
-
await (0,
|
|
434
|
+
await (0, utils_js_2.exec)(`cp ${__dirname}/../../scripts/eggs.bash /usr/share/bash-completion/completions/`);
|
|
433
435
|
}
|
|
434
436
|
else if (node_fs_1.default.existsSync('/etc/bash_completion.d/')) {
|
|
435
|
-
await (0,
|
|
437
|
+
await (0, utils_js_2.exec)(`cp ${__dirname}/../../scripts/eggs.bash /etc/bash_completion.d/`);
|
|
436
438
|
}
|
|
437
439
|
}
|
|
438
440
|
}
|
|
439
441
|
else if (this.distro().familyId === 'archlinux' && Pacman.packageIsInstalled('bash-completion')) {
|
|
440
|
-
await (0,
|
|
442
|
+
await (0, utils_js_2.exec)(`cp ${__dirname}/../../scripts/eggs.bash /usr/share/bash-completion/completions/`);
|
|
441
443
|
}
|
|
442
444
|
}
|
|
443
445
|
/**
|
|
@@ -448,12 +450,12 @@ class Pacman {
|
|
|
448
450
|
if (node_fs_1.default.existsSync(manPageSrc)) {
|
|
449
451
|
const man1Dir = '/usr/share/man/man1/';
|
|
450
452
|
if (!node_fs_1.default.existsSync(man1Dir)) {
|
|
451
|
-
(0,
|
|
453
|
+
(0, utils_js_2.exec)(`mkdir ${man1Dir} -p`);
|
|
452
454
|
}
|
|
453
455
|
const manPageDest = man1Dir + 'eggs.1.gz';
|
|
454
|
-
(0,
|
|
456
|
+
(0, utils_js_2.exec)(`cp ${manPageSrc} ${manPageDest}`);
|
|
455
457
|
if (shelljs_1.default.exec('which mandb', { silent: true }).stdout.trim() !== '') {
|
|
456
|
-
await (0,
|
|
458
|
+
await (0, utils_js_2.exec)('mandb > /dev/null');
|
|
457
459
|
if (verbose) {
|
|
458
460
|
console.log('manPage eggs installed...');
|
|
459
461
|
}
|
|
@@ -474,9 +476,9 @@ class Pacman {
|
|
|
474
476
|
if (verbose) {
|
|
475
477
|
console.log('distroTemplateInstall');
|
|
476
478
|
}
|
|
477
|
-
const echo =
|
|
478
|
-
const rootPen =
|
|
479
|
-
await (0,
|
|
479
|
+
const echo = utils_js_1.default.setEcho(verbose);
|
|
480
|
+
const rootPen = utils_js_1.default.rootPenguin();
|
|
481
|
+
await (0, utils_js_2.exec)(`mkdir /etc/penguins-eggs.d/distros/${this.distro().codenameLikeId}`);
|
|
480
482
|
/**
|
|
481
483
|
* Debian 10 - Buster: è il master per tutte le distro
|
|
482
484
|
*/
|
|
@@ -486,35 +488,35 @@ class Pacman {
|
|
|
486
488
|
*/
|
|
487
489
|
if (this.distro().codenameLikeId === 'jessie') {
|
|
488
490
|
const dest = '/etc/penguins-eggs.d/distros/jessie';
|
|
489
|
-
await (0,
|
|
491
|
+
await (0, utils_js_2.exec)(`cp -r ${rootPen}/conf/distros/jessie/krill ${dest}/krill`, echo);
|
|
490
492
|
/**
|
|
491
493
|
* Debian 9 stretch: eredita grub, isolinux e locales da buster, contiene krill al posto di calamares
|
|
492
494
|
*/
|
|
493
495
|
}
|
|
494
496
|
else if (this.distro().codenameLikeId === 'stretch') {
|
|
495
497
|
const dest = '/etc/penguins-eggs.d/distros/stretch';
|
|
496
|
-
await (0,
|
|
498
|
+
await (0, utils_js_2.exec)(`cp -r ${rootPen}/conf/distros/jessie/krill ${dest}/krill`, echo);
|
|
497
499
|
/**
|
|
498
500
|
* Debian 10 buster: eredita tutto da buster
|
|
499
501
|
*/
|
|
500
502
|
}
|
|
501
503
|
else if (this.distro().codenameLikeId === 'buster') {
|
|
502
504
|
const dest = '/etc/penguins-eggs.d/distros/buster';
|
|
503
|
-
await (0,
|
|
505
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
504
506
|
/**
|
|
505
507
|
* Debian 11 bullseye: eredita tutto da buster
|
|
506
508
|
*/
|
|
507
509
|
}
|
|
508
510
|
else if (this.distro().codenameLikeId === 'bullseye') {
|
|
509
511
|
const dest = '/etc/penguins-eggs.d/distros/bullseye';
|
|
510
|
-
await (0,
|
|
512
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
511
513
|
/**
|
|
512
514
|
* Debian 12 bookworm: eredita tutto da buster
|
|
513
515
|
*/
|
|
514
516
|
}
|
|
515
517
|
else if (this.distro().codenameLikeId === 'bookworm') {
|
|
516
518
|
const dest = '/etc/penguins-eggs.d/distros/bookworm';
|
|
517
|
-
await (0,
|
|
519
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
518
520
|
/***********************************************************************************
|
|
519
521
|
* Devuan
|
|
520
522
|
**********************************************************************************/
|
|
@@ -524,21 +526,21 @@ class Pacman {
|
|
|
524
526
|
}
|
|
525
527
|
else if (this.distro().codenameLikeId === 'beowulf') {
|
|
526
528
|
const dest = '/etc/penguins-eggs.d/distros/beowulf';
|
|
527
|
-
await (0,
|
|
529
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
528
530
|
/**
|
|
529
531
|
* Devuan chimaera: eredita tutto da buster
|
|
530
532
|
*/
|
|
531
533
|
}
|
|
532
534
|
else if (this.distro().codenameLikeId === 'chimaera') {
|
|
533
535
|
const dest = '/etc/penguins-eggs.d/distros/chimaera';
|
|
534
|
-
await (0,
|
|
536
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
535
537
|
/**
|
|
536
538
|
* Devuan daedalus: eredita tutto da buster
|
|
537
539
|
*/
|
|
538
540
|
}
|
|
539
541
|
else if (this.distro().codenameLikeId === 'daedalus') {
|
|
540
542
|
const dest = '/etc/penguins-eggs.d/distros/daedalus';
|
|
541
|
-
await (0,
|
|
543
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
542
544
|
/***********************************************************************************
|
|
543
545
|
* Ubuntu
|
|
544
546
|
**********************************************************************************/
|
|
@@ -549,15 +551,15 @@ class Pacman {
|
|
|
549
551
|
else if (this.distro().codenameLikeId === 'bionic') {
|
|
550
552
|
const dest = '/etc/penguins-eggs.d/distros/bionic';
|
|
551
553
|
const bionic = `${rootPen}/conf/distros/bionic/*`;
|
|
552
|
-
await (0,
|
|
554
|
+
await (0, utils_js_2.exec)(`cp -r ${bionic} ${dest}`, echo);
|
|
553
555
|
// Poi da buster
|
|
554
|
-
await (0,
|
|
555
|
-
await (0,
|
|
556
|
-
await (0,
|
|
557
|
-
await (0,
|
|
558
|
-
await (0,
|
|
559
|
-
await (0,
|
|
560
|
-
await (0,
|
|
556
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
557
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
558
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
559
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/packages.yml ${dest}/calamares/modules/packages.yml`, echo);
|
|
560
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/removeuser.yml ${dest}/calamares/modules/removeuser.yml`, echo);
|
|
561
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
562
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
|
|
561
563
|
/**
|
|
562
564
|
* Ubuntu focal: eredita da focal e buster
|
|
563
565
|
*/
|
|
@@ -565,14 +567,14 @@ class Pacman {
|
|
|
565
567
|
else if (this.distro().codenameLikeId === 'focal') {
|
|
566
568
|
const dest = '/etc/penguins-eggs.d/distros/focal';
|
|
567
569
|
const focal = `${rootPen}/conf/distros/focal/*`;
|
|
568
|
-
await (0,
|
|
569
|
-
await (0,
|
|
570
|
-
await (0,
|
|
571
|
-
await (0,
|
|
572
|
-
await (0,
|
|
573
|
-
await (0,
|
|
574
|
-
await (0,
|
|
575
|
-
await (0,
|
|
570
|
+
await (0, utils_js_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
571
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
572
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
573
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
574
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/packages.yml ${dest}/calamares/modules/packages.yml`, echo);
|
|
575
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/removeuser.yml ${dest}/calamares/modules/removeuser.yml`, echo);
|
|
576
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
577
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
|
|
576
578
|
/**
|
|
577
579
|
* Ubuntu 21.10 impish: eredita da focal e buster
|
|
578
580
|
*/
|
|
@@ -580,14 +582,14 @@ class Pacman {
|
|
|
580
582
|
else if (this.distro().codenameLikeId === 'impish') {
|
|
581
583
|
const dest = '/etc/penguins-eggs.d/distros/impish';
|
|
582
584
|
const focal = `${rootPen}/conf/distros/focal/*`;
|
|
583
|
-
await (0,
|
|
584
|
-
await (0,
|
|
585
|
-
await (0,
|
|
586
|
-
await (0,
|
|
587
|
-
await (0,
|
|
588
|
-
await (0,
|
|
589
|
-
await (0,
|
|
590
|
-
await (0,
|
|
585
|
+
await (0, utils_js_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
586
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
587
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
588
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
589
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/packages.yml ${dest}/calamares/modules/packages.yml`, echo);
|
|
590
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/removeuser.yml ${dest}/calamares/modules/removeuser.yml`, echo);
|
|
591
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
592
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
|
|
591
593
|
/**
|
|
592
594
|
* Ubuntu 22.04 jammy: eredita da focal e buster
|
|
593
595
|
*/
|
|
@@ -595,14 +597,14 @@ class Pacman {
|
|
|
595
597
|
else if (this.distro().codenameLikeId === 'jammy') {
|
|
596
598
|
const dest = '/etc/penguins-eggs.d/distros/jammy';
|
|
597
599
|
const focal = `${rootPen}/conf/distros/focal/*`;
|
|
598
|
-
await (0,
|
|
599
|
-
await (0,
|
|
600
|
-
await (0,
|
|
601
|
-
await (0,
|
|
602
|
-
await (0,
|
|
603
|
-
await (0,
|
|
604
|
-
await (0,
|
|
605
|
-
await (0,
|
|
600
|
+
await (0, utils_js_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
601
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
602
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
603
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
604
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/packages.yml ${dest}/calamares/modules/packages.yml`, echo);
|
|
605
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/removeuser.yml ${dest}/calamares/modules/removeuser.yml`, echo);
|
|
606
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
607
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
|
|
606
608
|
/**
|
|
607
609
|
* Ubuntu 22.10 kinetic: eredita da focal e buster
|
|
608
610
|
*/
|
|
@@ -610,14 +612,14 @@ class Pacman {
|
|
|
610
612
|
else if (this.distro().codenameLikeId === 'kinetic') {
|
|
611
613
|
const dest = '/etc/penguins-eggs.d/distros/kinetic';
|
|
612
614
|
const focal = `${rootPen}/conf/distros/focal/*`;
|
|
613
|
-
await (0,
|
|
614
|
-
await (0,
|
|
615
|
-
await (0,
|
|
616
|
-
await (0,
|
|
617
|
-
await (0,
|
|
618
|
-
await (0,
|
|
619
|
-
await (0,
|
|
620
|
-
await (0,
|
|
615
|
+
await (0, utils_js_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
616
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
617
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
618
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
619
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/packages.yml ${dest}/calamares/modules/packages.yml`, echo);
|
|
620
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/removeuser.yml ${dest}/calamares/modules/removeuser.yml`, echo);
|
|
621
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
622
|
+
await (0, utils_js_2.exec)(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
|
|
621
623
|
/***********************************************************************************
|
|
622
624
|
* Fedora
|
|
623
625
|
**********************************************************************************/
|
|
@@ -628,7 +630,7 @@ class Pacman {
|
|
|
628
630
|
else if (this.distro().codenameLikeId === 'thirtyfive') {
|
|
629
631
|
const dest = '/etc/penguins-eggs.d/distros/thirtyfive/';
|
|
630
632
|
const thirtytive = `${rootPen}/conf/distros/thirtyfive/*`;
|
|
631
|
-
await (0,
|
|
633
|
+
await (0, utils_js_2.exec)(`cp -r ${thirtytive} ${dest}`, echo);
|
|
632
634
|
/***********************************************************************************
|
|
633
635
|
* Arch Linux
|
|
634
636
|
**********************************************************************************/
|
|
@@ -639,7 +641,7 @@ class Pacman {
|
|
|
639
641
|
else if (this.distro().codenameLikeId === 'rolling') {
|
|
640
642
|
const dest = '/etc/penguins-eggs.d/distros/rolling/';
|
|
641
643
|
const rolling = `${rootPen}/conf/distros/rolling/*`;
|
|
642
|
-
await (0,
|
|
644
|
+
await (0, utils_js_2.exec)(`cp -r ${rolling} ${dest}`, echo);
|
|
643
645
|
/***********************************************************************************
|
|
644
646
|
* openSuse
|
|
645
647
|
**********************************************************************************/
|
|
@@ -650,7 +652,7 @@ class Pacman {
|
|
|
650
652
|
else if (this.distro().codenameLikeId === 'tumbleweed') {
|
|
651
653
|
const dest = '/etc/penguins-eggs.d/distros/tumbleweed/';
|
|
652
654
|
const tumbleweed = `${rootPen}/conf/distros/tumbleweed/*`;
|
|
653
|
-
await (0,
|
|
655
|
+
await (0, utils_js_2.exec)(`cp -r ${tumbleweed} ${dest}`, echo);
|
|
654
656
|
}
|
|
655
657
|
}
|
|
656
658
|
/**
|
|
@@ -660,16 +662,16 @@ class Pacman {
|
|
|
660
662
|
static packageIsInstalled(packageName) {
|
|
661
663
|
let installed = false;
|
|
662
664
|
if (this.distro().familyId === 'debian') {
|
|
663
|
-
installed =
|
|
665
|
+
installed = debian_js_1.default.packageIsInstalled(packageName);
|
|
664
666
|
}
|
|
665
667
|
else if (this.distro().familyId === 'fedora') {
|
|
666
|
-
installed =
|
|
668
|
+
installed = fedora_js_1.default.packageIsInstalled(packageName);
|
|
667
669
|
}
|
|
668
670
|
else if (this.distro().familyId === 'archlinux') {
|
|
669
|
-
installed =
|
|
671
|
+
installed = archlinux_js_1.default.packageIsInstalled(packageName);
|
|
670
672
|
}
|
|
671
673
|
else if (this.distro().familyId === 'suse') {
|
|
672
|
-
installed =
|
|
674
|
+
installed = suse_js_1.default.packageIsInstalled(packageName);
|
|
673
675
|
}
|
|
674
676
|
return installed;
|
|
675
677
|
}
|
|
@@ -680,7 +682,7 @@ class Pacman {
|
|
|
680
682
|
static async packageAptAvailable(packageName) {
|
|
681
683
|
let available = false;
|
|
682
684
|
if (this.distro().familyId === 'debian') {
|
|
683
|
-
available =
|
|
685
|
+
available = debian_js_1.default.packageIsInstalled(packageName);
|
|
684
686
|
}
|
|
685
687
|
return available;
|
|
686
688
|
}
|
|
@@ -692,7 +694,7 @@ class Pacman {
|
|
|
692
694
|
static async packageAptLast(debPackage) {
|
|
693
695
|
let version = '';
|
|
694
696
|
if (this.distro().familyId === 'debian') {
|
|
695
|
-
version = await
|
|
697
|
+
version = await debian_js_1.default.packageAptLast(debPackage);
|
|
696
698
|
}
|
|
697
699
|
return version;
|
|
698
700
|
}
|
|
@@ -710,7 +712,7 @@ class Pacman {
|
|
|
710
712
|
installed = true;
|
|
711
713
|
}
|
|
712
714
|
else {
|
|
713
|
-
|
|
715
|
+
utils_js_1.default.warning(`${cmd} is not in your search path or is not installed!`);
|
|
714
716
|
}
|
|
715
717
|
return installed;
|
|
716
718
|
}
|
|
@@ -722,13 +724,13 @@ class Pacman {
|
|
|
722
724
|
static async packageInstall(packageName) {
|
|
723
725
|
let retVal = false;
|
|
724
726
|
if (this.distro().familyId === 'debian') {
|
|
725
|
-
retVal = await
|
|
727
|
+
retVal = await debian_js_1.default.packageInstall(packageName);
|
|
726
728
|
}
|
|
727
729
|
else if (this.distro().familyId === 'archlinux') {
|
|
728
|
-
retVal = await
|
|
730
|
+
retVal = await archlinux_js_1.default.packageInstall(packageName);
|
|
729
731
|
}
|
|
730
732
|
else if (this.distro().familyId === 'fedora') {
|
|
731
|
-
retVal = await
|
|
733
|
+
retVal = await fedora_js_1.default.packageInstall(packageName);
|
|
732
734
|
}
|
|
733
735
|
return retVal;
|
|
734
736
|
}
|
package/dist/classes/pve-live.js
CHANGED
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
* license: MIT
|
|
7
7
|
* pve-live
|
|
8
8
|
*/
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
9
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const tslib_1 = require("tslib");
|
|
11
13
|
/**
|
|
12
14
|
* This will create a symbolic link from the system’s copy of the service file (usually in /lib/systemd/system or /etc/systemd/system)
|
|
13
15
|
* into the location on disk where systemd looks for autostart files (usually /etc/systemd/system/some_target.target.wants.
|
|
@@ -16,13 +18,13 @@ const tslib_1 = require("tslib");
|
|
|
16
18
|
* sudo systemctl disable application.service
|
|
17
19
|
* This will remove the symbolic link that indicated that the service should be started automatically.
|
|
18
20
|
*/
|
|
19
|
-
const
|
|
20
|
-
const path_1 =
|
|
21
|
-
const shelljs_1 =
|
|
21
|
+
const systemctl_js_1 = __importDefault(require("./systemctl.js"));
|
|
22
|
+
const path_1 = __importDefault(require("path"));
|
|
23
|
+
const shelljs_1 = __importDefault(require("shelljs"));
|
|
22
24
|
class PveLive {
|
|
23
25
|
constructor() {
|
|
24
26
|
this.systemctl = {};
|
|
25
|
-
this.systemctl = new
|
|
27
|
+
this.systemctl = new systemctl_js_1.default();
|
|
26
28
|
}
|
|
27
29
|
/**
|
|
28
30
|
* enable PveLIve
|