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
|
@@ -18,15 +18,20 @@ class Clean extends core_1.Command {
|
|
|
18
18
|
if (flags.verbose) {
|
|
19
19
|
verbose = true;
|
|
20
20
|
}
|
|
21
|
-
if (utils_1.default.isRoot()
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
if (utils_1.default.isRoot()) {
|
|
22
|
+
if (await utils_1.default.customConfirm('Select yes to continue...')) {
|
|
23
|
+
const bleach = new bleach_1.default();
|
|
24
|
+
bleach.clean(verbose);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
utils_1.default.useRoot(this.id);
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
31
|
}
|
|
27
32
|
exports.default = Clean;
|
|
28
33
|
Clean.description = 'clean system log, apt, etc';
|
|
29
|
-
|
|
34
|
+
// static aliases = ['clean']
|
|
30
35
|
Clean.flags = {
|
|
31
36
|
help: core_1.Flags.help({ char: 'h' }),
|
|
32
37
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
@@ -9,7 +9,7 @@ const tslib_1 = require("tslib");
|
|
|
9
9
|
*/
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
11
|
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
12
|
-
const
|
|
12
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
13
13
|
const xdg_1 = tslib_1.__importDefault(require("../../classes/xdg"));
|
|
14
14
|
class Skel extends core_1.Command {
|
|
15
15
|
async run() {
|
|
@@ -23,7 +23,7 @@ class Skel extends core_1.Command {
|
|
|
23
23
|
user = flags.user ? flags.user : utils_1.default.getPrimaryUser();
|
|
24
24
|
utils_1.default.warning(`user: ${user}`);
|
|
25
25
|
const homeSource = `/home/${user}`;
|
|
26
|
-
if (!
|
|
26
|
+
if (!fs_1.default.existsSync(homeSource)) {
|
|
27
27
|
utils_1.default.error(`User ${user} not exist or not exist a proper home`);
|
|
28
28
|
utils_1.default.warning('terminate');
|
|
29
29
|
process.exit(0);
|
|
@@ -32,11 +32,14 @@ class Skel extends core_1.Command {
|
|
|
32
32
|
utils_1.default.titles('skel');
|
|
33
33
|
xdg_1.default.skel(user, verbose);
|
|
34
34
|
}
|
|
35
|
+
else {
|
|
36
|
+
utils_1.default.useRoot(this.id);
|
|
37
|
+
}
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
exports.default = Skel;
|
|
38
41
|
Skel.description = 'update skel from home configuration';
|
|
39
|
-
|
|
42
|
+
// static aliases = ['skel']
|
|
40
43
|
Skel.examples = [
|
|
41
44
|
`$ eggs skel --user mauro
|
|
42
45
|
desktop configuration of user mauro will get used as default`
|
|
@@ -9,7 +9,6 @@ export default class ToolsStat extends Command {
|
|
|
9
9
|
month: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
year: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
};
|
|
12
|
-
static aliases: string[];
|
|
13
12
|
run(): Promise<void>;
|
|
14
13
|
show(start: string, end: string, type?: string): Promise<void>;
|
|
15
14
|
}
|
|
@@ -12,6 +12,7 @@ const agent = new node_https_1.default.Agent({
|
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
class ToolsStat extends core_1.Command {
|
|
15
|
+
//static aliases = ['stat']
|
|
15
16
|
async run() {
|
|
16
17
|
const { args, flags } = await this.parse(ToolsStat);
|
|
17
18
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
@@ -55,4 +56,3 @@ ToolsStat.flags = {
|
|
|
55
56
|
month: core_1.Flags.boolean({ char: 'm', description: 'current month' }),
|
|
56
57
|
year: core_1.Flags.boolean({ char: 'y', description: 'current year' })
|
|
57
58
|
};
|
|
58
|
-
ToolsStat.aliases = ['stat'];
|
package/lib/commands/update.js
CHANGED
|
@@ -20,8 +20,8 @@ class Update extends core_1.Command {
|
|
|
20
20
|
async run() {
|
|
21
21
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
22
22
|
const { flags } = await this.parse(Update);
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
24
|
+
if (utils_1.default.isRoot()) {
|
|
25
25
|
if (utils_1.default.isSources()) {
|
|
26
26
|
utils_1.default.warning(`You are on penguins-eggs v. ${utils_1.default.getPackageVersion()} from sources`);
|
|
27
27
|
}
|
|
@@ -30,6 +30,9 @@ class Update extends core_1.Command {
|
|
|
30
30
|
}
|
|
31
31
|
await this.chooseUpdate();
|
|
32
32
|
}
|
|
33
|
+
else {
|
|
34
|
+
utils_1.default.useRoot(this.id);
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
/**
|
|
35
38
|
* Altrimenti, seleziona il tipo di
|
|
@@ -7,6 +7,9 @@ const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
|
7
7
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
8
8
|
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
9
9
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
10
13
|
class Ironing extends core_1.Command {
|
|
11
14
|
async run() {
|
|
12
15
|
const { args, flags } = await this.parse(Ironing);
|
|
@@ -50,8 +53,8 @@ class Ironing extends core_1.Command {
|
|
|
50
53
|
const orig = js_yaml_1.default.load(fs_1.default.readFileSync(tailorList, 'utf-8'));
|
|
51
54
|
let sorted = orig;
|
|
52
55
|
sorted.name = orig.name;
|
|
53
|
-
sorted.description = orig.description;
|
|
54
56
|
sorted.author = orig.author;
|
|
57
|
+
sorted.description = orig.description;
|
|
55
58
|
sorted.release = orig.release;
|
|
56
59
|
sorted.distributions = orig.distributions.sort();
|
|
57
60
|
if (orig.sequence !== undefined) {
|
|
@@ -69,6 +72,9 @@ class Ironing extends core_1.Command {
|
|
|
69
72
|
if (orig.sequence.preinst !== undefined) {
|
|
70
73
|
sorted.sequence.preinst = orig.sequence.preinst;
|
|
71
74
|
}
|
|
75
|
+
if (orig.sequence.dependencies !== undefined) {
|
|
76
|
+
sorted.sequence.dependencies = orig.sequence.dependencies.sort();
|
|
77
|
+
}
|
|
72
78
|
if (orig.sequence.packages !== undefined) {
|
|
73
79
|
if (Array.isArray(orig.sequence.packages)) {
|
|
74
80
|
sorted.sequence.packages = orig.sequence.packages.sort();
|
|
@@ -79,6 +85,16 @@ class Ironing extends core_1.Command {
|
|
|
79
85
|
sorted.sequence.packages_no_install_recommends = orig.sequence.packages_no_install_recommends.sort();
|
|
80
86
|
}
|
|
81
87
|
}
|
|
88
|
+
if (orig.sequence.try_packages !== undefined) {
|
|
89
|
+
if (Array.isArray(orig.sequence.try_packages)) {
|
|
90
|
+
sorted.sequence.try_packages = orig.sequence.try_packages.sort();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (orig.sequence.try_packages_no_install_recommends !== undefined) {
|
|
94
|
+
if (Array.isArray(orig.sequence.try_packages_no_install_recommends)) {
|
|
95
|
+
sorted.sequence.try_packages_no_install_recommends = orig.sequence.try_packages_no_install_recommends.sort();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
82
98
|
if (orig.sequence.debs !== undefined) {
|
|
83
99
|
sorted.sequence.debs = orig.sequence.debs;
|
|
84
100
|
}
|
|
@@ -92,6 +108,11 @@ class Ironing extends core_1.Command {
|
|
|
92
108
|
sorted.sequence.accessories = orig.sequence.accessories.sort();
|
|
93
109
|
}
|
|
94
110
|
}
|
|
111
|
+
if (orig.sequence.try_accessories !== undefined) {
|
|
112
|
+
if (Array.isArray(orig.sequence.try_accessories)) {
|
|
113
|
+
sorted.sequence.try_accessories = orig.sequence.try_accessories.sort();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
95
116
|
}
|
|
96
117
|
if (orig.customize !== undefined) {
|
|
97
118
|
sorted.customize = orig.customize;
|
|
@@ -110,9 +131,6 @@ class Ironing extends core_1.Command {
|
|
|
110
131
|
}
|
|
111
132
|
const ironed = `# costume: ${costume}\n---\n` + js_yaml_1.default.dump(sorted);
|
|
112
133
|
console.log(ironed);
|
|
113
|
-
// Well be usefull to have scrolling
|
|
114
|
-
// Set scrolling margins back to default.
|
|
115
|
-
// await exec(`printf '\e[;r'`)
|
|
116
134
|
}
|
|
117
135
|
}
|
|
118
136
|
exports.Ironing = Ironing;
|
|
@@ -12,6 +12,7 @@ export default class Wear extends Command {
|
|
|
12
12
|
static flags: {
|
|
13
13
|
wardrobe: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
14
14
|
no_accessories: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
no_firmwares: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
16
|
silent: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
17
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
@@ -19,6 +19,10 @@ class Wear extends core_1.Command {
|
|
|
19
19
|
if (flags.no_accessories) {
|
|
20
20
|
no_accessories = true;
|
|
21
21
|
}
|
|
22
|
+
let no_firmwares = false;
|
|
23
|
+
if (flags.no_firmwares) {
|
|
24
|
+
no_firmwares = true;
|
|
25
|
+
}
|
|
22
26
|
let wardrobe = await utils_1.default.wardrobe();
|
|
23
27
|
if (flags.wardrobe !== undefined) {
|
|
24
28
|
wardrobe = flags.wardrobe;
|
|
@@ -56,7 +60,7 @@ class Wear extends core_1.Command {
|
|
|
56
60
|
if (await utils_1.default.customConfirm(`Prepare your costume: ${costume}? Select yes to continue...`)) {
|
|
57
61
|
if (utils_1.default.isRoot()) {
|
|
58
62
|
const tailor = new tailor_1.default(costume);
|
|
59
|
-
await tailor.prepare(verbose, no_accessories);
|
|
63
|
+
await tailor.prepare(verbose, no_accessories, no_firmwares);
|
|
60
64
|
}
|
|
61
65
|
else {
|
|
62
66
|
utils_1.default.useRoot(this.id);
|
|
@@ -72,7 +76,8 @@ Wear.description = 'wear costume/accessories from wardrobe';
|
|
|
72
76
|
Wear.args = [{ name: 'costume', description: 'costume', required: false }];
|
|
73
77
|
Wear.flags = {
|
|
74
78
|
wardrobe: core_1.Flags.string({ char: 'w', description: 'wardrobe' }),
|
|
75
|
-
no_accessories: core_1.Flags.boolean({ char: '
|
|
79
|
+
no_accessories: core_1.Flags.boolean({ char: 'a', description: 'not install accessories' }),
|
|
80
|
+
no_firmwares: core_1.Flags.boolean({ char: 'f', description: 'not install firmwares' }),
|
|
76
81
|
silent: core_1.Flags.boolean({ char: 's' }),
|
|
77
82
|
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
78
83
|
help: core_1.Flags.help({ char: 'h' })
|
|
@@ -17,11 +17,15 @@ export interface IMateria {
|
|
|
17
17
|
upgrade: boolean;
|
|
18
18
|
};
|
|
19
19
|
preinst: string[];
|
|
20
|
+
dependencies: string[];
|
|
20
21
|
packages: string[];
|
|
21
22
|
packages_no_install_recommends: string[];
|
|
23
|
+
try_packages: string[];
|
|
24
|
+
try_packages_no_install_recommends: string[];
|
|
22
25
|
debs: boolean;
|
|
23
26
|
packages_python: string[];
|
|
24
27
|
accessories: string[];
|
|
28
|
+
try_accessories: string[];
|
|
25
29
|
};
|
|
26
30
|
customize: {
|
|
27
31
|
dirs: boolean;
|
|
@@ -14,5 +14,4 @@ export { IInstaller } from './i-installer';
|
|
|
14
14
|
export { IBranding } from './i-branding';
|
|
15
15
|
export { ISettings } from './i-settings';
|
|
16
16
|
export { IPartitions } from './i-partitions';
|
|
17
|
-
export { ICostume } from './i-costume';
|
|
18
17
|
export { IMateria, IRepos } from './i-materia';
|
package/lib/lib/cli-autologin.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.msgRemove = exports.addIssue = exports.addMotd = exports.remove = exports.addAutologin = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
6
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
7
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
8
8
|
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
9
9
|
const pacman_1 = tslib_1.__importDefault(require("../classes/pacman"));
|
|
10
10
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
@@ -28,17 +28,17 @@ async function addAutologin(distro, version, user, userPasswd, rootPasswd, chroo
|
|
|
28
28
|
* Systemd
|
|
29
29
|
*/
|
|
30
30
|
const fileOverride = `${chroot}/etc/systemd/system/getty@.service.d/override.conf`;
|
|
31
|
-
const dirOverride =
|
|
32
|
-
if (
|
|
33
|
-
|
|
31
|
+
const dirOverride = path_1.default.dirname(fileOverride);
|
|
32
|
+
if (fs_1.default.existsSync(dirOverride)) {
|
|
33
|
+
shelljs_1.default.exec(`rm ${dirOverride} -rf`);
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
shelljs_1.default.exec(`mkdir ${dirOverride}`);
|
|
36
36
|
let content = '';
|
|
37
37
|
content += '[Service]' + '\n';
|
|
38
38
|
content += 'ExecStart=' + '\n';
|
|
39
39
|
content += 'ExecStart=-/sbin/agetty --noclear --autologin ' + user + ' %I $TERM' + '\n';
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
fs_1.default.writeFileSync(fileOverride, content);
|
|
41
|
+
shelljs_1.default.exec(`chmod +x ${fileOverride}`);
|
|
42
42
|
await addIssue(distro, version, user, userPasswd, rootPasswd, chroot);
|
|
43
43
|
await addMotd(distro, version, user, userPasswd, rootPasswd, chroot);
|
|
44
44
|
}
|
|
@@ -51,14 +51,14 @@ async function addAutologin(distro, version, user, userPasswd, rootPasswd, chroo
|
|
|
51
51
|
// const replace = `1:2345:respawn:/sbin/getty --noclear --autologin ${user} 38400 tty1`
|
|
52
52
|
const replace = `1:2345:respawn:/sbin/getty --autologin ${user} 38400 tty1`;
|
|
53
53
|
let content = '';
|
|
54
|
-
const lines =
|
|
54
|
+
const lines = fs_1.default.readFileSync(inittab, 'utf-8').split('\n');
|
|
55
55
|
for (let i = 0; i < lines.length; i++) {
|
|
56
56
|
if (lines[i].includes(search)) {
|
|
57
57
|
lines[i] = replace;
|
|
58
58
|
}
|
|
59
59
|
content += lines[i] + '\n';
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
fs_1.default.writeFileSync(inittab, content, 'utf-8');
|
|
62
62
|
await addIssue(distro, version, user, userPasswd, rootPasswd, chroot);
|
|
63
63
|
await addMotd(distro, version, user, userPasswd, rootPasswd, chroot);
|
|
64
64
|
}
|
|
@@ -75,9 +75,9 @@ async function remove(chroot = '/') {
|
|
|
75
75
|
* Systemd
|
|
76
76
|
*/
|
|
77
77
|
const fileOverride = `${chroot}/etc/systemd/system/getty@.service.d/override.conf`;
|
|
78
|
-
const dirOverride =
|
|
79
|
-
if (
|
|
80
|
-
|
|
78
|
+
const dirOverride = path_1.default.dirname(fileOverride);
|
|
79
|
+
if (fs_1.default.existsSync(dirOverride)) {
|
|
80
|
+
shelljs_1.default.exec(`rm ${dirOverride} -rf`);
|
|
81
81
|
}
|
|
82
82
|
msgRemove(`${chroot}/etc/motd`);
|
|
83
83
|
msgRemove(`${chroot}/etc/issue`);
|
|
@@ -91,14 +91,14 @@ async function remove(chroot = '/') {
|
|
|
91
91
|
// const replace = `1:2345:respawn:/sbin/getty --noclear 38400 tty1 `
|
|
92
92
|
const replace = '1:2345:respawn:/sbin/getty 38400 tty1 ';
|
|
93
93
|
let content = '';
|
|
94
|
-
const lines =
|
|
94
|
+
const lines = fs_1.default.readFileSync(inittab, 'utf-8').split('\n');
|
|
95
95
|
for (let i = 0; i < lines.length; i++) {
|
|
96
96
|
if (lines[i].includes(search)) {
|
|
97
97
|
lines[i] = replace;
|
|
98
98
|
}
|
|
99
99
|
content += lines[i] + '\n';
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
fs_1.default.writeFileSync(inittab, content, 'utf-8');
|
|
102
102
|
msgRemove(`${chroot}/etc/motd`);
|
|
103
103
|
msgRemove(`${chroot}/etc/issue`);
|
|
104
104
|
} // to add: openrc and runit for Devuan
|
|
@@ -119,16 +119,16 @@ async function addMotd(distro, version, user, userPasswd, rootPasswd, chroot = '
|
|
|
119
119
|
installer = 'startxfce4 to run GUI and launch calamares, or from terminal sudo eggs install -c';
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
if (!
|
|
122
|
+
if (!fs_1.default.existsSync(fileMotd)) {
|
|
123
123
|
await (0, utils_2.exec)(`touch ${fileMotd}`);
|
|
124
124
|
}
|
|
125
125
|
msgRemove(fileMotd);
|
|
126
|
-
let eggsMotd =
|
|
126
|
+
let eggsMotd = fs_1.default.readFileSync(fileMotd, 'utf-8');
|
|
127
127
|
eggsMotd += startMessage + '\n';
|
|
128
128
|
eggsMotd += 'You are logged as: ' + chalk_1.default.bold(user) + ' your password is: ' + chalk_1.default.bold(userPasswd) + ', root password: ' + chalk_1.default.bold(rootPasswd) + '\n';
|
|
129
129
|
eggsMotd += `to install the system: ${installer}\n`;
|
|
130
130
|
eggsMotd += stopMessage + '\n';
|
|
131
|
-
|
|
131
|
+
fs_1.default.writeFileSync(fileMotd, eggsMotd);
|
|
132
132
|
}
|
|
133
133
|
exports.addMotd = addMotd;
|
|
134
134
|
/**
|
|
@@ -143,12 +143,12 @@ exports.addMotd = addMotd;
|
|
|
143
143
|
async function addIssue(distro, version, user, userPasswd, rootPasswd, chroot = '/') {
|
|
144
144
|
const fileIssue = `${chroot}/etc/issue`;
|
|
145
145
|
msgRemove(fileIssue);
|
|
146
|
-
let eggsIssue =
|
|
146
|
+
let eggsIssue = fs_1.default.readFileSync(fileIssue, 'utf-8');
|
|
147
147
|
eggsIssue += startMessage + '\n';
|
|
148
148
|
eggsIssue += `This is a ${distro}/${version} system created by penguin's eggs.\n`;
|
|
149
149
|
eggsIssue += 'You can login with user: ' + chalk_1.default.bold(user) + ' and password: ' + chalk_1.default.bold(userPasswd) + ', root password: ' + chalk_1.default.bold(rootPasswd) + '\n';
|
|
150
150
|
eggsIssue += stopMessage + '\n';
|
|
151
|
-
|
|
151
|
+
fs_1.default.writeFileSync(fileIssue, eggsIssue);
|
|
152
152
|
}
|
|
153
153
|
exports.addIssue = addIssue;
|
|
154
154
|
/**
|
|
@@ -156,8 +156,8 @@ exports.addIssue = addIssue;
|
|
|
156
156
|
* @param path
|
|
157
157
|
*/
|
|
158
158
|
async function msgRemove(path) {
|
|
159
|
-
if (
|
|
160
|
-
const rows =
|
|
159
|
+
if (fs_1.default.existsSync(path)) {
|
|
160
|
+
const rows = fs_1.default.readFileSync(path, 'utf-8').split('\n');
|
|
161
161
|
let cleaned = '';
|
|
162
162
|
let remove = false;
|
|
163
163
|
for (const row of rows) {
|
|
@@ -171,7 +171,7 @@ async function msgRemove(path) {
|
|
|
171
171
|
remove = false;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
fs_1.default.writeFileSync(path, cleaned, 'utf-8');
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
exports.msgRemove = msgRemove;
|
package/lib/lib/dependencies.js
CHANGED
package/lib/lib/get_address.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
4
5
|
async function getAddress(initial) {
|
|
5
6
|
return new Promise(function (resolve) {
|
|
6
7
|
const questions = [
|
|
@@ -11,7 +12,7 @@ async function getAddress(initial) {
|
|
|
11
12
|
default: initial
|
|
12
13
|
}
|
|
13
14
|
];
|
|
14
|
-
|
|
15
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
15
16
|
resolve(options.address);
|
|
16
17
|
});
|
|
17
18
|
});
|
package/lib/lib/get_dns.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
4
5
|
async function getDns(initial) {
|
|
5
6
|
return new Promise(function (resolve) {
|
|
6
7
|
const questions = [
|
|
@@ -11,7 +12,7 @@ async function getDns(initial) {
|
|
|
11
12
|
default: initial
|
|
12
13
|
}
|
|
13
14
|
];
|
|
14
|
-
|
|
15
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
15
16
|
resolve(options.dns);
|
|
16
17
|
});
|
|
17
18
|
});
|
package/lib/lib/get_domain.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
4
5
|
async function getDomain(initial) {
|
|
5
6
|
return new Promise(function (resolve) {
|
|
6
7
|
const questions = [
|
|
@@ -11,7 +12,7 @@ async function getDomain(initial) {
|
|
|
11
12
|
default: initial
|
|
12
13
|
}
|
|
13
14
|
];
|
|
14
|
-
|
|
15
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
15
16
|
resolve(options.domain);
|
|
16
17
|
});
|
|
17
18
|
});
|
package/lib/lib/get_gateway.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
4
5
|
async function getGateway(initial) {
|
|
5
6
|
return new Promise(function (resolve) {
|
|
6
7
|
const questions = [
|
|
@@ -11,7 +12,7 @@ async function getGateway(initial) {
|
|
|
11
12
|
default: initial
|
|
12
13
|
}
|
|
13
14
|
];
|
|
14
|
-
|
|
15
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
15
16
|
resolve(options.gateway);
|
|
16
17
|
});
|
|
17
18
|
});
|
package/lib/lib/get_hostname.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
4
5
|
async function getHostname(initial) {
|
|
5
6
|
return new Promise(function (resolve) {
|
|
6
7
|
const questions = [
|
|
@@ -11,7 +12,7 @@ async function getHostname(initial) {
|
|
|
11
12
|
default: initial
|
|
12
13
|
}
|
|
13
14
|
];
|
|
14
|
-
|
|
15
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
15
16
|
resolve(options.hostname);
|
|
16
17
|
});
|
|
17
18
|
});
|
package/lib/lib/get_netmask.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
4
5
|
async function getNetmask(initial) {
|
|
5
6
|
return new Promise(function (resolve) {
|
|
6
7
|
const questions = [
|
|
@@ -11,7 +12,7 @@ async function getNetmask(initial) {
|
|
|
11
12
|
default: initial
|
|
12
13
|
}
|
|
13
14
|
];
|
|
14
|
-
|
|
15
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
15
16
|
resolve(options.netmask);
|
|
16
17
|
});
|
|
17
18
|
});
|
package/lib/lib/get_password.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
3
4
|
//import { option } from '@oclif/command/lib/flags'
|
|
4
|
-
const
|
|
5
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
5
6
|
async function getPassword(initial) {
|
|
6
7
|
const requireLetterAndNumber = (value) => {
|
|
7
8
|
if (/\w/.test(value) && /\d/.test(value)) {
|
|
@@ -25,7 +26,7 @@ async function getPassword(initial) {
|
|
|
25
26
|
// validate: requireLetterAndNumber,
|
|
26
27
|
}
|
|
27
28
|
];
|
|
28
|
-
|
|
29
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
29
30
|
resolve(options.password);
|
|
30
31
|
});
|
|
31
32
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
4
5
|
async function geRootPassword(initial) {
|
|
5
6
|
const requireLetterAndNumber = (value) => {
|
|
6
7
|
if (/\w/.test(value) && /\d/.test(value)) {
|
|
@@ -24,7 +25,7 @@ async function geRootPassword(initial) {
|
|
|
24
25
|
// validate: requireLetterAndNumber,
|
|
25
26
|
}
|
|
26
27
|
];
|
|
27
|
-
|
|
28
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
28
29
|
resolve(options.password);
|
|
29
30
|
});
|
|
30
31
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
4
5
|
async function getUserfullname(initial) {
|
|
5
6
|
return new Promise(function (resolve) {
|
|
6
7
|
const questions = [
|
|
@@ -11,7 +12,7 @@ async function getUserfullname(initial) {
|
|
|
11
12
|
default: initial
|
|
12
13
|
}
|
|
13
14
|
];
|
|
14
|
-
|
|
15
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
15
16
|
resolve(options.fullname);
|
|
16
17
|
});
|
|
17
18
|
});
|
package/lib/lib/get_username.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
4
5
|
async function getUsername(initial) {
|
|
5
6
|
return new Promise(function (resolve) {
|
|
6
7
|
const questions = [
|
|
@@ -11,7 +12,7 @@ async function getUsername(initial) {
|
|
|
11
12
|
default: initial
|
|
12
13
|
}
|
|
13
14
|
];
|
|
14
|
-
|
|
15
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
15
16
|
resolve(options.name);
|
|
16
17
|
});
|
|
17
18
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
5
5
|
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
6
6
|
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
7
7
|
async function selectFileSystemType() {
|
|
@@ -22,7 +22,7 @@ async function selectFileSystemType() {
|
|
|
22
22
|
}
|
|
23
23
|
];
|
|
24
24
|
return new Promise(function (resolve) {
|
|
25
|
-
|
|
25
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
26
26
|
resolve(options.fileSystemChoices);
|
|
27
27
|
});
|
|
28
28
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
4
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
5
5
|
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
6
6
|
async function selectInstallationDevice() {
|
|
7
7
|
const drives = shelljs_1.default.exec('lsblk |grep disk|cut -f 1 "-d "', { silent: true }).stdout.trim().split('\n');
|
|
@@ -19,7 +19,7 @@ async function selectInstallationDevice() {
|
|
|
19
19
|
}
|
|
20
20
|
];
|
|
21
21
|
return new Promise(function (resolve) {
|
|
22
|
-
|
|
22
|
+
inquirer_1.default.prompt(questions).then(function (options) {
|
|
23
23
|
resolve(options.installationDevice);
|
|
24
24
|
});
|
|
25
25
|
});
|