penguins-eggs 9.0.25 → 9.0.48
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/README.md +448 -22
- package/addons/telos/theme/applications/install-debian.desktop +28 -0
- package/addons/telos/theme/artwork/install-debian.png +0 -0
- package/addons/telos/theme/calamares/branding/banner.png +0 -0
- package/addons/telos/theme/calamares/branding/branding.desc +25 -0
- package/addons/telos/theme/calamares/branding/show.qml +51 -0
- package/addons/telos/theme/calamares/branding/slide1.png +0 -0
- package/addons/telos/theme/calamares/branding/telos-logo.png +0 -0
- package/addons/telos/theme/calamares/branding/welcome.png +0 -0
- package/addons/telos/theme/calamares/modules/partition.yml +233 -0
- package/addons/telos/theme/livecd/grub.theme.cfg +43 -0
- package/addons/telos/theme/livecd/isolinux.theme.cfg +45 -0
- package/addons/telos/theme/livecd/splash.png +0 -0
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +57 -38
- package/conf/distros/buster/calamares/modules/bootloader.yml +3 -1
- package/conf/eggs.yaml +9 -2
- package/lib/classes/basket.js +4 -4
- package/lib/classes/bleach.js +2 -2
- package/lib/classes/compressors.js +1 -1
- package/lib/classes/daddy.js +13 -13
- package/lib/classes/distro.d.ts +4 -2
- package/lib/classes/distro.js +77 -79
- package/lib/classes/family/archlinux.js +4 -4
- package/lib/classes/family/debian.js +6 -6
- package/lib/classes/family/fedora.js +4 -4
- package/lib/classes/family/suse.js +4 -4
- package/lib/classes/i18n.d.ts +28 -4
- package/lib/classes/i18n.js +112 -84
- package/lib/classes/incubation/branding.js +13 -7
- package/lib/classes/incubation/distros/bionic.js +1 -1
- package/lib/classes/incubation/distros/buster.js +1 -1
- package/lib/classes/incubation/distros/focal.js +1 -1
- package/lib/classes/incubation/distros/jessie.js +1 -1
- package/lib/classes/incubation/distros/rolling.js +1 -1
- package/lib/classes/incubation/fisherman-helper/displaymanager.js +1 -1
- package/lib/classes/incubation/fisherman-helper/packages.js +2 -2
- package/lib/classes/incubation/fisherman.js +5 -5
- package/lib/classes/incubation/incubator.js +5 -5
- package/lib/classes/incubation/installer.d.ts +1 -1
- package/lib/classes/incubation/installer.js +4 -4
- package/lib/classes/initrd.js +2 -2
- package/lib/classes/keyboards.d.ts +45 -0
- package/lib/classes/keyboards.js +196 -0
- package/lib/classes/krill_install.d.ts +12 -1
- package/lib/classes/krill_install.js +300 -312
- package/lib/classes/krill_prepare.d.ts +4 -0
- package/lib/classes/krill_prepare.js +81 -83
- package/lib/classes/locales.d.ts +14 -0
- package/lib/classes/locales.js +54 -0
- package/lib/classes/n8.js +1 -1
- package/lib/classes/ovary.d.ts +27 -27
- package/lib/classes/ovary.js +356 -387
- package/lib/classes/pacman.d.ts +1 -1
- package/lib/classes/pacman.js +40 -40
- package/lib/classes/pve-live.js +12 -16
- package/lib/classes/settings.d.ts +6 -0
- package/lib/classes/settings.js +11 -13
- package/lib/classes/systemctl.d.ts +36 -7
- package/lib/classes/systemctl.js +63 -28
- package/lib/classes/tailor.d.ts +20 -0
- package/lib/classes/tailor.js +460 -0
- package/lib/classes/tools.js +4 -4
- package/lib/classes/users.js +1 -1
- package/lib/classes/utils.d.ts +14 -3
- package/lib/classes/utils.js +75 -28
- package/lib/classes/xdg.js +23 -39
- package/lib/classes/yolk.d.ts +12 -10
- package/lib/classes/yolk.js +54 -56
- package/lib/commands/adapt.js +1 -1
- package/lib/commands/analyze.js +2 -2
- package/lib/commands/bro.js +2 -2
- package/lib/commands/calamares.js +4 -4
- package/lib/commands/config.js +4 -4
- package/lib/commands/dad.js +2 -2
- package/lib/commands/export/deb.js +2 -2
- package/lib/commands/export/docs.js +2 -2
- package/lib/commands/export/iso.js +2 -2
- package/lib/commands/info.js +1 -1
- package/lib/commands/install.js +5 -5
- package/lib/commands/kill.js +2 -2
- package/lib/commands/mom.js +2 -2
- package/lib/commands/produce.js +11 -11
- package/lib/commands/remove.js +2 -2
- package/lib/commands/syncfrom.d.ts +9 -3
- package/lib/commands/syncfrom.js +39 -32
- package/lib/commands/syncto.d.ts +26 -6
- package/lib/commands/syncto.js +73 -50
- package/lib/commands/tools/clean.js +2 -2
- package/lib/commands/tools/locales.js +9 -4
- package/lib/commands/tools/skel.js +2 -2
- package/lib/commands/tools/stat.js +3 -3
- package/lib/commands/tools/yolk.js +4 -4
- package/lib/commands/update.js +5 -5
- package/lib/commands/wardrobe/ironing.d.ts +14 -0
- package/lib/commands/wardrobe/ironing.js +123 -0
- package/lib/commands/wardrobe/list.d.ts +13 -0
- package/lib/commands/wardrobe/list.js +46 -0
- package/lib/commands/wardrobe/show.d.ts +15 -0
- package/lib/commands/wardrobe/show.js +55 -0
- package/lib/commands/wardrobe/wear.d.ts +11 -0
- package/lib/commands/wardrobe/wear.js +42 -0
- package/lib/components/elements/information.js +37 -18
- package/lib/components/elements/steps.js +1 -1
- package/lib/components/elements/title.js +2 -2
- package/lib/components/finished.js +5 -5
- package/lib/components/install.js +5 -5
- package/lib/components/keyboard.js +5 -8
- package/lib/components/location.js +5 -5
- package/lib/components/network.js +5 -5
- package/lib/components/partitions.js +5 -5
- package/lib/components/summary.js +5 -5
- package/lib/components/users.js +5 -5
- package/lib/components/welcome.js +6 -6
- package/lib/interfaces/i-costume.d.ts +43 -0
- package/lib/interfaces/i-costume.js +2 -0
- package/lib/interfaces/i-distro.d.ts +4 -2
- package/lib/interfaces/i-installer.d.ts +1 -1
- package/lib/interfaces/i-krill.d.ts +1 -0
- package/lib/interfaces/i-packages.d.ts +13 -0
- package/lib/interfaces/i-packages.js +2 -0
- package/lib/interfaces/i-xkb-model.d.ts +17 -0
- package/lib/interfaces/i-xkb-model.js +2 -0
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/lib/cli-autologin.js +3 -3
- package/lib/lib/select_address_type.js +1 -1
- package/lib/lib/select_filesystem_type.js +2 -2
- package/lib/lib/select_installation_device.js +2 -1
- package/lib/lib/select_interface.js +1 -1
- package/lib/lib/select_keyboard_layout.d.ts +1 -28
- package/lib/lib/select_keyboard_layout.js +18 -33
- package/lib/lib/select_keyboard_model.d.ts +4 -0
- package/lib/lib/select_keyboard_model.js +36 -0
- package/lib/lib/select_keyboard_option.d.ts +4 -0
- package/lib/lib/select_keyboard_option.js +36 -0
- package/lib/lib/select_keyboard_variant.d.ts +1 -5
- package/lib/lib/select_keyboard_variant.js +32 -5
- package/lib/lib/select_languages.d.ts +1 -1
- package/lib/lib/select_languages.js +8 -7
- package/lib/lib/select_regions.d.ts +1 -1
- package/lib/lib/select_regions.js +2 -2
- package/lib/lib/select_user_swap_choice.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +6 -5
- package/scripts/_eggs +43 -2
- package/scripts/bros/waydroid-helper.sh +1 -1
- package/scripts/eggs.bash +6 -2
- package/scripts/{not-used/install-eggs-ppa.sh → install-eggs-ppa.sh} +1 -0
- package/scripts/mom-cli.sh +1 -1
- package/scripts/pve-live.sh +2 -6
- package/scripts/resy.sh +8 -0
- package/scripts/userexist.sh +6 -0
- package/wardrobe.d/external.yml +7 -0
- package/wardrobe.d/hen/control.template +10 -0
- package/wardrobe.d/hen/index.yml +212 -0
- package/wardrobe.d/kde/index.yml +41 -0
- package/wardrobe.d/lamp/index.yml +35 -0
- package/wardrobe.d/xfce4/index.yml +53 -0
- package/conf/distros/buster/locales/locale.gen.template +0 -10
- package/conf/distros/buster/locales/locale.template +0 -11
- package/conf/distros/focal/locale.gen.template +0 -8
- package/scripts/not-used/eggs-cleanup.sh +0 -7
- package/scripts/not-used/mkinitramfs +0 -469
- package/scripts/update-initramfs +0 -94
package/lib/classes/pacman.d.ts
CHANGED
package/lib/classes/pacman.js
CHANGED
|
@@ -7,22 +7,22 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const tslib_1 = require("tslib");
|
|
10
|
-
const node_fs_1 =
|
|
11
|
-
const node_path_1 =
|
|
12
|
-
const shelljs_1 =
|
|
13
|
-
const utils_1 =
|
|
14
|
-
const distro_1 =
|
|
15
|
-
const settings_1 =
|
|
10
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
11
|
+
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
12
|
+
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
13
|
+
const utils_1 = tslib_1.__importDefault(require("./utils"));
|
|
14
|
+
const distro_1 = tslib_1.__importDefault(require("./distro"));
|
|
15
|
+
const settings_1 = tslib_1.__importDefault(require("./settings"));
|
|
16
16
|
const node_child_process_1 = require("node:child_process");
|
|
17
17
|
const utils_2 = require("../lib/utils");
|
|
18
|
-
const debian_1 =
|
|
19
|
-
const fedora_1 =
|
|
20
|
-
const archlinux_1 =
|
|
21
|
-
const suse_1 =
|
|
18
|
+
const debian_1 = tslib_1.__importDefault(require("./family/debian"));
|
|
19
|
+
const fedora_1 = tslib_1.__importDefault(require("./family/fedora"));
|
|
20
|
+
const archlinux_1 = tslib_1.__importDefault(require("./family/archlinux"));
|
|
21
|
+
const suse_1 = tslib_1.__importDefault(require("./family/suse"));
|
|
22
22
|
const config_file = '/etc/penguins-eggs.d/eggs.yaml';
|
|
23
23
|
const config_tools = '/etc/penguins-eggs.d/tools.yaml';
|
|
24
24
|
/**
|
|
25
|
-
* Utils: general
|
|
25
|
+
* Utils: general porpouse utils
|
|
26
26
|
* @remarks all the utilities
|
|
27
27
|
*/
|
|
28
28
|
class Pacman {
|
|
@@ -341,10 +341,10 @@ class Pacman {
|
|
|
341
341
|
config.compression = 'xz';
|
|
342
342
|
config.ssh_pass = true;
|
|
343
343
|
config.timezone = 'Europe/Rome';
|
|
344
|
-
config.pmount_fixed = false;
|
|
345
344
|
const env = process.env;
|
|
346
345
|
config.locales_default = env.LANG !== undefined ? env.LANG : 'en_US.UTF-8';
|
|
347
346
|
config.locales = config.locales_default === 'en_US.UTF-8' ? ['en_US.UTF-8'] : [config.locales_default, 'en_US.UTF-8'];
|
|
347
|
+
config.pmount_fixed = false;
|
|
348
348
|
if (!this.packageIsInstalled('calamares')) {
|
|
349
349
|
config.force_installer = false;
|
|
350
350
|
console.log('Due the lacks of calamares package set force_installer = false');
|
|
@@ -447,8 +447,8 @@ class Pacman {
|
|
|
447
447
|
* distroTemplateCheck
|
|
448
448
|
*/
|
|
449
449
|
static distroTemplateCheck() {
|
|
450
|
-
const
|
|
451
|
-
return node_fs_1.default.existsSync(`/etc/penguins-eggs.d/distros/${
|
|
450
|
+
const codenameLikeId = this.distro().codenameLikeId;
|
|
451
|
+
return node_fs_1.default.existsSync(`/etc/penguins-eggs.d/distros/${codenameLikeId}`);
|
|
452
452
|
}
|
|
453
453
|
/**
|
|
454
454
|
*
|
|
@@ -459,7 +459,7 @@ class Pacman {
|
|
|
459
459
|
}
|
|
460
460
|
const echo = utils_1.default.setEcho(verbose);
|
|
461
461
|
const rootPen = utils_1.default.rootPenguin();
|
|
462
|
-
await (0, utils_2.exec)(`mkdir /etc/penguins-eggs.d/distros/${this.distro().
|
|
462
|
+
await (0, utils_2.exec)(`mkdir /etc/penguins-eggs.d/distros/${this.distro().codenameLikeId}`);
|
|
463
463
|
/**
|
|
464
464
|
* Debian 10 - Buster: è il master per tutte le distro
|
|
465
465
|
*/
|
|
@@ -467,41 +467,41 @@ class Pacman {
|
|
|
467
467
|
/**
|
|
468
468
|
* Debian 8 jessie: eredita grub, isolinux e locales da buster, contiene krill al posto di calamares
|
|
469
469
|
*/
|
|
470
|
-
if (this.distro().
|
|
470
|
+
if (this.distro().codenameLikeId === 'jessie') {
|
|
471
471
|
const dest = '/etc/penguins-eggs.d/distros/jessie';
|
|
472
|
-
await
|
|
472
|
+
// await exec(`cp -r ${buster}/locales ${dest}/locales`, echo)
|
|
473
473
|
await (0, utils_2.exec)(`cp -r ${rootPen}/conf/distros/jessie/krill ${dest}/krill`, echo);
|
|
474
474
|
/**
|
|
475
475
|
* Debian 9 stretch: eredita grub, isolinux e locales da buster, contiene krill al posto di calamares
|
|
476
476
|
*/
|
|
477
477
|
}
|
|
478
|
-
else if (this.distro().
|
|
478
|
+
else if (this.distro().codenameLikeId === 'stretch') {
|
|
479
479
|
const dest = '/etc/penguins-eggs.d/distros/stretch';
|
|
480
|
-
await
|
|
480
|
+
// await exec(`cp -r ${buster}/locales ${dest}/locales`, echo)
|
|
481
481
|
await (0, utils_2.exec)(`cp -r ${rootPen}/conf/distros/jessie/krill ${dest}/krill`, echo);
|
|
482
482
|
/**
|
|
483
483
|
* Debian 10 buster: eredita tutto da buster
|
|
484
484
|
*/
|
|
485
485
|
}
|
|
486
|
-
else if (this.distro().
|
|
486
|
+
else if (this.distro().codenameLikeId === 'buster') {
|
|
487
487
|
const dest = '/etc/penguins-eggs.d/distros/buster';
|
|
488
|
-
await
|
|
488
|
+
// await exec(`cp -r ${buster}/locales ${dest}/locales`, echo)
|
|
489
489
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
490
490
|
/**
|
|
491
491
|
* Debian 11 bullseye: eredita tutto da buster
|
|
492
492
|
*/
|
|
493
493
|
}
|
|
494
|
-
else if (this.distro().
|
|
494
|
+
else if (this.distro().codenameLikeId === 'bullseye') {
|
|
495
495
|
const dest = '/etc/penguins-eggs.d/distros/bullseye';
|
|
496
|
-
await
|
|
496
|
+
// await exec(`cp -r ${buster}/locales ${dest}/locales`, echo)
|
|
497
497
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
498
498
|
/**
|
|
499
499
|
* Debian 12 bookworm: eredita tutto da buster
|
|
500
500
|
*/
|
|
501
501
|
}
|
|
502
|
-
else if (this.distro().
|
|
502
|
+
else if (this.distro().codenameLikeId === 'bookworm') {
|
|
503
503
|
const dest = '/etc/penguins-eggs.d/distros/bookworm';
|
|
504
|
-
await
|
|
504
|
+
// await exec(`cp -r ${buster}/locales ${dest}/locales`, echo)
|
|
505
505
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
506
506
|
/***********************************************************************************
|
|
507
507
|
* Devuan
|
|
@@ -510,25 +510,25 @@ class Pacman {
|
|
|
510
510
|
* Devuan beowulf: eredita tutto da buster
|
|
511
511
|
*/
|
|
512
512
|
}
|
|
513
|
-
else if (this.distro().
|
|
513
|
+
else if (this.distro().codenameLikeId === 'beowulf') {
|
|
514
514
|
const dest = '/etc/penguins-eggs.d/distros/beowulf';
|
|
515
|
-
await
|
|
515
|
+
// await exec(`cp -r ${buster}/locales ${dest}/locales`, echo)
|
|
516
516
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
517
517
|
/**
|
|
518
518
|
* Devuan chimaera: eredita tutto da buster
|
|
519
519
|
*/
|
|
520
520
|
}
|
|
521
|
-
else if (this.distro().
|
|
521
|
+
else if (this.distro().codenameLikeId === 'chimaera') {
|
|
522
522
|
const dest = '/etc/penguins-eggs.d/distros/chimaera';
|
|
523
|
-
await
|
|
523
|
+
// await exec(`cp -r ${buster}/locales ${dest}/locales`, echo)
|
|
524
524
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
525
525
|
/**
|
|
526
526
|
* Devuan daedalus: eredita tutto da buster
|
|
527
527
|
*/
|
|
528
528
|
}
|
|
529
|
-
else if (this.distro().
|
|
529
|
+
else if (this.distro().codenameLikeId === 'daedalus') {
|
|
530
530
|
const dest = '/etc/penguins-eggs.d/distros/daedalus';
|
|
531
|
-
await
|
|
531
|
+
// await exec(`cp -r ${buster}/locales ${dest}/locales`, echo)
|
|
532
532
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
533
533
|
/***********************************************************************************
|
|
534
534
|
* Ubuntu
|
|
@@ -537,7 +537,7 @@ class Pacman {
|
|
|
537
537
|
* Ubuntu 10.04 bionic: eredita da bionic, focal grub ed isolinux, da buster i seguenti
|
|
538
538
|
*/
|
|
539
539
|
}
|
|
540
|
-
else if (this.distro().
|
|
540
|
+
else if (this.distro().codenameLikeId === 'bionic') {
|
|
541
541
|
const dest = '/etc/penguins-eggs.d/distros/bionic';
|
|
542
542
|
const bionic = `${rootPen}/conf/distros/bionic/*`;
|
|
543
543
|
await (0, utils_2.exec)(`cp -r ${bionic} ${dest}`, echo);
|
|
@@ -556,7 +556,7 @@ class Pacman {
|
|
|
556
556
|
* Ubuntu focal: eredita da focal e buster
|
|
557
557
|
*/
|
|
558
558
|
}
|
|
559
|
-
else if (this.distro().
|
|
559
|
+
else if (this.distro().codenameLikeId === 'focal') {
|
|
560
560
|
const dest = '/etc/penguins-eggs.d/distros/focal';
|
|
561
561
|
const focal = `${rootPen}/conf/distros/focal/*`;
|
|
562
562
|
await (0, utils_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
@@ -571,7 +571,7 @@ class Pacman {
|
|
|
571
571
|
* Ubuntu 20.10 groovy: eredita da focal e buster
|
|
572
572
|
*/
|
|
573
573
|
}
|
|
574
|
-
else if (this.distro().
|
|
574
|
+
else if (this.distro().codenameLikeId === 'groovy') {
|
|
575
575
|
const dest = '/etc/penguins-eggs.d/distros/groovy';
|
|
576
576
|
const focal = `${rootPen}/conf/distros/focal/*`;
|
|
577
577
|
await (0, utils_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
@@ -586,7 +586,7 @@ class Pacman {
|
|
|
586
586
|
* Ubuntu 21.04 hirsute: eredita da focal e buster
|
|
587
587
|
*/
|
|
588
588
|
}
|
|
589
|
-
else if (this.distro().
|
|
589
|
+
else if (this.distro().codenameLikeId === 'hirsute') {
|
|
590
590
|
const dest = '/etc/penguins-eggs.d/distros/hirsute';
|
|
591
591
|
const focal = `${rootPen}/conf/distros/focal/*`;
|
|
592
592
|
await (0, utils_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
@@ -601,7 +601,7 @@ class Pacman {
|
|
|
601
601
|
* Ubuntu 21.10 impish: eredita da focal e buster
|
|
602
602
|
*/
|
|
603
603
|
}
|
|
604
|
-
else if (this.distro().
|
|
604
|
+
else if (this.distro().codenameLikeId === 'impish') {
|
|
605
605
|
const dest = '/etc/penguins-eggs.d/distros/impish';
|
|
606
606
|
const focal = `${rootPen}/conf/distros/focal/*`;
|
|
607
607
|
await (0, utils_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
@@ -616,7 +616,7 @@ class Pacman {
|
|
|
616
616
|
* Ubuntu 22.04 jammy: eredita da focal e buster
|
|
617
617
|
*/
|
|
618
618
|
}
|
|
619
|
-
else if (this.distro().
|
|
619
|
+
else if (this.distro().codenameLikeId === 'jammy') {
|
|
620
620
|
const dest = '/etc/penguins-eggs.d/distros/jammy';
|
|
621
621
|
const focal = `${rootPen}/conf/distros/focal/*`;
|
|
622
622
|
await (0, utils_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
@@ -634,7 +634,7 @@ class Pacman {
|
|
|
634
634
|
* Fedora 35 ThirtyFive: eredita da ThirtyFive
|
|
635
635
|
*/
|
|
636
636
|
}
|
|
637
|
-
else if (this.distro().
|
|
637
|
+
else if (this.distro().codenameLikeId === 'thirtyfive') {
|
|
638
638
|
const dest = '/etc/penguins-eggs.d/distros/thirtyfive/';
|
|
639
639
|
const thirtytive = `${rootPen}/conf/distros/thirtyfive/*`;
|
|
640
640
|
await (0, utils_2.exec)(`cp -r ${thirtytive} ${dest}`, echo);
|
|
@@ -645,7 +645,7 @@ class Pacman {
|
|
|
645
645
|
* Endeavour rolling: eredita da rolling
|
|
646
646
|
*/
|
|
647
647
|
}
|
|
648
|
-
else if (this.distro().
|
|
648
|
+
else if (this.distro().codenameLikeId === 'rolling') {
|
|
649
649
|
const dest = '/etc/penguins-eggs.d/distros/rolling/';
|
|
650
650
|
const rolling = `${rootPen}/conf/distros/rolling/*`;
|
|
651
651
|
await (0, utils_2.exec)(`cp -r ${rolling} ${dest}`, echo);
|
|
@@ -656,7 +656,7 @@ class Pacman {
|
|
|
656
656
|
* openSUSE tumbleweed: eredita da tumbleweed
|
|
657
657
|
*/
|
|
658
658
|
}
|
|
659
|
-
else if (this.distro().
|
|
659
|
+
else if (this.distro().codenameLikeId === 'tumbleweed') {
|
|
660
660
|
const dest = '/etc/penguins-eggs.d/distros/tumbleweed/';
|
|
661
661
|
const tumbleweed = `${rootPen}/conf/distros/tumbleweed/*`;
|
|
662
662
|
await (0, utils_2.exec)(`cp -r ${tumbleweed} ${dest}`, echo);
|
package/lib/classes/pve-live.js
CHANGED
|
@@ -16,9 +16,9 @@ const tslib_1 = require("tslib");
|
|
|
16
16
|
* sudo systemctl disable application.service
|
|
17
17
|
* This will remove the symbolic link that indicated that the service should be started automatically.
|
|
18
18
|
*/
|
|
19
|
-
const systemctl_1 =
|
|
20
|
-
const
|
|
21
|
-
const shelljs_1 =
|
|
19
|
+
const systemctl_1 = tslib_1.__importDefault(require("./systemctl"));
|
|
20
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
21
|
+
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
22
22
|
class PveLive {
|
|
23
23
|
constructor() {
|
|
24
24
|
this.systemctl = {};
|
|
@@ -44,32 +44,28 @@ class PveLive {
|
|
|
44
44
|
*
|
|
45
45
|
*/
|
|
46
46
|
createScript(root = '/') {
|
|
47
|
-
shelljs_1.default.cp(
|
|
47
|
+
shelljs_1.default.cp(path_1.default.resolve(__dirname, '../../scripts/pve-live.sh'), root + '/usr/bin/');
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
50
|
*
|
|
51
51
|
*/
|
|
52
52
|
createService(root = '/') {
|
|
53
|
-
shelljs_1.default.cp(
|
|
53
|
+
shelljs_1.default.cp(path_1.default.resolve(__dirname, '../../scripts/pve-live.service'), root + '/lib/systemd/system/');
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
*
|
|
57
57
|
*/
|
|
58
58
|
start() {
|
|
59
|
-
this.systemctl.start('
|
|
60
|
-
this.systemctl.start('
|
|
61
|
-
this.systemctl.start('pve-
|
|
59
|
+
this.systemctl.start('pve-live');
|
|
60
|
+
// this.systemctl.start('lxcfs')
|
|
61
|
+
// this.systemctl.start('pve-cluster')
|
|
62
|
+
// this.systemctl.start('pve-firewall')
|
|
62
63
|
// this.systemctl.start('pve-guests')
|
|
63
|
-
this.systemctl.start('pve-ha-crm')
|
|
64
|
-
this.systemctl.start('pve-ha-lrm')
|
|
64
|
+
// this.systemctl.start('pve-ha-crm')
|
|
65
|
+
// this.systemctl.start('pve-ha-lrm')
|
|
65
66
|
}
|
|
66
67
|
stop() {
|
|
67
|
-
this.systemctl.
|
|
68
|
-
this.systemctl.stop('pve-cluster');
|
|
69
|
-
this.systemctl.stop('pve-firewall');
|
|
70
|
-
// this.systemctl.stop('pve-guests')
|
|
71
|
-
this.systemctl.stop('pve-ha-crm');
|
|
72
|
-
this.systemctl.stop('pve-ha-lrm');
|
|
68
|
+
this.systemctl.start('pve-live');
|
|
73
69
|
}
|
|
74
70
|
}
|
|
75
71
|
exports.default = PveLive;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* penguins-eggs: ovary.ts VERSIONE DEBIAN-LIVE
|
|
3
|
+
* author: Piero Proietti
|
|
4
|
+
* mail: piero.proietti@gmail.com
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
1
7
|
import { IRemix, IDistro, IApp, IWorkDir } from '../interfaces';
|
|
2
8
|
import Incubator from './incubation/incubator';
|
|
3
9
|
import { IConfig } from '../interfaces';
|
package/lib/classes/settings.js
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/* eslint-disable valid-jsdoc */
|
|
3
|
-
/* eslint-disable no-console */
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
2
|
/**
|
|
7
3
|
* penguins-eggs: ovary.ts VERSIONE DEBIAN-LIVE
|
|
8
4
|
* author: Piero Proietti
|
|
9
5
|
* mail: piero.proietti@gmail.com
|
|
10
6
|
*
|
|
11
7
|
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
12
10
|
// packages
|
|
13
|
-
const node_fs_1 =
|
|
14
|
-
const node_os_1 =
|
|
15
|
-
const js_yaml_1 =
|
|
16
|
-
const shelljs_1 =
|
|
17
|
-
const pjson_1 =
|
|
18
|
-
const chalk_1 =
|
|
11
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
12
|
+
const node_os_1 = tslib_1.__importDefault(require("node:os"));
|
|
13
|
+
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
14
|
+
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
15
|
+
const pjson_1 = tslib_1.__importDefault(require("pjson"));
|
|
16
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
19
17
|
// libraries
|
|
20
18
|
// classes
|
|
21
|
-
const utils_1 =
|
|
22
|
-
const distro_1 =
|
|
23
|
-
const pacman_1 =
|
|
19
|
+
const utils_1 = tslib_1.__importDefault(require("./utils"));
|
|
20
|
+
const distro_1 = tslib_1.__importDefault(require("./distro"));
|
|
21
|
+
const pacman_1 = tslib_1.__importDefault(require("./pacman"));
|
|
24
22
|
const config_file = '/etc/penguins-eggs.d/eggs.yaml';
|
|
25
23
|
/**
|
|
26
24
|
* Setting
|
|
@@ -7,11 +7,40 @@
|
|
|
7
7
|
* Presa da https://github.com/VolantisDev/node-systemctl
|
|
8
8
|
*/
|
|
9
9
|
export default class SistemdCtl {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
echo: {};
|
|
11
|
+
constructor(verbose?: boolean);
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
reload(service: string): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
disable(service: string, chroot?: string, report?: boolean): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
enable(service: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
restart(service: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
start(service: string): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
stop(service: string): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param service
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
isActive(service: string): Promise<unknown>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
isEnabled(service: string): Promise<unknown>;
|
|
17
46
|
}
|
package/lib/classes/systemctl.js
CHANGED
|
@@ -8,47 +8,82 @@
|
|
|
8
8
|
* Presa da https://github.com/VolantisDev/node-systemctl
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
const tslib_1 = require("tslib");
|
|
11
12
|
const utils_1 = require("../lib/utils");
|
|
13
|
+
const utils_2 = tslib_1.__importDefault(require("./utils"));
|
|
12
14
|
class SistemdCtl {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
constructor(verbose = false) {
|
|
16
|
+
this.echo = {};
|
|
17
|
+
this.echo = utils_2.default.setEcho(verbose);
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
async reload(service) {
|
|
23
|
+
await (0, utils_1.exec)(`systemctl reload ${service}`, this.echo);
|
|
18
24
|
}
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
async disable(service, chroot = '/', report = false) {
|
|
29
|
+
await (0, utils_1.exec)(`chroot ${chroot}} systemctl disable ${service}`, this.echo);
|
|
30
|
+
if (report) {
|
|
31
|
+
console.log(`systemctl: disabled ${service} on ${chroot}`);
|
|
32
|
+
}
|
|
21
33
|
}
|
|
22
|
-
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
async enable(service) {
|
|
38
|
+
await (0, utils_1.exec)(`systemctl enable ${service}`, this.echo);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
async restart(service) {
|
|
44
|
+
await (0, utils_1.exec)(`systemctl restart ${service}`, this.echo);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
async start(service) {
|
|
50
|
+
await (0, utils_1.exec)(`systemctl start ${service}`, this.echo);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
async stop(service) {
|
|
56
|
+
await (0, utils_1.exec)(`systemctl stop ${service}`, this.echo);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @param service
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
async isActive(service) {
|
|
23
64
|
return new Promise((resolve, reject) => {
|
|
24
|
-
|
|
65
|
+
(0, utils_1.exec)(`systemctl is-active ${service}`, this.echo)
|
|
25
66
|
.then((result) => {
|
|
26
|
-
resolve(result.data.includes('
|
|
67
|
+
resolve(!result.data.includes('inactive'));
|
|
27
68
|
})
|
|
28
69
|
.catch(function (error) {
|
|
29
70
|
resolve(false);
|
|
30
71
|
});
|
|
31
72
|
});
|
|
32
73
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
*/
|
|
77
|
+
async isEnabled(service) {
|
|
78
|
+
return new Promise((resolve, reject) => {
|
|
79
|
+
(0, utils_1.exec)(`systemctl is-enabled ${service}`, this.echo)
|
|
80
|
+
.then((result) => {
|
|
81
|
+
resolve(result.data.includes('enabled'));
|
|
82
|
+
})
|
|
83
|
+
.catch(function (error) {
|
|
84
|
+
resolve(false);
|
|
85
|
+
});
|
|
86
|
+
});
|
|
41
87
|
}
|
|
42
88
|
}
|
|
43
89
|
exports.default = SistemdCtl;
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
*/
|
|
47
|
-
async function run(cmd, serviceName = '') {
|
|
48
|
-
let command = 'systemctl ' + cmd;
|
|
49
|
-
if (serviceName !== '') {
|
|
50
|
-
command = command + ' ' + serviceName;
|
|
51
|
-
}
|
|
52
|
-
console.log(command);
|
|
53
|
-
return (0, utils_1.exec)(command);
|
|
54
|
-
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ICostume } from '../interfaces';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export default class Tailor {
|
|
6
|
+
private verbose;
|
|
7
|
+
private echo;
|
|
8
|
+
private costume;
|
|
9
|
+
private wardrobe;
|
|
10
|
+
materials: ICostume;
|
|
11
|
+
constructor(wardrobe: string, costume: string, verbose?: boolean);
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
prepare(verbose?: boolean): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* hostname and hosts
|
|
18
|
+
*/
|
|
19
|
+
private hostname;
|
|
20
|
+
}
|