penguins-eggs 8.17.4 → 9.0.2
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 +235 -155
- package/addons/README.md +78 -84
- package/addons/{pve → blissos}/theme/applications/install-debian.desktop +0 -0
- package/addons/{pve → blissos}/theme/artwork/install-debian.png +0 -0
- package/addons/blissos/theme/calamares/branding/blissos-logo.png +0 -0
- package/addons/{pve → blissos}/theme/calamares/branding/branding.desc +0 -0
- package/addons/blissos/theme/calamares/branding/languages.png +0 -0
- package/addons/blissos/theme/calamares/branding/show.qml +75 -0
- package/addons/blissos/theme/calamares/branding/slide1.png +0 -0
- package/addons/blissos/theme/calamares/branding/slide2.png +0 -0
- package/addons/blissos/theme/calamares/branding/slide3.png +0 -0
- package/addons/blissos/theme/calamares/branding/welcome.png +0 -0
- package/addons/{pve → blissos}/theme/calamares/modules/partition.yml +2 -2
- package/addons/blissos/theme/livecd/README.md +23 -0
- package/addons/blissos/theme/livecd/grub.template.cfg +34 -0
- package/addons/blissos/theme/livecd/grub.theme.cfg +46 -0
- package/addons/blissos/theme/livecd/isolinux.template.cfg +29 -0
- package/addons/blissos/theme/livecd/isolinux.theme.cfg +45 -0
- package/addons/blissos/theme/livecd/splash.png +0 -0
- package/addons/debian/theme/README.md +23 -0
- package/addons/debian/theme/{branding → calamares/branding}/branding.desc +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/debian-logo.png +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/show.qml +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/slide1.png +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/welcome.png +0 -0
- package/addons/debian/theme/calamares/modules/partition.yml +233 -0
- package/addons/debian/theme/livecd/README.md +23 -0
- package/addons/debian/theme/livecd/grub.template.cfg +34 -0
- package/addons/{pve/theme/livecd/theme.cfg → debian/theme/livecd/grub.theme.cfg} +4 -0
- package/addons/debian/theme/livecd/isolinux.template.cfg +30 -0
- package/{conf/distros/buster/isolinux/stdmenu.template.cfg → addons/debian/theme/livecd/isolinux.theme.cfg} +4 -0
- package/addons/debian/theme/livecd/splash.png +0 -0
- package/addons/deblinux/theme/README.md +19 -12
- package/addons/eggs/adapt/applications/eggs-adapt.desktop +1 -1
- package/addons/eggs/theme/livecd/README.md +21 -6
- package/addons/eggs/theme/livecd/grub.template.cfg +11 -37
- package/addons/eggs/theme/livecd/{theme.cfg → grub.theme.cfg} +5 -1
- package/addons/eggs/theme/livecd/isolinux.template.cfg +29 -0
- package/addons/eggs/theme/livecd/isolinux.theme.cfg +46 -0
- package/addons/eggs/theme/livecd/splash.png +0 -0
- package/addons/guadalinex/theme/livecd/README.md +23 -0
- package/addons/guadalinex/theme/livecd/{menu.template.cfg → isolinux.template.cfg} +12 -3
- package/addons/guadalinex/theme/livecd/{theme.cfg → isolinux.theme.cfg} +0 -0
- package/addons/neon/theme/livecd/README.md +23 -0
- package/addons/neon/theme/livecd/grub.template.cfg +34 -0
- package/addons/{ufficiozero/theme/livecd/theme.cfg → neon/theme/livecd/grub.theme.cfg} +5 -1
- package/addons/neon/theme/livecd/isolinux.template.cfg +29 -0
- package/addons/neon/theme/livecd/isolinux.theme.cfg +46 -0
- package/addons/neon/theme/livecd/splash.pcx +0 -0
- package/addons/neon/theme/livecd/splash.png +0 -0
- package/addons/openos/theme/livecd/README.md +23 -0
- package/addons/openos/theme/livecd/{theme.cfg → grub.theme.cfg} +0 -0
- package/addons/openos/theme/livecd/{menu.template.cfg → isolinux.template.cfg} +11 -3
- package/addons/openos/theme/livecd/isolinux.theme.cfg +45 -0
- package/addons/ufficiozero/theme/applications/install-debian.desktop +17 -2
- package/bin/dev +17 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +2 -4
- package/conf/distros/bionic/calamares/settings.yml +5 -5
- package/conf/distros/bookworm/README.md +9 -0
- package/conf/distros/bullseye/README.md +6 -8
- package/conf/distros/buster/calamares/modules/shellprocess_eggs-cleanup.yml +6 -0
- package/conf/distros/buster/calamares/settings.yml +14 -3
- package/conf/distros/chimaera/README.md +3 -0
- package/conf/distros/daedalus/README.md +3 -0
- package/conf/distros/focal/calamares/settings.yml +2 -2
- package/conf/distros/jammy/README.md +9 -0
- package/conf/distros/rolling/README.md +3 -0
- package/conf/distros/rolling/calamares/calamares-modules/remove-link/module.yml +9 -0
- package/conf/distros/rolling/calamares/calamares-modules/remove-link/remove-link.sh +3 -0
- package/conf/distros/rolling/calamares/modules/displaymanager.yml +22 -0
- package/conf/distros/rolling/calamares/modules/finished.yml +6 -0
- package/conf/distros/rolling/calamares/modules/fstab.yml +13 -0
- package/conf/distros/rolling/calamares/modules/locale.yml +97 -0
- package/conf/distros/rolling/calamares/modules/luksopenswaphookcfg.yml +6 -0
- package/conf/distros/rolling/calamares/modules/mount.yml +38 -0
- package/conf/distros/rolling/calamares/modules/packages.yml +8 -0
- package/conf/distros/rolling/calamares/modules/removeuser.yml +15 -0
- package/conf/distros/rolling/calamares/modules/unpackfs.yml +7 -0
- package/conf/distros/rolling/calamares/modules/users.yml +20 -0
- package/conf/distros/rolling/calamares/modules/welcome.yml +19 -0
- package/conf/distros/{bullseye → rolling}/calamares/settings.yml +17 -12
- package/conf/distros/thirtyfive/README.md +3 -0
- package/conf/distros/tumbleweed/README.md +3 -0
- package/conf/eggs.yaml +1 -1
- package/conf/exclude.list +2 -4
- package/conf/tools.yaml +1 -1
- package/lib/classes/basket.js +24 -28
- package/lib/classes/bleach.js +17 -17
- package/lib/classes/compressors.js +15 -14
- package/lib/classes/daddy.js +38 -31
- package/lib/classes/distro.d.ts +3 -2
- package/lib/classes/distro.js +288 -179
- package/lib/classes/family/archlinux.d.ts +69 -0
- package/lib/classes/family/archlinux.js +181 -0
- package/lib/classes/family/debian.d.ts +64 -0
- package/lib/classes/family/debian.js +227 -0
- package/lib/classes/family/fedora.d.ts +63 -0
- package/lib/classes/family/fedora.js +169 -0
- package/lib/classes/family/suse.d.ts +63 -0
- package/lib/classes/family/suse.js +169 -0
- package/lib/classes/i18n.js +16 -16
- package/lib/classes/incubation/branding.js +5 -4
- package/lib/classes/incubation/distros/bionic.js +1 -2
- package/lib/classes/incubation/distros/buster.js +2 -2
- package/lib/classes/incubation/distros/focal.js +3 -2
- package/lib/classes/incubation/distros/jessie.js +1 -25
- package/lib/classes/incubation/distros/{bullseye.d.ts → rolling.d.ts} +3 -3
- package/lib/classes/incubation/distros/{bullseye.js → rolling.js} +15 -16
- package/lib/classes/incubation/fisherman-helper/displaymanager.js +2 -7
- package/lib/classes/incubation/fisherman-helper/packages.js +31 -32
- package/lib/classes/incubation/fisherman.d.ts +17 -17
- package/lib/classes/incubation/fisherman.js +84 -71
- package/lib/classes/incubation/incubator.js +116 -78
- package/lib/classes/incubation/installer.d.ts +2 -2
- package/lib/classes/incubation/installer.js +6 -20
- package/lib/classes/initrd.d.ts +1 -1
- package/lib/classes/initrd.js +37 -30
- package/lib/classes/krill_install.js +135 -132
- package/lib/classes/krill_prepare.js +51 -51
- package/lib/classes/n8.js +6 -11
- package/lib/classes/ovary.d.ts +29 -11
- package/lib/classes/ovary.js +711 -605
- package/lib/classes/pacman.d.ts +53 -58
- package/lib/classes/pacman.js +512 -431
- package/lib/classes/pve-live.js +6 -6
- package/lib/classes/settings.js +46 -55
- package/lib/classes/systemctl.d.ts +6 -6
- package/lib/classes/systemctl.js +7 -7
- package/lib/classes/tools.d.ts +1 -1
- package/lib/classes/tools.js +10 -10
- package/lib/classes/utils.d.ts +9 -12
- package/lib/classes/utils.js +127 -106
- package/lib/classes/xdg.js +94 -90
- package/lib/classes/yolk.js +36 -29
- package/lib/commands/adapt.d.ts +3 -3
- package/lib/commands/adapt.js +12 -12
- package/lib/commands/bro.d.ts +14 -0
- package/lib/commands/bro.js +31 -0
- package/lib/commands/calamares.d.ts +7 -7
- package/lib/commands/calamares.js +21 -46
- package/lib/commands/config.d.ts +5 -5
- package/lib/commands/config.js +68 -75
- package/lib/commands/dad.d.ts +5 -5
- package/lib/commands/dad.js +11 -11
- package/lib/commands/export/deb.d.ts +8 -8
- package/lib/commands/export/deb.js +16 -16
- package/lib/commands/export/docs.d.ts +2 -2
- package/lib/commands/export/docs.js +9 -9
- package/lib/commands/export/iso.d.ts +4 -4
- package/lib/commands/export/iso.js +12 -17
- package/lib/commands/info.d.ts +9 -3
- package/lib/commands/info.js +14 -164
- package/lib/commands/install.d.ts +4 -4
- package/lib/commands/install.js +19 -14
- package/lib/commands/kill.d.ts +3 -3
- package/lib/commands/kill.js +11 -13
- package/lib/commands/mom.d.ts +2 -2
- package/lib/commands/mom.js +8 -8
- package/lib/commands/produce.d.ts +14 -14
- package/lib/commands/produce.js +42 -45
- package/lib/commands/remove.d.ts +5 -5
- package/lib/commands/remove.js +46 -57
- package/lib/commands/tools/clean.d.ts +3 -3
- package/lib/commands/tools/clean.js +10 -12
- package/lib/commands/tools/locales.d.ts +4 -4
- package/lib/commands/tools/locales.js +8 -8
- package/lib/commands/tools/skel.d.ts +4 -4
- package/lib/commands/tools/skel.js +10 -15
- package/lib/commands/tools/stat.d.ts +7 -4
- package/lib/commands/tools/stat.js +20 -13
- package/lib/commands/tools/yolk.d.ts +3 -3
- package/lib/commands/tools/yolk.js +12 -12
- package/lib/commands/update.d.ts +5 -10
- package/lib/commands/update.js +56 -72
- package/lib/components/elements/information.d.ts +4 -0
- package/lib/components/elements/information.js +166 -0
- package/lib/components/elements/steps.js +1 -1
- package/lib/components/elements/title.js +7 -10
- package/lib/components/finished.js +5 -5
- package/lib/components/install.js +5 -5
- package/lib/components/keyboard.js +5 -5
- 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 +6 -6
- package/lib/components/welcome.js +6 -6
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/interfaces/i-distro.d.ts +3 -2
- package/lib/interfaces/i-settings.d.ts +2 -2
- package/lib/lib/cli-autologin.d.ts +19 -2
- package/lib/lib/cli-autologin.js +114 -39
- package/lib/lib/dependencies.d.ts +9 -6
- package/lib/lib/dependencies.js +22 -13
- package/lib/lib/get_address.js +2 -2
- package/lib/lib/get_dns.js +2 -2
- package/lib/lib/get_domain.js +2 -2
- package/lib/lib/get_gateway.js +2 -2
- package/lib/lib/get_hostname.js +2 -2
- package/lib/lib/get_netmask.js +2 -2
- package/lib/lib/get_password.js +2 -2
- package/lib/lib/get_root_password.js +2 -2
- package/lib/lib/get_userfullname.js +2 -2
- package/lib/lib/get_username.js +2 -2
- package/lib/lib/select_address_type.js +2 -5
- package/lib/lib/select_filesystem_type.js +5 -14
- package/lib/lib/select_installation_device.js +3 -3
- package/lib/lib/select_interface.js +1 -1
- package/lib/lib/select_keyboard_layout.js +2 -10
- package/lib/lib/select_languages.js +2 -2
- package/lib/lib/select_regions.js +1 -12
- package/lib/lib/select_user_swap_choice.js +4 -4
- package/lib/lib/select_zones.js +483 -62
- package/oclif.manifest.json +1 -1
- package/package.json +115 -107
- package/scripts/bros/waydroid-helper.sh +92 -0
- package/scripts/eggs.bash +65 -35
- package/scripts/not-used/eggs-cleanup.sh +7 -0
- package/scripts/{install-eggs-ppa.sh → not-used/install-eggs-ppa.sh} +0 -0
- package/scripts/{mkinitramfs → not-used/mkinitramfs} +0 -0
- package/scripts/{pve-live.sh → not-used/pve-live.sh} +0 -0
- package/addons/eggs/theme/livecd/menu.template.cfg +0 -54
- package/addons/pve/theme/applications/penguins-pve.desktop +0 -24
- package/addons/pve/theme/calamares/branding/pve-logo.png +0 -0
- package/addons/pve/theme/calamares/branding/show.qml +0 -227
- package/addons/pve/theme/calamares/branding/slide1.png +0 -0
- package/addons/pve/theme/calamares/branding/slide2.png +0 -0
- package/addons/pve/theme/calamares/branding/slide3.png +0 -0
- package/addons/pve/theme/calamares/branding/slide4.png +0 -0
- package/addons/pve/theme/calamares/branding/slide5.png +0 -0
- package/addons/pve/theme/calamares/branding/slide6.png +0 -0
- package/addons/pve/theme/calamares/branding/slide7.png +0 -0
- package/addons/pve/theme/calamares/branding/slide8.png +0 -0
- package/addons/pve/theme/calamares/branding/slide9.png +0 -0
- package/addons/pve/theme/calamares/branding/welcome.png +0 -0
- package/addons/pve/theme/livecd/README.md +0 -8
- package/addons/pve/theme/livecd/grub.template.cfg +0 -60
- package/addons/pve/theme/livecd/menu.template.cfg +0 -54
- package/addons/pve/theme/livecd/splash.png +0 -0
- package/addons/ufficiozero/theme/artwork/install-debian.png +0 -0
- package/addons/ufficiozero/theme/livecd/README.md +0 -8
- package/addons/ufficiozero/theme/livecd/grub.template.cfg +0 -60
- package/addons/ufficiozero/theme/livecd/menu.template.cfg +0 -54
- package/changelog.md +0 -154
- package/conf/distros/bullseye/calamares/calamares-modules/bootloader-config/bootloader-config.sh +0 -28
- package/conf/distros/bullseye/calamares/calamares-modules/bootloader-config/module.yml +0 -8
- package/conf/distros/buster/grub/grub.template.cfg +0 -58
- package/conf/distros/buster/grub/loopback.cfg +0 -1
- package/conf/distros/buster/grub/theme.cfg +0 -42
- package/conf/distros/buster/isolinux/isolinux.template.cfg +0 -8
- package/conf/distros/buster/isolinux/menu.template.cfg +0 -56
- package/conf/distros/focal/grub/grub.template.cfg +0 -67
- package/conf/distros/focal/isolinux/menu.template.cfg +0 -54
- package/lib/classes/incubation/distros/beowulf.d.ts +0 -30
- package/lib/classes/incubation/distros/beowulf.js +0 -69
- package/lib/classes/krill_install_compare.d.ts +0 -200
- package/lib/classes/krill_install_compare.js +0 -1110
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/scripts/python-minimal-deb/anti-python-minimal +0 -7
- package/scripts/python-minimal-deb/python-minimal_99_all.deb +0 -0
- package/scripts/python-minimal-deb/python-minimal_99_amd64.buildinfo +0 -168
- package/scripts/python-minimal-deb/python-minimal_99_amd64.changes +0 -25
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 = tslib_1.__importDefault(require("./systemctl"));
|
|
20
|
-
const
|
|
21
|
-
const
|
|
19
|
+
const systemctl_1 = (0, tslib_1.__importDefault)(require("./systemctl"));
|
|
20
|
+
const node_path_1 = (0, tslib_1.__importDefault)(require("node:path"));
|
|
21
|
+
const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
|
|
22
22
|
class PveLive {
|
|
23
23
|
constructor() {
|
|
24
24
|
this.systemctl = {};
|
|
@@ -36,7 +36,7 @@ class PveLive {
|
|
|
36
36
|
disable() {
|
|
37
37
|
this.systemctl.disable('pve-live');
|
|
38
38
|
}
|
|
39
|
-
create(root =
|
|
39
|
+
create(root = '/') {
|
|
40
40
|
this.createScript(root);
|
|
41
41
|
this.createService(root);
|
|
42
42
|
}
|
|
@@ -44,13 +44,13 @@ class PveLive {
|
|
|
44
44
|
*
|
|
45
45
|
*/
|
|
46
46
|
createScript(root = '/') {
|
|
47
|
-
|
|
47
|
+
shelljs_1.default.cp(node_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
|
-
|
|
53
|
+
shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../scripts/pve-live.service'), root + '/lib/systemd/system/');
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
*
|
package/lib/classes/settings.js
CHANGED
|
@@ -10,17 +10,17 @@ const tslib_1 = require("tslib");
|
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
// packages
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
13
|
+
const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
|
|
14
|
+
const node_os_1 = (0, tslib_1.__importDefault)(require("node:os"));
|
|
15
|
+
const js_yaml_1 = (0, tslib_1.__importDefault)(require("js-yaml"));
|
|
16
|
+
const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
|
|
17
|
+
const pjson_1 = (0, tslib_1.__importDefault)(require("pjson"));
|
|
18
|
+
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
19
19
|
// libraries
|
|
20
20
|
// classes
|
|
21
|
-
const utils_1 = tslib_1.__importDefault(require("./utils"));
|
|
22
|
-
const distro_1 = tslib_1.__importDefault(require("./distro"));
|
|
23
|
-
const pacman_1 = tslib_1.__importDefault(require("./pacman"));
|
|
21
|
+
const utils_1 = (0, tslib_1.__importDefault)(require("./utils"));
|
|
22
|
+
const distro_1 = (0, tslib_1.__importDefault)(require("./distro"));
|
|
23
|
+
const pacman_1 = (0, tslib_1.__importDefault)(require("./pacman"));
|
|
24
24
|
const config_file = '/etc/penguins-eggs.d/eggs.yaml';
|
|
25
25
|
/**
|
|
26
26
|
* Setting
|
|
@@ -46,8 +46,8 @@ class Settings {
|
|
|
46
46
|
this.app.author = 'Piero Proietti';
|
|
47
47
|
this.app.homepage = 'https://github.com/pieroproietti/penguins-eggs';
|
|
48
48
|
this.app.mail = 'piero.proietti@gmail.com';
|
|
49
|
-
this.app.name =
|
|
50
|
-
this.app.version =
|
|
49
|
+
this.app.name = pjson_1.default.name;
|
|
50
|
+
this.app.version = pjson_1.default.version;
|
|
51
51
|
this.isLive = utils_1.default.isLive();
|
|
52
52
|
this.i686 = utils_1.default.isi686();
|
|
53
53
|
this.distro = new distro_1.default(this.remix);
|
|
@@ -57,7 +57,7 @@ class Settings {
|
|
|
57
57
|
* @param config
|
|
58
58
|
*/
|
|
59
59
|
async save(config) {
|
|
60
|
-
|
|
60
|
+
node_fs_1.default.writeFileSync(config_file, js_yaml_1.default.dump(config), 'utf-8');
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Load configuration from config_file
|
|
@@ -65,12 +65,12 @@ class Settings {
|
|
|
65
65
|
*/
|
|
66
66
|
async load() {
|
|
67
67
|
const foundSettings = true;
|
|
68
|
-
if (!
|
|
68
|
+
if (!node_fs_1.default.existsSync(config_file)) {
|
|
69
69
|
console.log(`cannot find configuration file ${config_file},`);
|
|
70
|
-
console.log(
|
|
70
|
+
console.log('please generate it with: sudo eggs config');
|
|
71
71
|
process.exit(1);
|
|
72
72
|
}
|
|
73
|
-
this.config =
|
|
73
|
+
this.config = js_yaml_1.default.load(node_fs_1.default.readFileSync(config_file, 'utf-8'));
|
|
74
74
|
this.session_excludes = '';
|
|
75
75
|
if (!this.config.snapshot_dir.endsWith('/')) {
|
|
76
76
|
this.config.snapshot_dir += '/';
|
|
@@ -80,34 +80,30 @@ class Settings {
|
|
|
80
80
|
this.work_dir.upperdir = this.work_dir.path + '.overlay/upperdir';
|
|
81
81
|
this.work_dir.workdir = this.work_dir.path + '.overlay/workdir';
|
|
82
82
|
this.work_dir.merged = this.work_dir.path + 'filesystem.squashfs';
|
|
83
|
-
this.efi_work = this.work_dir.path + 'efi/';
|
|
83
|
+
this.efi_work = this.work_dir.path + 'efi-work/';
|
|
84
84
|
this.work_dir.pathIso = this.work_dir.path + 'iso/';
|
|
85
85
|
if (this.config.snapshot_basename === 'hostname') {
|
|
86
|
-
this.config.snapshot_basename =
|
|
86
|
+
this.config.snapshot_basename = node_os_1.default.hostname();
|
|
87
87
|
}
|
|
88
|
-
if (this.config.make_efi) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
this.config.make_efi = false;
|
|
95
|
-
}
|
|
88
|
+
if (this.config.make_efi && !pacman_1.default.isUefi()) {
|
|
89
|
+
utils_1.default.error('You choose to create an UEFI image, but miss to install grub-efi-amd64-bin package.');
|
|
90
|
+
utils_1.default.error('Please install it before to create an UEFI image:');
|
|
91
|
+
utils_1.default.warning('sudo apt install grub-efi-amd64-bin');
|
|
92
|
+
utils_1.default.error('or edit /etc/penguins-eggs.d/eggs.yaml and set the valuer of make_efi = false');
|
|
93
|
+
this.config.make_efi = false;
|
|
96
94
|
}
|
|
97
95
|
this.kernel_image = this.config.vmlinuz;
|
|
98
96
|
this.initrd_image = this.config.initrd_img;
|
|
99
|
-
this.vmlinuz = this.kernel_image.
|
|
100
|
-
this.initrdImg = this.initrd_image.
|
|
97
|
+
this.vmlinuz = this.kernel_image.slice(this.kernel_image.lastIndexOf('/'));
|
|
98
|
+
this.initrdImg = this.initrd_image.slice(this.initrd_image.lastIndexOf('/'));
|
|
101
99
|
/**
|
|
102
100
|
* Use the login name set in the config file. If not set, use the primary
|
|
103
101
|
* user's name. If the name is not "user" then add boot option. ALso use
|
|
104
102
|
* the same username for cleaning geany history.
|
|
105
103
|
*/
|
|
106
|
-
if (this.config.user_opt === undefined || this.config.user_opt === '') {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
this.config.user_opt = 'live';
|
|
110
|
-
}
|
|
104
|
+
if ((this.config.user_opt === undefined || this.config.user_opt === '') && // this.user_opt = shx.exec('awk -F":" \'/1000:1000/ { print $1 }\' /etc/passwd', { silent: true }).stdout.trim()
|
|
105
|
+
this.config.user_opt === '') {
|
|
106
|
+
this.config.user_opt = 'live';
|
|
111
107
|
}
|
|
112
108
|
if (this.config.user_opt_passwd === '') {
|
|
113
109
|
this.config.user_opt_passwd = 'evolution';
|
|
@@ -116,7 +112,7 @@ class Settings {
|
|
|
116
112
|
this.config.root_passwd = 'evolution';
|
|
117
113
|
}
|
|
118
114
|
if (this.config.timezone === undefined || this.config.timezone === '') {
|
|
119
|
-
this.config.timezone =
|
|
115
|
+
this.config.timezone = shelljs_1.default.exec('cat /etc/timezone', { silent: true }).stdout.trim();
|
|
120
116
|
}
|
|
121
117
|
return foundSettings;
|
|
122
118
|
}
|
|
@@ -128,24 +124,24 @@ class Settings {
|
|
|
128
124
|
// console.log(`config_file: ${config_file}`)
|
|
129
125
|
console.log(`snapshot_dir: ${this.config.snapshot_dir}`);
|
|
130
126
|
if (this.config.snapshot_prefix === '') {
|
|
131
|
-
console.log('snapshot_prefix: ' +
|
|
127
|
+
console.log('snapshot_prefix: ' + chalk_1.default.bgYellow('no value') + ' run ' + chalk_1.default.cyan('sudo eggs dad') + ' or edit ' + chalk_1.default.cyan('/etc/penguins-eggs.d/eggs.yaml'));
|
|
132
128
|
}
|
|
133
129
|
else {
|
|
134
|
-
console.log('snapshot_prefix: ' +
|
|
130
|
+
console.log('snapshot_prefix: ' + chalk_1.default.green(this.config.snapshot_prefix));
|
|
135
131
|
}
|
|
136
132
|
console.log(`snapshot_basename: ${this.config.snapshot_basename}`);
|
|
137
133
|
// console.log(`snapshot_excludes: ${this.config.snapshot_excludes}`)
|
|
138
|
-
if (
|
|
139
|
-
console.log(
|
|
134
|
+
if (node_fs_1.default.existsSync(this.kernel_image)) {
|
|
135
|
+
console.log('kernel_image: ' + chalk_1.default.green(this.kernel_image));
|
|
140
136
|
}
|
|
141
137
|
else {
|
|
142
|
-
console.log('kernel_image: ' +
|
|
138
|
+
console.log('kernel_image: ' + chalk_1.default.red(this.kernel_image) + ' not found! Please edit /etc/penguins-eggs.d/eggs.yaml');
|
|
143
139
|
}
|
|
144
|
-
if (
|
|
145
|
-
console.log('initrd_image: ' +
|
|
140
|
+
if (node_fs_1.default.existsSync(this.initrd_image)) {
|
|
141
|
+
console.log('initrd_image: ' + chalk_1.default.green(this.initrd_image));
|
|
146
142
|
}
|
|
147
143
|
else {
|
|
148
|
-
console.log('initrd_image: ' +
|
|
144
|
+
console.log('initrd_image: ' + chalk_1.default.red(this.initrd_image) + ' not found! Please edit /etc/penguins-eggs.d/eggs.yaml');
|
|
149
145
|
}
|
|
150
146
|
console.log(`work_dir: ${this.work_dir.path}`);
|
|
151
147
|
// console.log(`efi_work: ${this.efi_work}`)
|
|
@@ -157,9 +153,9 @@ class Settings {
|
|
|
157
153
|
console.log(`user_opt: ${this.config.user_opt}`);
|
|
158
154
|
console.log(`locales: ${this.config.locales}`);
|
|
159
155
|
console.log(`locale default: ${this.config.locales_default}`);
|
|
160
|
-
//console.log(`ssh_pass: ${this.config.ssh_pass}`)
|
|
156
|
+
// console.log(`ssh_pass: ${this.config.ssh_pass}`)
|
|
161
157
|
if (this.config.make_efi) {
|
|
162
|
-
if (!
|
|
158
|
+
if (!pacman_1.default.isUefi()) {
|
|
163
159
|
utils_1.default.error('You choose to create an UEFI image, but miss to install grub-efi-amd64-bin package.');
|
|
164
160
|
utils_1.default.error('Please install it before to create an UEFI image:');
|
|
165
161
|
utils_1.default.warning('sudo apt install grub-efi-amd64-bin');
|
|
@@ -179,8 +175,8 @@ class Settings {
|
|
|
179
175
|
*/
|
|
180
176
|
async listFreeSpace() {
|
|
181
177
|
const path = this.config.snapshot_dir; // convert to absolute path
|
|
182
|
-
if (!
|
|
183
|
-
|
|
178
|
+
if (!node_fs_1.default.existsSync(this.config.snapshot_dir)) {
|
|
179
|
+
node_fs_1.default.mkdirSync(this.config.snapshot_dir);
|
|
184
180
|
}
|
|
185
181
|
/** Lo spazio usato da SquashFS non è stimabile da live
|
|
186
182
|
* errore buffer troppo piccolo
|
|
@@ -190,7 +186,7 @@ class Settings {
|
|
|
190
186
|
if (!utils_1.default.isLive()) {
|
|
191
187
|
console.log(`Disk space used: ${Math.round((utils_1.default.getUsedSpace() / gb) * 10) / 10} GB`);
|
|
192
188
|
}
|
|
193
|
-
spaceAvailable = Number(
|
|
189
|
+
spaceAvailable = Number(shelljs_1.default
|
|
194
190
|
.exec(`df "${path}" | /usr/bin/awk 'NR==2 {print $4}'`, {
|
|
195
191
|
silent: true
|
|
196
192
|
})
|
|
@@ -199,11 +195,11 @@ class Settings {
|
|
|
199
195
|
console.log(`There are ${utils_1.default.getSnapshotCount(this.config.snapshot_dir)} snapshots taking ${Math.round((utils_1.default.getSnapshotSize() / gb) * 10) / 10} GB of disk space.`);
|
|
200
196
|
console.log();
|
|
201
197
|
if (spaceAvailable > gb * 3) {
|
|
202
|
-
console.log(
|
|
203
|
-
console.log(
|
|
198
|
+
console.log(chalk_1.default.cyanBright('The free space should be sufficient to hold the'));
|
|
199
|
+
console.log(chalk_1.default.cyanBright('compressed data from the system'));
|
|
204
200
|
}
|
|
205
201
|
else {
|
|
206
|
-
console.log(
|
|
202
|
+
console.log(chalk_1.default.redBright('The free space should be insufficient') + '.');
|
|
207
203
|
console.log();
|
|
208
204
|
console.log('If necessary, you can create more available space');
|
|
209
205
|
console.log('by removing previous snapshots and saved copies:');
|
|
@@ -217,12 +213,7 @@ class Settings {
|
|
|
217
213
|
async loadRemix(basename = '', theme = '') {
|
|
218
214
|
this.remix.versionNumber = utils_1.default.getPackageVersion();
|
|
219
215
|
this.remix.kernel = utils_1.default.kernerlVersion();
|
|
220
|
-
|
|
221
|
-
this.remix.branding = 'eggs';
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
this.remix.branding = theme;
|
|
225
|
-
}
|
|
216
|
+
this.remix.branding = theme === '' ? 'eggs' : theme;
|
|
226
217
|
this.remix.name = this.config.snapshot_basename;
|
|
227
218
|
let name = this.config.snapshot_prefix + this.config.snapshot_basename;
|
|
228
219
|
name = name.replace(/-/g, ' ').replace('egg of ', '');
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* Presa da https://github.com/VolantisDev/node-systemctl
|
|
8
8
|
*/
|
|
9
9
|
export default class SistemdCtl {
|
|
10
|
-
daemonReload(): Promise<
|
|
11
|
-
disable(serviceName: string): Promise<
|
|
12
|
-
enable(serviceName: string): Promise<
|
|
10
|
+
daemonReload(): Promise<import("../interfaces").IExec>;
|
|
11
|
+
disable(serviceName: string): Promise<import("../interfaces").IExec>;
|
|
12
|
+
enable(serviceName: string): Promise<import("../interfaces").IExec>;
|
|
13
13
|
isEnabled(serviceName: string): Promise<unknown>;
|
|
14
|
-
restart(serviceName: string): Promise<
|
|
15
|
-
start(serviceName: string): Promise<
|
|
16
|
-
stop(serviceName: string): Promise<
|
|
14
|
+
restart(serviceName: string): Promise<import("../interfaces").IExec>;
|
|
15
|
+
start(serviceName: string): Promise<import("../interfaces").IExec>;
|
|
16
|
+
stop(serviceName: string): Promise<import("../interfaces").IExec>;
|
|
17
17
|
}
|
package/lib/classes/systemctl.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Presa da https://github.com/VolantisDev/node-systemctl
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
const
|
|
11
|
+
const utils_1 = require("../lib/utils");
|
|
12
12
|
class SistemdCtl {
|
|
13
13
|
async daemonReload() {
|
|
14
14
|
return run('daemon-reload');
|
|
@@ -23,21 +23,21 @@ class SistemdCtl {
|
|
|
23
23
|
return new Promise((resolve, reject) => {
|
|
24
24
|
run('is-enabled', serviceName)
|
|
25
25
|
.then((result) => {
|
|
26
|
-
resolve(result.
|
|
26
|
+
resolve(result.data.includes('enabled'));
|
|
27
27
|
})
|
|
28
|
-
.catch(function (
|
|
28
|
+
.catch(function (error) {
|
|
29
29
|
resolve(false);
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
async restart(serviceName) {
|
|
34
|
-
return run(
|
|
34
|
+
return run('restart', serviceName);
|
|
35
35
|
}
|
|
36
36
|
start(serviceName) {
|
|
37
|
-
return run(
|
|
37
|
+
return run('start', serviceName);
|
|
38
38
|
}
|
|
39
39
|
stop(serviceName) {
|
|
40
|
-
return run(
|
|
40
|
+
return run('stop', serviceName);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
exports.default = SistemdCtl;
|
|
@@ -50,5 +50,5 @@ async function run(cmd, serviceName = '') {
|
|
|
50
50
|
command = command + ' ' + serviceName;
|
|
51
51
|
}
|
|
52
52
|
console.log(command);
|
|
53
|
-
return exec(command);
|
|
53
|
+
return (0, utils_1.exec)(command);
|
|
54
54
|
}
|
package/lib/classes/tools.d.ts
CHANGED
package/lib/classes/tools.js
CHANGED
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const tslib_1 = require("tslib");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const settings_1 = tslib_1.__importDefault(require("./settings"));
|
|
13
|
-
const utils_1 = tslib_1.__importDefault(require("./utils"));
|
|
10
|
+
const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
|
|
11
|
+
const js_yaml_1 = (0, tslib_1.__importDefault)(require("js-yaml"));
|
|
12
|
+
const settings_1 = (0, tslib_1.__importDefault)(require("./settings"));
|
|
13
|
+
const utils_1 = (0, tslib_1.__importDefault)(require("./utils"));
|
|
14
14
|
/**
|
|
15
15
|
* Utils: general porpourse utils
|
|
16
16
|
* @remarks all the utilities
|
|
17
|
-
|
|
17
|
+
*/
|
|
18
18
|
class Tools {
|
|
19
19
|
constructor() {
|
|
20
20
|
this.tools_yaml = '/etc/penguins-eggs.d/tools.yaml';
|
|
@@ -23,14 +23,14 @@ class Tools {
|
|
|
23
23
|
this.config = {};
|
|
24
24
|
}
|
|
25
25
|
/*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
* Load configuration from /etc/penguins-eggs.yaml
|
|
27
|
+
* @returns {boolean} Success
|
|
28
|
+
*/
|
|
29
29
|
async loadSettings() {
|
|
30
30
|
let foundSettings = false;
|
|
31
|
-
if (
|
|
31
|
+
if (node_fs_1.default.existsSync(this.tools_yaml)) {
|
|
32
32
|
foundSettings = true;
|
|
33
|
-
const loaded =
|
|
33
|
+
const loaded = js_yaml_1.default.load(node_fs_1.default.readFileSync(this.tools_yaml, 'utf-8'));
|
|
34
34
|
this.config.remoteHost = loaded.remoteHost;
|
|
35
35
|
this.config.remoteUser = loaded.remoteUser;
|
|
36
36
|
this.config.remotePathDeb = loaded.remotePathDeb;
|
package/lib/classes/utils.d.ts
CHANGED
|
@@ -21,8 +21,10 @@ export default class Utils {
|
|
|
21
21
|
* ma viene avviato con init
|
|
22
22
|
*/
|
|
23
23
|
static isSystemd(): boolean;
|
|
24
|
+
static isSysvinit(): boolean;
|
|
24
25
|
/**
|
|
25
26
|
* ricava path per vmlinuz
|
|
27
|
+
* BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.15.6-200.fc35.x86_64 root=UUID=91cf614e-62a1-464c-904f-38d0a1ceb7a7 ro rootflags=subvol=root rhgb quiet
|
|
26
28
|
*/
|
|
27
29
|
static vmlinuz(): string;
|
|
28
30
|
/**
|
|
@@ -122,12 +124,9 @@ export default class Utils {
|
|
|
122
124
|
* @returns {boolean} true se l'architettura è i686
|
|
123
125
|
*/
|
|
124
126
|
static isi686(): boolean;
|
|
125
|
-
/**
|
|
126
|
-
* Check se la macchina ha grub adatto ad efi
|
|
127
|
-
*/
|
|
128
|
-
static isUefi(): boolean;
|
|
129
127
|
/**
|
|
130
128
|
* Controlla se è un pacchetto deb
|
|
129
|
+
* /usr/lib/penguins-eggs/bin/node
|
|
131
130
|
*/
|
|
132
131
|
static isDebPackage(): boolean;
|
|
133
132
|
/**
|
|
@@ -158,7 +157,6 @@ export default class Utils {
|
|
|
158
157
|
static getAuthorName(): string;
|
|
159
158
|
/**
|
|
160
159
|
* Return the Debian version
|
|
161
|
-
* @remarks to move in Utils
|
|
162
160
|
* @returns {number} Versione di Debian
|
|
163
161
|
*/
|
|
164
162
|
static getDebianVersion(): number;
|
|
@@ -186,23 +184,23 @@ export default class Utils {
|
|
|
186
184
|
*/
|
|
187
185
|
static iface(): string;
|
|
188
186
|
/**
|
|
189
|
-
*
|
|
187
|
+
* address
|
|
190
188
|
*/
|
|
191
189
|
static address(): string;
|
|
192
190
|
/**
|
|
193
191
|
* netmask
|
|
194
192
|
*/
|
|
195
193
|
static netmask(): string;
|
|
196
|
-
/**
|
|
197
|
-
* @returns dns
|
|
198
|
-
*/
|
|
199
|
-
static getDns(): string[];
|
|
200
|
-
static getDomain(): string;
|
|
201
194
|
/**
|
|
202
195
|
*
|
|
203
196
|
* @returns
|
|
204
197
|
*/
|
|
205
198
|
static broadcast(): string;
|
|
199
|
+
/**
|
|
200
|
+
* @returns dns
|
|
201
|
+
*/
|
|
202
|
+
static getDns(): string[];
|
|
203
|
+
static getDomain(): string;
|
|
206
204
|
/**
|
|
207
205
|
* @returns gateway
|
|
208
206
|
*/
|
|
@@ -264,7 +262,6 @@ export default class Utils {
|
|
|
264
262
|
* titles
|
|
265
263
|
* Penguin's are gettings alive!
|
|
266
264
|
*/
|
|
267
|
-
static titles2(command?: string): Promise<void>;
|
|
268
265
|
static titles(command?: string): void;
|
|
269
266
|
/**
|
|
270
267
|
*
|