penguins-eggs 9.1.10 → 9.1.26
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 +46 -466
- package/addons/eggs/adapt/applications/eggs-adapt.desktop +0 -0
- package/addons/eggs/adapt/bin/eggs-adapt.sh +0 -0
- package/addons/eggs/ichoice/bin/eggs-ichoice.sh +0 -0
- package/addons/eggs/pve/applications/eggs-pve.desktop +0 -0
- package/addons/eggs/rsupport/applications/eggs-rsupport.desktop +0 -0
- package/addons/eggs/theme/applications/install-debian.desktop +235 -22
- package/addons/neon/theme/applications/install-debian.desktop +0 -0
- package/addons/telos/theme/applications/install-debian.desktop +0 -0
- package/addons/ufficiozero/theme/applications/install-debian.desktop +0 -0
- package/addons/waydroid/theme/applications/install-debian.desktop +0 -0
- package/assets/calamares/install-debian +2 -2
- package/assets/penguins-eggs.desktop +0 -0
- package/assets/penguins-krill.desktop +0 -0
- package/assets/penguins-live-installer.desktop +0 -0
- package/bin/dev +0 -0
- package/conf/distros/bionic/calamares/calamares-modules/after-bootloader/after-bootloader.sh +0 -0
- package/conf/distros/bionic/calamares/calamares-modules/before-bootloader/before-bootloader.sh +0 -0
- package/conf/distros/bionic/calamares/calamares-modules/before-bootloader-mkdirs/before-bootloader-mkdirs.sh +0 -0
- package/conf/distros/bionic/calamares/calamares-modules/bug/bug.sh +0 -0
- package/conf/distros/bionic/calamares/calamares-modules/grubcfg/main.py +0 -0
- package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +13 -0
- package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/module.yml +6 -0
- package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io-undo/module.yml +6 -0
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/buster/calamares/modules/bootloader.yml +6 -6
- package/conf/distros/buster/calamares/modules/displaymanager.yml +3 -2
- package/conf/distros/buster/calamares/modules/finished.yml +3 -3
- package/conf/distros/buster/calamares/modules/fstab.yml +1 -2
- package/conf/distros/buster/calamares/modules/luksopenswaphookcfg.yml +1 -2
- package/conf/distros/buster/calamares/modules/machineid.yml +9 -2
- package/conf/distros/buster/calamares/modules/mount.yml +1 -2
- package/conf/distros/buster/calamares/modules/packages.yml +1 -1
- package/conf/distros/buster/calamares/modules/shellprocess_eggs-cleanup.yml +1 -0
- package/conf/distros/buster/calamares/modules/unpackfs.yml +1 -2
- package/conf/distros/buster/calamares/modules/users.yml +3 -4
- package/conf/distros/buster/calamares/modules/welcome.yml +1 -1
- package/conf/distros/buster/calamares/settings.yml +37 -7
- package/conf/distros/focal/calamares/calamares-modules/automirror/main.py +0 -0
- package/conf/distros/focal/calamares/modules/after_bootloader_context.yml +2 -3
- package/conf/distros/focal/calamares/modules/automirror.yml +6 -0
- package/conf/distros/focal/calamares/modules/before_bootloader_context.yml +13 -14
- package/conf/distros/focal/calamares/modules/before_bootloader_mkdirs_context.yml +3 -4
- package/conf/distros/focal/calamares/modules/bootloader.yml +1 -2
- package/conf/distros/focal/calamares/modules/displaymanager.yml +11 -0
- package/conf/distros/focal/calamares/modules/finished.yml +1 -2
- package/conf/distros/focal/calamares/modules/fstab.yml +1 -2
- package/conf/distros/focal/calamares/modules/grubcfg.yml +2 -3
- package/conf/distros/focal/calamares/modules/locale.yml +6 -7
- package/conf/distros/focal/calamares/modules/machineid.yml +1 -2
- package/conf/distros/focal/calamares/modules/mount.yml +19 -20
- package/conf/distros/focal/calamares/modules/partition.yml +5 -3
- package/conf/distros/focal/calamares/modules/shellprocess_add386arch.yml +2 -3
- package/conf/distros/focal/calamares/modules/shellprocess_bug-LP#1829805.yml +1 -3
- package/conf/distros/focal/calamares/modules/shellprocess_logs.yml +2 -3
- package/conf/distros/focal/calamares/modules/unpackfs.yml +2 -3
- package/conf/distros/focal/calamares/modules/users.yml +4 -3
- package/conf/distros/focal/calamares/modules/welcome.yml +21 -22
- package/conf/distros/focal/calamares/settings.yml +4 -5
- package/conf/distros/jammy/README.md +32 -0
- package/conf/exclude.list +3 -0
- package/lib/classes/daddy.js +2 -2
- package/lib/classes/family/debian.js +8 -22
- package/lib/classes/i18n.d.ts +0 -4
- package/lib/classes/i18n.js +15 -27
- package/lib/classes/incubation/distros/buster.js +3 -1
- package/lib/classes/incubation/fisherman-helper/displaymanager.js +5 -3
- package/lib/classes/incubation/fisherman-helper/packages.js +36 -67
- package/lib/classes/krill_install.js +6 -6
- package/lib/classes/ovary.js +90 -92
- package/lib/classes/pacman.js +0 -8
- package/lib/classes/sources_list.js +11 -20
- package/lib/classes/tailor.d.ts +13 -11
- package/lib/classes/tailor.js +267 -92
- package/lib/classes/utils.d.ts +1 -1
- package/lib/classes/utils.js +15 -11
- package/lib/classes/xdg.js +38 -18
- package/lib/commands/adapt.d.ts +0 -1
- package/lib/commands/adapt.js +1 -1
- package/lib/commands/analyze.js +8 -5
- package/lib/commands/calamares.d.ts +1 -1
- package/lib/commands/calamares.js +7 -7
- package/lib/commands/config.d.ts +0 -1
- package/lib/commands/config.js +4 -1
- package/lib/commands/dad.js +5 -2
- package/lib/commands/install.d.ts +0 -1
- package/lib/commands/install.js +6 -3
- package/lib/commands/kill.js +4 -1
- package/lib/commands/produce.d.ts +0 -1
- package/lib/commands/produce.js +5 -2
- package/lib/commands/remove.js +3 -0
- package/lib/commands/syncfrom.d.ts +0 -1
- package/lib/commands/syncfrom.js +14 -11
- package/lib/commands/syncto.d.ts +0 -1
- package/lib/commands/syncto.js +17 -14
- package/lib/commands/tools/clean.d.ts +0 -1
- package/lib/commands/tools/clean.js +9 -4
- package/lib/commands/tools/skel.d.ts +0 -1
- package/lib/commands/tools/skel.js +6 -3
- package/lib/commands/tools/stat.d.ts +0 -1
- package/lib/commands/tools/stat.js +1 -1
- package/lib/commands/tools/yolk.js +3 -0
- package/lib/commands/update.js +5 -2
- package/lib/commands/wardrobe/ironing.d.ts +3 -0
- package/lib/commands/wardrobe/ironing.js +22 -4
- package/lib/commands/wardrobe/wear.d.ts +1 -0
- package/lib/commands/wardrobe/wear.js +7 -2
- package/lib/interfaces/i-materia.d.ts +4 -0
- package/lib/interfaces/index.d.ts +0 -1
- package/lib/lib/cli-autologin.js +24 -24
- package/lib/lib/dependencies.js +6 -1
- package/lib/lib/get_address.js +3 -2
- package/lib/lib/get_dns.js +3 -2
- package/lib/lib/get_domain.js +3 -2
- package/lib/lib/get_gateway.js +3 -2
- package/lib/lib/get_hostname.js +3 -2
- package/lib/lib/get_netmask.js +3 -2
- package/lib/lib/get_password.js +3 -2
- package/lib/lib/get_root_password.js +3 -2
- package/lib/lib/get_userfullname.js +3 -2
- package/lib/lib/get_username.js +3 -2
- package/lib/lib/select_filesystem_type.js +2 -2
- package/lib/lib/select_installation_device.js +2 -2
- package/lib/lib/select_installation_mode.js +3 -2
- package/lib/lib/select_regions.js +3 -2
- package/lib/lib/select_user_swap_choice.js +2 -2
- package/lib/lib/select_zones.js +3 -2
- package/oclif.manifest.json +1 -1
- package/package.json +114 -114
- package/scripts/_eggs +3 -9
- package/scripts/bros/waydroid-helper.sh +0 -0
- package/scripts/eggs.bash +2 -3
- package/scripts/install-eggs-ppa.sh +0 -0
- package/scripts/mom-cli.sh +0 -0
- package/scripts/pve-live.service +0 -0
- package/scripts/pve-live.sh +0 -0
- package/scripts/resy.sh +0 -0
- package/scripts/userexist.sh +0 -0
- package/lib/commands/bro.d.ts +0 -14
- package/lib/commands/bro.js +0 -31
- package/lib/commands/tools/locales.d.ts +0 -13
- package/lib/commands/tools/locales.js +0 -40
- package/lib/interfaces/i-costume.d.ts +0 -27
- package/lib/interfaces/i-costume.js +0 -2
package/lib/classes/utils.js
CHANGED
|
@@ -16,9 +16,8 @@ const os_1 = tslib_1.__importDefault(require("os"));
|
|
|
16
16
|
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
17
17
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
18
18
|
const pacman_1 = tslib_1.__importDefault(require("./pacman"));
|
|
19
|
+
// import { green, whiteBright } from 'chalk'
|
|
19
20
|
const child_process_1 = require("child_process");
|
|
20
|
-
// libraries
|
|
21
|
-
const utils_1 = require("../lib/utils");
|
|
22
21
|
const pjson = require('../../package.json');
|
|
23
22
|
/**
|
|
24
23
|
* Utils: general porpourse utils
|
|
@@ -151,8 +150,11 @@ class Utils {
|
|
|
151
150
|
* Return the primary user's name
|
|
152
151
|
*/
|
|
153
152
|
static getPrimaryUser() {
|
|
154
|
-
//
|
|
155
|
-
|
|
153
|
+
// const primaryUser = shx.exec('echo $SUDO_USER', { silent: true }).stdout.trim()
|
|
154
|
+
let primaryUser = '';
|
|
155
|
+
if (process.env.SUDO_USER !== undefined) {
|
|
156
|
+
primaryUser = process.env.SUDO_USER;
|
|
157
|
+
}
|
|
156
158
|
if (primaryUser === '') {
|
|
157
159
|
console.log('Cannot find your user name. Log as normal user and run: $sudo eggs [COMMAND]');
|
|
158
160
|
process.exit(1);
|
|
@@ -726,15 +728,15 @@ class Utils {
|
|
|
726
728
|
/**
|
|
727
729
|
*
|
|
728
730
|
*/
|
|
729
|
-
static async pressKeyToExit(warming = 'Process will end',
|
|
731
|
+
static async pressKeyToExit(warming = 'Process will end', stopProcess = true) {
|
|
730
732
|
Utils.warning(warming);
|
|
731
733
|
let msg = 'Press a key to exit...';
|
|
732
|
-
if (
|
|
734
|
+
if (stopProcess) {
|
|
733
735
|
msg = 'Press a key to continue...';
|
|
734
736
|
}
|
|
735
737
|
console.log(msg);
|
|
736
738
|
const pressKeyToExit = (0, child_process_1.spawnSync)('read _ ', { shell: true, stdio: [0, 1, 2] });
|
|
737
|
-
if (!
|
|
739
|
+
if (!stopProcess) {
|
|
738
740
|
process.exit(0);
|
|
739
741
|
}
|
|
740
742
|
}
|
|
@@ -785,10 +787,12 @@ class Utils {
|
|
|
785
787
|
static async wardrobe() {
|
|
786
788
|
let wardrobe = `${os_1.default.homedir()}/.wardrobe`;
|
|
787
789
|
if (Utils.isRoot()) {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
790
|
+
wardrobe = `/home/${Utils.getPrimaryUser()}/.wardrobe`;
|
|
791
|
+
// let result = await exec(`echo $(logname)`, { echo: false, capture: true })
|
|
792
|
+
// let result = await exec(`echo $(SUDO_USER)`, { echo: false, capture: true })
|
|
793
|
+
//if (result.code === 0) {
|
|
794
|
+
// wardrobe = `/home/${result.data.trim()}/.wardrobe`
|
|
795
|
+
//}
|
|
792
796
|
}
|
|
793
797
|
return wardrobe;
|
|
794
798
|
}
|
package/lib/classes/xdg.js
CHANGED
|
@@ -78,23 +78,33 @@ class Xdg {
|
|
|
78
78
|
*/
|
|
79
79
|
static async autologin(olduser, newuser, chroot = '/') {
|
|
80
80
|
if (pacman_1.default.isInstalledGui()) {
|
|
81
|
-
|
|
81
|
+
/**
|
|
82
|
+
* SLIM
|
|
83
|
+
*/
|
|
82
84
|
if (pacman_1.default.packageIsInstalled('slim')) {
|
|
83
85
|
shelljs_1.default.sed('-i', 'auto_login no', 'auto_login yes', `${chroot}/etc/slim.conf`);
|
|
84
86
|
shelljs_1.default.sed('-i', `default_user ${olduser}`, `default_user ${newuser}`, `${chroot}/etc/slim.conf`);
|
|
85
87
|
}
|
|
86
|
-
|
|
88
|
+
/**
|
|
89
|
+
* LIGHTDM
|
|
90
|
+
*/
|
|
87
91
|
if (pacman_1.default.packageIsInstalled('lightdm')) {
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
let destLightdmConf = `${chroot}/etc/lightdm/lightdm.conf`;
|
|
93
|
+
if (node_fs_1.default.existsSync(`${chroot}/etc/lightdm/lightdm.conf.d/lightdm-autologin-greeter.conf`)) {
|
|
94
|
+
destLightdmConf = `${chroot}/etc/lightdm/lightdm.conf.d/lightdm-autologin-greeter.conf`;
|
|
95
|
+
}
|
|
96
|
+
if (node_fs_1.default.existsSync(destLightdmConf)) {
|
|
97
|
+
shelljs_1.default.sed('-i', `autologin-user=${olduser}`, `autologin-user=${newuser}`, destLightdmConf);
|
|
90
98
|
}
|
|
91
99
|
else {
|
|
92
|
-
const autologin =
|
|
100
|
+
const autologin = destLightdmConf;
|
|
93
101
|
const content = `[Seat:*]\nautologin-user=${newuser}`;
|
|
94
102
|
node_fs_1.default.writeFileSync(autologin, content, 'utf-8');
|
|
95
103
|
}
|
|
96
104
|
}
|
|
97
|
-
|
|
105
|
+
/**
|
|
106
|
+
* SDDM
|
|
107
|
+
*/
|
|
98
108
|
if (pacman_1.default.packageIsInstalled('sddm')) {
|
|
99
109
|
let sddmChanged = false;
|
|
100
110
|
// Cerco configurazione nel file sddm.conf
|
|
@@ -119,20 +129,30 @@ class Xdg {
|
|
|
119
129
|
}
|
|
120
130
|
}
|
|
121
131
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
132
|
+
/**
|
|
133
|
+
* GDM/GDM3
|
|
134
|
+
*/
|
|
135
|
+
if (pacman_1.default.packageIsInstalled('gdm') || pacman_1.default.packageIsInstalled('gdm3')) {
|
|
136
|
+
let gdmConf = `${chroot}/etc/gdm3`;
|
|
137
|
+
if (pacman_1.default.packageIsInstalled('gdm3')) {
|
|
138
|
+
gdmConf = `${chroot}/etc/gdm3`;
|
|
128
139
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
if (node_fs_1.default.existsSync(
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
else if (pacman_1.default.packageIsInstalled('gdm')) {
|
|
141
|
+
gdmConf = `${chroot}/etc/gdm`;
|
|
142
|
+
}
|
|
143
|
+
if (node_fs_1.default.existsSync(`${chroot}/etc/gdm3/custom.conf`)) {
|
|
144
|
+
gdmConf += '/custom.conf';
|
|
145
|
+
}
|
|
146
|
+
else if (node_fs_1.default.existsSync(`${chroot}/etc/gdm3/daemon.conf`)) {
|
|
147
|
+
gdmConf += '/daemon.conf';
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
gdmConf = `${chroot}/etc/gdm3/custom.conf`;
|
|
135
151
|
}
|
|
152
|
+
const content = `[daemon]\nAutomaticLoginEnable=true\nAutomaticLogin=${newuser}\n`;
|
|
153
|
+
utils_1.default.write(gdmConf, content);
|
|
154
|
+
// shx.sed('-i', 'AutomaticLoginEnable=False', 'AutomaticLoginEnable=True', gdmConf)
|
|
155
|
+
// shx.sed('-i', `AutomaticLogin=${olduser}`, `AutomaticLogin=${newuser}`, gdmConf)
|
|
136
156
|
}
|
|
137
157
|
}
|
|
138
158
|
}
|
package/lib/commands/adapt.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
2
|
export default class Adapt extends Command {
|
|
3
3
|
static description: string;
|
|
4
|
-
static aliases: string[];
|
|
5
4
|
static flags: {
|
|
6
5
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
6
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
package/lib/commands/adapt.js
CHANGED
|
@@ -23,7 +23,7 @@ class Adapt extends core_1.Command {
|
|
|
23
23
|
}
|
|
24
24
|
exports.default = Adapt;
|
|
25
25
|
Adapt.description = 'adapt monitor resolution for VM only';
|
|
26
|
-
|
|
26
|
+
// static aliases = ['adjust']
|
|
27
27
|
Adapt.flags = {
|
|
28
28
|
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
29
29
|
help: core_1.Flags.help({ char: 'h' })
|
package/lib/commands/analyze.js
CHANGED
|
@@ -8,10 +8,10 @@ const tslib_1 = require("tslib");
|
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
|
-
const
|
|
11
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
12
12
|
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
13
13
|
const promises_1 = require("fs/promises");
|
|
14
|
-
const
|
|
14
|
+
const fs_2 = require("fs");
|
|
15
15
|
const users_1 = tslib_1.__importDefault(require("../classes/users"));
|
|
16
16
|
class Analyze extends core_1.Command {
|
|
17
17
|
constructor() {
|
|
@@ -40,6 +40,9 @@ class Analyze extends core_1.Command {
|
|
|
40
40
|
}
|
|
41
41
|
console.log(`Total\t\t\t\t\tSize: ${utils_1.default.formatBytes(totalSize)} \tBytes: ${totalSize}`);
|
|
42
42
|
}
|
|
43
|
+
else {
|
|
44
|
+
utils_1.default.useRoot(this.id);
|
|
45
|
+
}
|
|
43
46
|
}
|
|
44
47
|
/**
|
|
45
48
|
* fill
|
|
@@ -47,8 +50,8 @@ class Analyze extends core_1.Command {
|
|
|
47
50
|
async fill() {
|
|
48
51
|
try {
|
|
49
52
|
const usersArray = [];
|
|
50
|
-
await (0, promises_1.access)('/etc/passwd',
|
|
51
|
-
const passwd =
|
|
53
|
+
await (0, promises_1.access)('/etc/passwd', fs_2.constants.R_OK | fs_2.constants.W_OK);
|
|
54
|
+
const passwd = fs_1.default.readFileSync('/etc/passwd', 'utf-8').split('\n');
|
|
52
55
|
for (let i = 0; i < passwd.length; i++) {
|
|
53
56
|
var line = passwd[i].split(':');
|
|
54
57
|
const users = new users_1.default(line[0], line[1], line[2], line[3], line[4], line[5], line[6]);
|
|
@@ -66,7 +69,7 @@ class Analyze extends core_1.Command {
|
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
exports.default = Analyze;
|
|
69
|
-
Analyze.description = 'analyze
|
|
72
|
+
Analyze.description = 'analyze for syncto';
|
|
70
73
|
Analyze.flags = {
|
|
71
74
|
help: core_1.Flags.help({ char: 'h' }),
|
|
72
75
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
@@ -17,7 +17,7 @@ export default class Calamares extends Command {
|
|
|
17
17
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
18
18
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
19
|
install: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
-
|
|
20
|
+
release: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
21
21
|
remove: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
22
22
|
theme: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
23
23
|
};
|
|
@@ -35,9 +35,9 @@ class Calamares extends core_1.Command {
|
|
|
35
35
|
if (flags.install) {
|
|
36
36
|
install = true;
|
|
37
37
|
}
|
|
38
|
-
let
|
|
39
|
-
if (flags.
|
|
40
|
-
|
|
38
|
+
let release = false;
|
|
39
|
+
if (flags.release) {
|
|
40
|
+
release = true;
|
|
41
41
|
}
|
|
42
42
|
let theme = 'eggs';
|
|
43
43
|
if (flags.theme !== undefined) {
|
|
@@ -71,7 +71,7 @@ class Calamares extends core_1.Command {
|
|
|
71
71
|
utils_1.default.warning('Configuring installer');
|
|
72
72
|
await this.settings.loadRemix(this.settings.config.snapshot_basename, theme);
|
|
73
73
|
this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, verbose);
|
|
74
|
-
await this.incubator.config(
|
|
74
|
+
await this.incubator.config(release);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -92,7 +92,7 @@ class Calamares extends core_1.Command {
|
|
|
92
92
|
utils_1.default.warning('Configuring krill');
|
|
93
93
|
await this.settings.loadRemix(this.settings.config.snapshot_basename, theme);
|
|
94
94
|
this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, verbose);
|
|
95
|
-
await this.incubator.config(
|
|
95
|
+
await this.incubator.config(release);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
@@ -103,8 +103,8 @@ Calamares.flags = {
|
|
|
103
103
|
help: core_1.Flags.help({ char: 'h' }),
|
|
104
104
|
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
105
105
|
install: core_1.Flags.boolean({ char: 'i', description: "install calamares and it's dependencies" }),
|
|
106
|
-
|
|
107
|
-
remove: core_1.Flags.boolean({
|
|
106
|
+
release: core_1.Flags.boolean({ char: 'r', description: "release: remove calamares and all it's dependencies after the installation" }),
|
|
107
|
+
remove: core_1.Flags.boolean({ description: "remove calamares and it's dependencies" }),
|
|
108
108
|
theme: core_1.Flags.string({ description: 'theme/branding for eggs and calamares' })
|
|
109
109
|
};
|
|
110
110
|
Calamares.examples = ["~$ sudo eggs calamares \ncreate/renew calamares configuration's files\n", "~$ sudo eggs calamares -i \ninstall calamares and create it's configuration's files\n"];
|
package/lib/commands/config.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import { IInstall } from '../interfaces';
|
|
|
11
11
|
*/
|
|
12
12
|
export default class Config extends Command {
|
|
13
13
|
static description: string;
|
|
14
|
-
static aliases: string[];
|
|
15
14
|
static flags: {
|
|
16
15
|
nointeractive: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
16
|
clean: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
package/lib/commands/config.js
CHANGED
|
@@ -58,6 +58,9 @@ class Config extends core_1.Command {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
+
else {
|
|
62
|
+
utils_1.default.useRoot(this.id);
|
|
63
|
+
}
|
|
61
64
|
}
|
|
62
65
|
/**
|
|
63
66
|
*
|
|
@@ -202,7 +205,7 @@ class Config extends core_1.Command {
|
|
|
202
205
|
}
|
|
203
206
|
exports.default = Config;
|
|
204
207
|
Config.description = 'Configure and install prerequisites deb packages to run it';
|
|
205
|
-
|
|
208
|
+
// static aliases = ['prerequisites']
|
|
206
209
|
Config.flags = {
|
|
207
210
|
nointeractive: core_1.Flags.boolean({ char: 'n', description: 'assume yes' }),
|
|
208
211
|
clean: core_1.Flags.boolean({ char: 'c', description: 'remove old configuration before to create new one' }),
|
package/lib/commands/dad.js
CHANGED
|
@@ -10,12 +10,12 @@ const tslib_1 = require("tslib");
|
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
11
|
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
12
12
|
const daddy_1 = tslib_1.__importDefault(require("../classes/daddy"));
|
|
13
|
-
const
|
|
13
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
14
14
|
const utils_2 = require("../lib/utils");
|
|
15
15
|
class Dad extends core_1.Command {
|
|
16
16
|
async run() {
|
|
17
17
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
18
|
-
console.log(
|
|
18
|
+
console.log(chalk_1.default.cyan('Daddy, what else did you leave for me?'));
|
|
19
19
|
const { flags } = await this.parse(Dad);
|
|
20
20
|
if (utils_1.default.isRoot(this.id)) {
|
|
21
21
|
if (flags.clean || flags.default) {
|
|
@@ -24,6 +24,9 @@ class Dad extends core_1.Command {
|
|
|
24
24
|
const daddy = new daddy_1.default();
|
|
25
25
|
daddy.helpMe(flags.default, flags.verbose);
|
|
26
26
|
}
|
|
27
|
+
else {
|
|
28
|
+
utils_1.default.useRoot(this.id);
|
|
29
|
+
}
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
exports.default = Dad;
|
package/lib/commands/install.js
CHANGED
|
@@ -41,7 +41,7 @@ class Install extends core_1.Command {
|
|
|
41
41
|
if (flags.verbose) {
|
|
42
42
|
verbose = true;
|
|
43
43
|
}
|
|
44
|
-
if (utils_1.default.isRoot(
|
|
44
|
+
if (utils_1.default.isRoot()) {
|
|
45
45
|
if (utils_1.default.isLive()) {
|
|
46
46
|
if (pacman_1.default.packageIsInstalled('calamares') && pacman_1.default.isRunningGui() && !cli) {
|
|
47
47
|
shelljs_1.default.exec('/usb/sbin/install-debian');
|
|
@@ -55,9 +55,12 @@ class Install extends core_1.Command {
|
|
|
55
55
|
await krill.prepare(crypted, pve, verbose);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
+
else {
|
|
59
|
+
utils_1.default.warning('You are in an installed system!');
|
|
60
|
+
}
|
|
58
61
|
}
|
|
59
62
|
else {
|
|
60
|
-
utils_1.default.
|
|
63
|
+
utils_1.default.useRoot(this.id);
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
}
|
|
@@ -70,5 +73,5 @@ Install.flags = {
|
|
|
70
73
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
71
74
|
};
|
|
72
75
|
Install.description = 'command-line system installer - the egg became a penguin!';
|
|
73
|
-
|
|
76
|
+
// static aliases = ['krill']
|
|
74
77
|
Install.examples = ['$ eggs install\nInstall the system using GUI or CLI installer\n'];
|
package/lib/commands/kill.js
CHANGED
|
@@ -26,7 +26,7 @@ class Kill extends core_1.Command {
|
|
|
26
26
|
verbose = true;
|
|
27
27
|
}
|
|
28
28
|
const echo = utils_1.default.setEcho(verbose);
|
|
29
|
-
if (utils_1.default.isRoot(
|
|
29
|
+
if (utils_1.default.isRoot()) {
|
|
30
30
|
// Utils.warning('Cleaning the nest...')
|
|
31
31
|
const settings = new settings_1.default();
|
|
32
32
|
await settings.load();
|
|
@@ -36,6 +36,9 @@ class Kill extends core_1.Command {
|
|
|
36
36
|
await (0, utils_2.exec)(`rm ${settings.config.snapshot_dir} -rf`, echo);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
else {
|
|
40
|
+
utils_1.default.useRoot(this.id);
|
|
41
|
+
}
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
exports.default = Kill;
|
package/lib/commands/produce.js
CHANGED
|
@@ -23,7 +23,7 @@ class Produce extends core_1.Command {
|
|
|
23
23
|
async run() {
|
|
24
24
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
25
25
|
const { flags } = await this.parse(Produce);
|
|
26
|
-
if (utils_1.default.isRoot(
|
|
26
|
+
if (utils_1.default.isRoot()) {
|
|
27
27
|
/**
|
|
28
28
|
* ADDONS dei vendors
|
|
29
29
|
* Fino a 3
|
|
@@ -132,6 +132,9 @@ class Produce extends core_1.Command {
|
|
|
132
132
|
ovary.finished(scriptOnly);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
+
else {
|
|
136
|
+
utils_1.default.useRoot(this.id);
|
|
137
|
+
}
|
|
135
138
|
}
|
|
136
139
|
}
|
|
137
140
|
exports.default = Produce;
|
|
@@ -151,7 +154,7 @@ Produce.flags = {
|
|
|
151
154
|
release: core_1.Flags.boolean({ description: 'release: configure GUI installer to remove eggs and calamares after installation' })
|
|
152
155
|
};
|
|
153
156
|
Produce.description = 'produce a live image from your system whithout your data';
|
|
154
|
-
|
|
157
|
+
// static aliases = ['spawn', 'lay']
|
|
155
158
|
Produce.examples = [
|
|
156
159
|
'$ sudo eggs produce \nproduce an ISO called [hostname]-[arch]-YYYY-MM-DD_HHMM.iso, compressed xz (standard compression).\nIf hostname=ugo and arch=i386 ugo-x86-2020-08-25_1215.iso\n',
|
|
157
160
|
'$ sudo eggs produce -v\nsame as previuos, but with --verbose output\n',
|
package/lib/commands/remove.js
CHANGED
|
@@ -24,7 +24,6 @@ export default class Syncfrom extends Command {
|
|
|
24
24
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
25
25
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
26
26
|
};
|
|
27
|
-
static aliases: string[];
|
|
28
27
|
static examples: string[];
|
|
29
28
|
run(): Promise<void>;
|
|
30
29
|
/**
|
package/lib/commands/syncfrom.js
CHANGED
|
@@ -8,8 +8,8 @@ const tslib_1 = require("tslib");
|
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
12
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
13
13
|
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
14
14
|
const utils_2 = require("../lib/utils");
|
|
15
15
|
/**
|
|
@@ -48,7 +48,7 @@ class Syncfrom extends core_1.Command {
|
|
|
48
48
|
utils_1.default.pressKeyToExit(`Argument --rootdir is mandatory, when running live! Process will terminate`);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
if (utils_1.default.isRoot(
|
|
51
|
+
if (utils_1.default.isRoot()) {
|
|
52
52
|
if (fileVolume === '') {
|
|
53
53
|
fileVolume = '/run/live/medium/live/luks-eggs-backup';
|
|
54
54
|
}
|
|
@@ -56,8 +56,8 @@ class Syncfrom extends core_1.Command {
|
|
|
56
56
|
/**
|
|
57
57
|
* WORKING FROM INSTALLED
|
|
58
58
|
*/
|
|
59
|
-
if (
|
|
60
|
-
this.luksName =
|
|
59
|
+
if (fs_1.default.existsSync(fileVolume)) {
|
|
60
|
+
this.luksName = path_1.default.basename(fileVolume);
|
|
61
61
|
this.luksFile = fileVolume;
|
|
62
62
|
this.luksDevice = `/dev/mapper/${this.luksName}`;
|
|
63
63
|
this.luksMountpoint = '/tmp/eggs-backup';
|
|
@@ -74,20 +74,23 @@ class Syncfrom extends core_1.Command {
|
|
|
74
74
|
/**
|
|
75
75
|
* WORKING FROM LIVE
|
|
76
76
|
*/
|
|
77
|
-
this.luksName =
|
|
77
|
+
this.luksName = path_1.default.basename(fileVolume);
|
|
78
78
|
this.luksFile = fileVolume;
|
|
79
79
|
this.luksDevice = `/dev/mapper/${this.luksName}`;
|
|
80
80
|
this.luksMountpoint = '/tmp/eggs-backup';
|
|
81
81
|
await this.restorePrivateData();
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
else {
|
|
85
|
+
utils_1.default.useRoot(this.id);
|
|
86
|
+
}
|
|
84
87
|
}
|
|
85
88
|
/**
|
|
86
89
|
*
|
|
87
90
|
* @param verbose
|
|
88
91
|
*/
|
|
89
92
|
async restorePrivateData(destDelete = false) {
|
|
90
|
-
if (!
|
|
93
|
+
if (!fs_1.default.existsSync(this.luksMountpoint)) {
|
|
91
94
|
await (0, utils_2.exec)(`mkdir ${this.luksMountpoint}`, this.echo);
|
|
92
95
|
}
|
|
93
96
|
await this.luksOpen();
|
|
@@ -117,14 +120,14 @@ class Syncfrom extends core_1.Command {
|
|
|
117
120
|
*
|
|
118
121
|
*/
|
|
119
122
|
async luksOpen() {
|
|
120
|
-
if (!
|
|
123
|
+
if (!fs_1.default.existsSync(this.luksDevice)) {
|
|
121
124
|
utils_1.default.warning(`LUKS open volume: ${this.luksName}`);
|
|
122
125
|
await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${this.luksFile} ${this.luksName}`, utils_1.default.setEcho(true));
|
|
123
126
|
}
|
|
124
127
|
else {
|
|
125
128
|
utils_1.default.warning(`LUKS volume: ${this.luksName} already open`);
|
|
126
129
|
}
|
|
127
|
-
if (!
|
|
130
|
+
if (!fs_1.default.existsSync(this.luksMountpoint)) {
|
|
128
131
|
await (0, utils_2.exec)(`mkdir -p ${this.luksMountpoint}`, this.echo);
|
|
129
132
|
}
|
|
130
133
|
if (!utils_1.default.isMountpoint(this.luksMountpoint)) {
|
|
@@ -142,7 +145,7 @@ class Syncfrom extends core_1.Command {
|
|
|
142
145
|
if (utils_1.default.isMountpoint(this.luksMountpoint)) {
|
|
143
146
|
await (0, utils_2.exec)(`umount ${this.luksMountpoint}`, this.echo);
|
|
144
147
|
}
|
|
145
|
-
if (
|
|
148
|
+
if (fs_1.default.existsSync(this.luksDevice)) {
|
|
146
149
|
utils_1.default.warning(`LUKS close volume: ${this.luksName}`);
|
|
147
150
|
await (0, utils_2.exec)(`cryptsetup luksClose ${this.luksName}`, this.echo);
|
|
148
151
|
}
|
|
@@ -159,5 +162,5 @@ Syncfrom.flags = {
|
|
|
159
162
|
help: core_1.Flags.help({ char: 'h' }),
|
|
160
163
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
161
164
|
};
|
|
162
|
-
|
|
165
|
+
// static aliases = ['restore']
|
|
163
166
|
Syncfrom.examples = ['$ sudo eggs restore'];
|
package/lib/commands/syncto.d.ts
CHANGED
package/lib/commands/syncto.js
CHANGED
|
@@ -24,13 +24,13 @@ const tslib_1 = require("tslib");
|
|
|
24
24
|
* this should not be available by default
|
|
25
25
|
*/
|
|
26
26
|
const core_1 = require("@oclif/core");
|
|
27
|
-
const
|
|
28
|
-
const
|
|
27
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
28
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
29
29
|
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
30
30
|
const utils_2 = require("../lib/utils");
|
|
31
31
|
// backup
|
|
32
32
|
const promises_1 = require("fs/promises");
|
|
33
|
-
const
|
|
33
|
+
const fs_2 = require("fs");
|
|
34
34
|
const users_1 = tslib_1.__importDefault(require("../classes/users"));
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
@@ -62,29 +62,32 @@ class Syncto extends core_1.Command {
|
|
|
62
62
|
if (flags.delete) {
|
|
63
63
|
destDelete = true;
|
|
64
64
|
}
|
|
65
|
-
if (utils_1.default.isRoot(
|
|
65
|
+
if (utils_1.default.isRoot()) {
|
|
66
66
|
/**
|
|
67
67
|
* restore con file
|
|
68
68
|
*/
|
|
69
69
|
if (fileVolume === '') {
|
|
70
70
|
fileVolume = '/tmp/luks-eggs-backup';
|
|
71
71
|
}
|
|
72
|
-
this.luksName =
|
|
72
|
+
this.luksName = path_1.default.basename(fileVolume);
|
|
73
73
|
this.luksFile = fileVolume;
|
|
74
74
|
this.luksDevice = `/dev/mapper/${this.luksName}`;
|
|
75
75
|
this.luksMountpoint = '/tmp/eggs-backup';
|
|
76
|
-
if (!
|
|
76
|
+
if (!fs_1.default.existsSync(fileVolume)) {
|
|
77
77
|
await this.luksCreate();
|
|
78
78
|
}
|
|
79
79
|
else {
|
|
80
80
|
utils_1.default.warning(`LUKS volume: ${this.luksFile} exist, don't need create`);
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
82
|
+
if (fs_1.default.existsSync(fileVolume)) {
|
|
83
83
|
await this.luksOpen();
|
|
84
84
|
await this.backup(destDelete);
|
|
85
85
|
await this.luksClose();
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
+
else {
|
|
89
|
+
utils_1.default.useRoot(this.id);
|
|
90
|
+
}
|
|
88
91
|
}
|
|
89
92
|
/**
|
|
90
93
|
*
|
|
@@ -98,7 +101,7 @@ class Syncto extends core_1.Command {
|
|
|
98
101
|
const cmds = [];
|
|
99
102
|
for (let i = 0; i < usersArray.length; i++) {
|
|
100
103
|
if (usersArray[i].saveIt) {
|
|
101
|
-
if (
|
|
104
|
+
if (fs_1.default.existsSync(usersArray[i].home)) {
|
|
102
105
|
await (0, utils_2.exec)(`mkdir -p ${this.luksMountpoint}/ROOT${usersArray[i].home}`, this.echo);
|
|
103
106
|
const source = usersArray[i].home;
|
|
104
107
|
let dest = this.luksMountpoint + '/ROOT' + usersArray[i].home;
|
|
@@ -121,8 +124,8 @@ class Syncto extends core_1.Command {
|
|
|
121
124
|
*/
|
|
122
125
|
async usersFill() {
|
|
123
126
|
const usersArray = [];
|
|
124
|
-
await (0, promises_1.access)('/etc/passwd',
|
|
125
|
-
const passwd =
|
|
127
|
+
await (0, promises_1.access)('/etc/passwd', fs_2.constants.R_OK | fs_2.constants.W_OK);
|
|
128
|
+
const passwd = fs_1.default.readFileSync('/etc/passwd', 'utf-8').split('\n');
|
|
126
129
|
for (let i = 0; i < passwd.length; i++) {
|
|
127
130
|
var line = passwd[i].split(':');
|
|
128
131
|
const users = new users_1.default(line[0], line[1], line[2], line[3], line[4], line[5], line[6]);
|
|
@@ -199,14 +202,14 @@ class Syncto extends core_1.Command {
|
|
|
199
202
|
*
|
|
200
203
|
*/
|
|
201
204
|
async luksOpen() {
|
|
202
|
-
if (!
|
|
205
|
+
if (!fs_1.default.existsSync(this.luksDevice)) {
|
|
203
206
|
utils_1.default.warning(`LUKS open volume: ${this.luksName}`);
|
|
204
207
|
await (0, utils_2.exec)(`cryptsetup luksOpen --type luks2 ${this.luksFile} ${this.luksName}`, utils_1.default.setEcho(true));
|
|
205
208
|
}
|
|
206
209
|
else {
|
|
207
210
|
utils_1.default.warning(`LUKS volume: ${this.luksName} already open`);
|
|
208
211
|
}
|
|
209
|
-
if (!
|
|
212
|
+
if (!fs_1.default.existsSync(this.luksMountpoint)) {
|
|
210
213
|
await (0, utils_2.exec)(`mkdir -p ${this.luksMountpoint}`, this.echo);
|
|
211
214
|
}
|
|
212
215
|
if (!utils_1.default.isMountpoint(this.luksMountpoint)) {
|
|
@@ -224,7 +227,7 @@ class Syncto extends core_1.Command {
|
|
|
224
227
|
if (utils_1.default.isMountpoint(this.luksMountpoint)) {
|
|
225
228
|
await (0, utils_2.exec)(`umount ${this.luksMountpoint}`, this.echo);
|
|
226
229
|
}
|
|
227
|
-
if (
|
|
230
|
+
if (fs_1.default.existsSync(this.luksDevice)) {
|
|
228
231
|
utils_1.default.warning(`LUKS close volume: ${this.luksName}`);
|
|
229
232
|
await (0, utils_2.exec)(`cryptsetup luksClose ${this.luksName}`, this.echo);
|
|
230
233
|
}
|
|
@@ -238,5 +241,5 @@ Syncto.flags = {
|
|
|
238
241
|
help: core_1.Flags.help({ char: 'h' }),
|
|
239
242
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
240
243
|
};
|
|
241
|
-
|
|
244
|
+
// static aliases = ['backup']
|
|
242
245
|
Syncto.examples = ['$ sudo eggs syncto'];
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import { Command } from '@oclif/core';
|
|
8
8
|
export default class Clean extends Command {
|
|
9
9
|
static description: string;
|
|
10
|
-
static aliases: string[];
|
|
11
10
|
static flags: {
|
|
12
11
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
13
12
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|