penguins-eggs 9.0.25 → 9.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +448 -22
- package/addons/telos/theme/applications/install-debian.desktop +28 -0
- package/addons/telos/theme/artwork/install-debian.png +0 -0
- package/addons/telos/theme/calamares/branding/banner.png +0 -0
- package/addons/telos/theme/calamares/branding/branding.desc +25 -0
- package/addons/telos/theme/calamares/branding/show.qml +51 -0
- package/addons/telos/theme/calamares/branding/slide1.png +0 -0
- package/addons/telos/theme/calamares/branding/telos-logo.png +0 -0
- package/addons/telos/theme/calamares/branding/welcome.png +0 -0
- package/addons/telos/theme/calamares/modules/partition.yml +233 -0
- package/addons/telos/theme/livecd/grub.theme.cfg +43 -0
- package/addons/telos/theme/livecd/isolinux.theme.cfg +45 -0
- package/addons/telos/theme/livecd/splash.png +0 -0
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +57 -38
- package/conf/distros/buster/calamares/modules/bootloader.yml +3 -1
- package/conf/eggs.yaml +9 -2
- package/lib/classes/basket.js +4 -4
- package/lib/classes/bleach.js +2 -2
- package/lib/classes/compressors.js +1 -1
- package/lib/classes/daddy.js +13 -13
- package/lib/classes/distro.d.ts +4 -2
- package/lib/classes/distro.js +77 -79
- package/lib/classes/family/archlinux.js +4 -4
- package/lib/classes/family/debian.js +6 -6
- package/lib/classes/family/fedora.js +4 -4
- package/lib/classes/family/suse.js +4 -4
- package/lib/classes/i18n.d.ts +28 -4
- package/lib/classes/i18n.js +112 -84
- package/lib/classes/incubation/branding.js +13 -7
- package/lib/classes/incubation/distros/bionic.js +1 -1
- package/lib/classes/incubation/distros/buster.js +1 -1
- package/lib/classes/incubation/distros/focal.js +1 -1
- package/lib/classes/incubation/distros/jessie.js +1 -1
- package/lib/classes/incubation/distros/rolling.js +1 -1
- package/lib/classes/incubation/fisherman-helper/displaymanager.js +1 -1
- package/lib/classes/incubation/fisherman-helper/packages.js +2 -2
- package/lib/classes/incubation/fisherman.js +5 -5
- package/lib/classes/incubation/incubator.js +5 -5
- package/lib/classes/incubation/installer.d.ts +1 -1
- package/lib/classes/incubation/installer.js +4 -4
- package/lib/classes/initrd.js +2 -2
- package/lib/classes/keyboards.d.ts +45 -0
- package/lib/classes/keyboards.js +196 -0
- package/lib/classes/krill_install.d.ts +12 -1
- package/lib/classes/krill_install.js +300 -312
- package/lib/classes/krill_prepare.d.ts +4 -0
- package/lib/classes/krill_prepare.js +81 -83
- package/lib/classes/locales.d.ts +14 -0
- package/lib/classes/locales.js +54 -0
- package/lib/classes/n8.js +1 -1
- package/lib/classes/ovary.d.ts +27 -27
- package/lib/classes/ovary.js +356 -387
- package/lib/classes/pacman.d.ts +1 -1
- package/lib/classes/pacman.js +40 -40
- package/lib/classes/pve-live.js +12 -16
- package/lib/classes/settings.d.ts +6 -0
- package/lib/classes/settings.js +11 -13
- package/lib/classes/systemctl.d.ts +36 -7
- package/lib/classes/systemctl.js +63 -28
- package/lib/classes/tailor.d.ts +20 -0
- package/lib/classes/tailor.js +460 -0
- package/lib/classes/tools.js +4 -4
- package/lib/classes/users.js +1 -1
- package/lib/classes/utils.d.ts +14 -3
- package/lib/classes/utils.js +75 -28
- package/lib/classes/xdg.js +23 -39
- package/lib/classes/yolk.d.ts +12 -10
- package/lib/classes/yolk.js +54 -56
- package/lib/commands/adapt.js +1 -1
- package/lib/commands/analyze.js +2 -2
- package/lib/commands/bro.js +2 -2
- package/lib/commands/calamares.js +4 -4
- package/lib/commands/config.js +4 -4
- package/lib/commands/dad.js +2 -2
- package/lib/commands/export/deb.js +2 -2
- package/lib/commands/export/docs.js +2 -2
- package/lib/commands/export/iso.js +2 -2
- package/lib/commands/info.js +1 -1
- package/lib/commands/install.js +5 -5
- package/lib/commands/kill.js +2 -2
- package/lib/commands/mom.js +2 -2
- package/lib/commands/produce.js +11 -11
- package/lib/commands/remove.js +2 -2
- package/lib/commands/syncfrom.d.ts +9 -3
- package/lib/commands/syncfrom.js +39 -32
- package/lib/commands/syncto.d.ts +26 -6
- package/lib/commands/syncto.js +73 -50
- package/lib/commands/tools/clean.js +2 -2
- package/lib/commands/tools/locales.js +9 -4
- package/lib/commands/tools/skel.js +2 -2
- package/lib/commands/tools/stat.js +3 -3
- package/lib/commands/tools/yolk.js +4 -4
- package/lib/commands/update.js +5 -5
- package/lib/commands/wardrobe/ironing.d.ts +14 -0
- package/lib/commands/wardrobe/ironing.js +123 -0
- package/lib/commands/wardrobe/list.d.ts +13 -0
- package/lib/commands/wardrobe/list.js +46 -0
- package/lib/commands/wardrobe/show.d.ts +15 -0
- package/lib/commands/wardrobe/show.js +55 -0
- package/lib/commands/wardrobe/wear.d.ts +11 -0
- package/lib/commands/wardrobe/wear.js +42 -0
- package/lib/components/elements/information.js +37 -18
- package/lib/components/elements/steps.js +1 -1
- package/lib/components/elements/title.js +2 -2
- package/lib/components/finished.js +5 -5
- package/lib/components/install.js +5 -5
- package/lib/components/keyboard.js +5 -8
- package/lib/components/location.js +5 -5
- package/lib/components/network.js +5 -5
- package/lib/components/partitions.js +5 -5
- package/lib/components/summary.js +5 -5
- package/lib/components/users.js +5 -5
- package/lib/components/welcome.js +6 -6
- package/lib/interfaces/i-costume.d.ts +43 -0
- package/lib/interfaces/i-costume.js +2 -0
- package/lib/interfaces/i-distro.d.ts +4 -2
- package/lib/interfaces/i-installer.d.ts +1 -1
- package/lib/interfaces/i-krill.d.ts +1 -0
- package/lib/interfaces/i-packages.d.ts +13 -0
- package/lib/interfaces/i-packages.js +2 -0
- package/lib/interfaces/i-xkb-model.d.ts +17 -0
- package/lib/interfaces/i-xkb-model.js +2 -0
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/lib/cli-autologin.js +3 -3
- package/lib/lib/select_address_type.js +1 -1
- package/lib/lib/select_filesystem_type.js +2 -2
- package/lib/lib/select_installation_device.js +2 -1
- package/lib/lib/select_interface.js +1 -1
- package/lib/lib/select_keyboard_layout.d.ts +1 -28
- package/lib/lib/select_keyboard_layout.js +18 -33
- package/lib/lib/select_keyboard_model.d.ts +4 -0
- package/lib/lib/select_keyboard_model.js +36 -0
- package/lib/lib/select_keyboard_option.d.ts +4 -0
- package/lib/lib/select_keyboard_option.js +36 -0
- package/lib/lib/select_keyboard_variant.d.ts +1 -5
- package/lib/lib/select_keyboard_variant.js +32 -5
- package/lib/lib/select_languages.d.ts +1 -1
- package/lib/lib/select_languages.js +8 -7
- package/lib/lib/select_regions.d.ts +1 -1
- package/lib/lib/select_regions.js +2 -2
- package/lib/lib/select_user_swap_choice.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +6 -5
- package/scripts/_eggs +43 -2
- package/scripts/bros/waydroid-helper.sh +1 -1
- package/scripts/eggs.bash +6 -2
- package/scripts/{not-used/install-eggs-ppa.sh → install-eggs-ppa.sh} +1 -0
- package/scripts/mom-cli.sh +1 -1
- package/scripts/pve-live.sh +2 -6
- package/scripts/resy.sh +8 -0
- package/scripts/userexist.sh +6 -0
- package/wardrobe.d/external.yml +7 -0
- package/wardrobe.d/hen/control.template +10 -0
- package/wardrobe.d/hen/index.yml +212 -0
- package/wardrobe.d/kde/index.yml +41 -0
- package/wardrobe.d/lamp/index.yml +35 -0
- package/wardrobe.d/xfce4/index.yml +53 -0
- package/conf/distros/buster/locales/locale.gen.template +0 -10
- package/conf/distros/buster/locales/locale.template +0 -11
- package/conf/distros/focal/locale.gen.template +0 -8
- package/scripts/not-used/eggs-cleanup.sh +0 -7
- package/scripts/not-used/mkinitramfs +0 -469
- package/scripts/update-initramfs +0 -94
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import Locales from './locales';
|
|
2
|
+
import Keyboards from './keyboards';
|
|
1
3
|
import { INet } from '../interfaces';
|
|
2
4
|
import { IWelcome, ILocation, IKeyboard, IPartitions, IUsers } from '../interfaces/i-krill';
|
|
3
5
|
export default class Krill {
|
|
6
|
+
locales: Locales;
|
|
7
|
+
keyboards: Keyboards;
|
|
4
8
|
/**
|
|
5
9
|
*
|
|
6
10
|
* @param cryped
|
|
@@ -1,52 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 =
|
|
4
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const ink_1 = require("ink");
|
|
6
|
-
const utils_1 =
|
|
7
|
-
const shelljs_1 =
|
|
8
|
-
const fs_1 =
|
|
6
|
+
const utils_1 = tslib_1.__importDefault(require("./utils"));
|
|
7
|
+
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
8
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
9
|
+
const systemctl_1 = tslib_1.__importDefault(require("./systemctl"));
|
|
10
|
+
const locales_1 = tslib_1.__importDefault(require("./locales"));
|
|
11
|
+
const keyboards_1 = tslib_1.__importDefault(require("./keyboards"));
|
|
9
12
|
// libraries
|
|
10
13
|
const exec = require('../lib/utils').exec;
|
|
11
|
-
const welcome_1 =
|
|
12
|
-
const location_1 =
|
|
13
|
-
const partitions_1 =
|
|
14
|
-
const keyboard_1 =
|
|
15
|
-
const users_1 =
|
|
16
|
-
const network_1 =
|
|
17
|
-
const summary_1 =
|
|
18
|
-
const select_languages_1 =
|
|
19
|
-
const select_regions_1 =
|
|
20
|
-
const select_zones_1 =
|
|
21
|
-
const select_installation_device_1 =
|
|
22
|
-
const select_installation_mode_1 =
|
|
23
|
-
const select_user_swap_choice_1 =
|
|
24
|
-
const select_filesystem_type_1 =
|
|
25
|
-
const get_username_1 =
|
|
26
|
-
const get_userfullname_1 =
|
|
27
|
-
const get_hostname_1 =
|
|
28
|
-
const get_password_1 =
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
14
|
+
const welcome_1 = tslib_1.__importDefault(require("../components/welcome"));
|
|
15
|
+
const location_1 = tslib_1.__importDefault(require("../components/location"));
|
|
16
|
+
const partitions_1 = tslib_1.__importDefault(require("../components/partitions"));
|
|
17
|
+
const keyboard_1 = tslib_1.__importDefault(require("../components/keyboard"));
|
|
18
|
+
const users_1 = tslib_1.__importDefault(require("../components/users"));
|
|
19
|
+
const network_1 = tslib_1.__importDefault(require("../components/network"));
|
|
20
|
+
const summary_1 = tslib_1.__importDefault(require("../components/summary"));
|
|
21
|
+
const select_languages_1 = tslib_1.__importDefault(require("../lib/select_languages"));
|
|
22
|
+
const select_regions_1 = tslib_1.__importDefault(require("../lib/select_regions"));
|
|
23
|
+
const select_zones_1 = tslib_1.__importDefault(require("../lib/select_zones"));
|
|
24
|
+
const select_installation_device_1 = tslib_1.__importDefault(require("../lib/select_installation_device"));
|
|
25
|
+
const select_installation_mode_1 = tslib_1.__importDefault(require("../lib/select_installation_mode"));
|
|
26
|
+
const select_user_swap_choice_1 = tslib_1.__importDefault(require("../lib/select_user_swap_choice"));
|
|
27
|
+
const select_filesystem_type_1 = tslib_1.__importDefault(require("../lib/select_filesystem_type"));
|
|
28
|
+
const get_username_1 = tslib_1.__importDefault(require("../lib/get_username"));
|
|
29
|
+
const get_userfullname_1 = tslib_1.__importDefault(require("../lib/get_userfullname"));
|
|
30
|
+
const get_hostname_1 = tslib_1.__importDefault(require("../lib/get_hostname"));
|
|
31
|
+
const get_password_1 = tslib_1.__importDefault(require("../lib/get_password"));
|
|
32
|
+
const select_keyboard_model_1 = tslib_1.__importDefault(require("../lib/select_keyboard_model"));
|
|
33
|
+
const select_keyboard_layout_1 = tslib_1.__importDefault(require("../lib/select_keyboard_layout"));
|
|
34
|
+
const select_keyboard_variant_1 = tslib_1.__importDefault(require("../lib/select_keyboard_variant"));
|
|
35
|
+
const select_keyboard_option_1 = tslib_1.__importDefault(require("../lib/select_keyboard_option"));
|
|
36
|
+
const select_interface_1 = tslib_1.__importDefault(require("../lib/select_interface"));
|
|
37
|
+
const select_address_type_1 = tslib_1.__importDefault(require("../lib/select_address_type"));
|
|
38
|
+
const get_address_1 = tslib_1.__importDefault(require("../lib/get_address"));
|
|
39
|
+
const get_netmask_1 = tslib_1.__importDefault(require("../lib/get_netmask"));
|
|
40
|
+
const get_gateway_1 = tslib_1.__importDefault(require("../lib/get_gateway"));
|
|
41
|
+
const get_domain_1 = tslib_1.__importDefault(require("../lib/get_domain"));
|
|
42
|
+
const get_dns_1 = tslib_1.__importDefault(require("../lib/get_dns"));
|
|
43
|
+
const krill_install_1 = tslib_1.__importDefault(require("./krill_install"));
|
|
38
44
|
class Krill {
|
|
45
|
+
constructor() {
|
|
46
|
+
this.locales = new locales_1.default();
|
|
47
|
+
this.keyboards = new keyboards_1.default();
|
|
48
|
+
}
|
|
39
49
|
/**
|
|
40
50
|
*
|
|
41
51
|
* @param cryped
|
|
42
52
|
*/
|
|
43
53
|
async prepare(cryped = false, pve = false, verbose = false) {
|
|
44
54
|
/**
|
|
45
|
-
*
|
|
55
|
+
* Check for disk presence
|
|
56
|
+
*/
|
|
57
|
+
const drives = shelljs_1.default.exec('lsblk |grep disk|cut -f 1 "-d "', { silent: true }).stdout.trim().split('\n');
|
|
58
|
+
if (drives[0] === '') {
|
|
59
|
+
await utils_1.default.pressKeyToExit(`No disk to install the system in this machine.\nkrill installer refuses to continue`);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* check for lvm2
|
|
46
63
|
*/
|
|
47
64
|
if (await this.pvExist()) {
|
|
48
|
-
utils_1.default.
|
|
49
|
-
|
|
65
|
+
await utils_1.default.pressKeyToExit(`There is a lvm2 volume in the system, remove it manually before installation.\nkrill installer refuses to continue`);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* stop udisks2.service
|
|
69
|
+
*/
|
|
70
|
+
const systemdCtl = new systemctl_1.default(verbose);
|
|
71
|
+
if (await systemdCtl.isActive('udisks2.service')) {
|
|
72
|
+
await systemdCtl.stop('udisks2.service');
|
|
50
73
|
}
|
|
51
74
|
const oWelcome = await this.welcome();
|
|
52
75
|
const oLocation = await this.location(oWelcome.language);
|
|
@@ -61,19 +84,14 @@ class Krill {
|
|
|
61
84
|
* WELCOME
|
|
62
85
|
*/
|
|
63
86
|
async welcome() {
|
|
64
|
-
let language =
|
|
87
|
+
let language = await this.locales.getDefault();
|
|
65
88
|
let welcomeElem;
|
|
66
89
|
while (true) {
|
|
67
90
|
welcomeElem = react_1.default.createElement(welcome_1.default, { language: language });
|
|
68
91
|
if (await confirm(welcomeElem, "Confirm Welcome datas?")) {
|
|
69
92
|
break;
|
|
70
93
|
}
|
|
71
|
-
|
|
72
|
-
language = '';
|
|
73
|
-
}
|
|
74
|
-
welcomeElem = react_1.default.createElement(welcome_1.default, { language: language });
|
|
75
|
-
redraw(welcomeElem);
|
|
76
|
-
language = await (0, select_languages_1.default)();
|
|
94
|
+
language = await (0, select_languages_1.default)(language);
|
|
77
95
|
}
|
|
78
96
|
return { language: language };
|
|
79
97
|
}
|
|
@@ -81,23 +99,15 @@ class Krill {
|
|
|
81
99
|
* LOCATION
|
|
82
100
|
*/
|
|
83
101
|
async location(language) {
|
|
84
|
-
let region = shelljs_1.default.exec('
|
|
85
|
-
let zone = shelljs_1.default.exec('
|
|
102
|
+
let region = shelljs_1.default.exec('cut -f1 -d/ < /etc/timezone', { silent: true }).stdout.trim();
|
|
103
|
+
let zone = shelljs_1.default.exec('cut -f2 -d/ < /etc/timezone', { silent: true }).stdout.trim();
|
|
86
104
|
let locationElem;
|
|
87
105
|
while (true) {
|
|
88
106
|
locationElem = react_1.default.createElement(location_1.default, { language: language, region: region, zone: zone });
|
|
89
107
|
if (await confirm(locationElem, "Confirm location datas?")) {
|
|
90
108
|
break;
|
|
91
109
|
}
|
|
92
|
-
|
|
93
|
-
region = '';
|
|
94
|
-
zone = '';
|
|
95
|
-
}
|
|
96
|
-
locationElem = react_1.default.createElement(location_1.default, { language: language, region: region, zone: zone });
|
|
97
|
-
redraw(locationElem);
|
|
98
|
-
region = await (0, select_regions_1.default)();
|
|
99
|
-
locationElem = react_1.default.createElement(location_1.default, { language: language, region: region, zone: zone });
|
|
100
|
-
redraw(locationElem);
|
|
110
|
+
region = await (0, select_regions_1.default)(region);
|
|
101
111
|
zone = await (0, select_zones_1.default)(region);
|
|
102
112
|
}
|
|
103
113
|
return {
|
|
@@ -110,37 +120,41 @@ class Krill {
|
|
|
110
120
|
* KEYBOARD
|
|
111
121
|
*/
|
|
112
122
|
async keyboard() {
|
|
113
|
-
let keyboardModel =
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
let keyboardLayout = shelljs_1.default.exec('cat /etc/default/keyboard |grep XKBLAYOUT|cut -f2 -d=|cut -f2 "-d\\""', { silent: true }).stdout.trim();
|
|
118
|
-
let keyboardVariant = shelljs_1.default.exec('/etc/default/keyboard |grep XKBVARIANT|cut -f2 -d=|cut -f2 "-d\\""', { silent: true }).stdout.trim();
|
|
119
|
-
let keyboardOptions = shelljs_1.default.exec('cat /etc/default/keyboard |grep XKBOPTIONS|cut -f2 -d=|cut -f2 "-d\\""', { silent: true }).stdout.trim();
|
|
123
|
+
let keyboardModel = await this.keyboards.getModel();
|
|
124
|
+
let keyboardLayout = await this.keyboards.getLayout();
|
|
125
|
+
let keyboardVariant = await this.keyboards.getVariant();
|
|
126
|
+
let keyboardOption = await this.keyboards.getOption();
|
|
120
127
|
let keyboardElem;
|
|
121
128
|
while (true) {
|
|
122
|
-
keyboardElem = react_1.default.createElement(keyboard_1.default, { keyboardModel: keyboardModel, keyboardLayout: keyboardLayout, keyboardVariant: keyboardVariant });
|
|
129
|
+
keyboardElem = react_1.default.createElement(keyboard_1.default, { keyboardModel: keyboardModel, keyboardLayout: keyboardLayout, keyboardVariant: keyboardVariant, keyboardOptions: keyboardOption });
|
|
123
130
|
if (await confirm(keyboardElem, "Confirm Keyboard datas?")) {
|
|
124
131
|
break;
|
|
125
132
|
}
|
|
126
133
|
else {
|
|
127
134
|
keyboardModel = 'pc105';
|
|
128
|
-
keyboardLayout = '';
|
|
129
|
-
keyboardVariant = '';
|
|
130
135
|
}
|
|
131
|
-
|
|
136
|
+
keyboardModel = await (0, select_keyboard_model_1.default)(keyboardModel);
|
|
137
|
+
keyboardLayout = await (0, select_keyboard_layout_1.default)(keyboardLayout);
|
|
138
|
+
keyboardVariant = await (0, select_keyboard_variant_1.default)(keyboardLayout);
|
|
139
|
+
keyboardOption = await (0, select_keyboard_option_1.default)(keyboardOption);
|
|
132
140
|
}
|
|
133
141
|
return {
|
|
134
142
|
keyboardModel: keyboardModel,
|
|
135
143
|
keyboardLayout: keyboardLayout,
|
|
136
|
-
keyboardVariant: keyboardVariant
|
|
144
|
+
keyboardVariant: keyboardVariant,
|
|
145
|
+
keyboardOption: keyboardOption
|
|
137
146
|
};
|
|
138
147
|
}
|
|
139
148
|
/**
|
|
140
149
|
* PARTITIONS
|
|
141
150
|
*/
|
|
142
151
|
async partitions(crypted = false, pve = false) {
|
|
143
|
-
|
|
152
|
+
const drives = shelljs_1.default.exec('lsblk |grep disk|cut -f 1 "-d "', { silent: true }).stdout.trim().split('\n');
|
|
153
|
+
const driveList = [];
|
|
154
|
+
drives.forEach((element) => {
|
|
155
|
+
driveList.push('/dev/' + element);
|
|
156
|
+
});
|
|
157
|
+
let installationDevice = driveList[0]; // it was just /dev/sda before
|
|
144
158
|
let installationMode = 'standard';
|
|
145
159
|
if (crypted) {
|
|
146
160
|
installationMode = 'full-encrypted';
|
|
@@ -168,17 +182,9 @@ class Krill {
|
|
|
168
182
|
filesystemType = '';
|
|
169
183
|
userSwapChoice = '';
|
|
170
184
|
}
|
|
171
|
-
partitionsElem = react_1.default.createElement(partitions_1.default, { installationDevice: installationDevice, installationMode: installationMode, filesystemType: filesystemType, userSwapChoice: userSwapChoice });
|
|
172
|
-
redraw(partitionsElem);
|
|
173
185
|
installationDevice = await (0, select_installation_device_1.default)();
|
|
174
|
-
partitionsElem = react_1.default.createElement(partitions_1.default, { installationDevice: installationDevice, installationMode: installationMode, filesystemType: filesystemType, userSwapChoice: userSwapChoice });
|
|
175
|
-
redraw(partitionsElem);
|
|
176
186
|
installationMode = await (0, select_installation_mode_1.default)();
|
|
177
|
-
partitionsElem = react_1.default.createElement(partitions_1.default, { installationDevice: installationDevice, installationMode: installationMode, filesystemType: filesystemType, userSwapChoice: userSwapChoice });
|
|
178
|
-
redraw(partitionsElem);
|
|
179
187
|
filesystemType = await (0, select_filesystem_type_1.default)();
|
|
180
|
-
partitionsElem = react_1.default.createElement(partitions_1.default, { installationDevice: installationDevice, installationMode: installationMode, filesystemType: filesystemType, userSwapChoice: userSwapChoice });
|
|
181
|
-
redraw(partitionsElem);
|
|
182
188
|
userSwapChoice = await (0, select_user_swap_choice_1.default)();
|
|
183
189
|
}
|
|
184
190
|
return {
|
|
@@ -205,17 +211,9 @@ class Krill {
|
|
|
205
211
|
if (await confirm(usersElem, "Confirm Users datas?")) {
|
|
206
212
|
break;
|
|
207
213
|
}
|
|
208
|
-
usersElem = react_1.default.createElement(users_1.default, { name: name, fullname: fullname, hostname: hostname, password: password, rootPassword: rootPassword, autologin: autologin, sameUserPassword: sameUserPassword });
|
|
209
|
-
redraw(usersElem);
|
|
210
214
|
name = await (0, get_username_1.default)(name);
|
|
211
|
-
usersElem = react_1.default.createElement(users_1.default, { name: name, fullname: fullname, hostname: hostname, password: password, rootPassword: rootPassword, autologin: autologin, sameUserPassword: sameUserPassword });
|
|
212
|
-
redraw(usersElem);
|
|
213
215
|
fullname = await (0, get_userfullname_1.default)(fullname);
|
|
214
|
-
usersElem = react_1.default.createElement(users_1.default, { name: name, fullname: fullname, hostname: hostname, password: password, rootPassword: rootPassword, autologin: autologin, sameUserPassword: sameUserPassword });
|
|
215
|
-
redraw(usersElem);
|
|
216
216
|
password = await (0, get_password_1.default)(password);
|
|
217
|
-
usersElem = react_1.default.createElement(users_1.default, { name: name, fullname: fullname, hostname: hostname, password: password, rootPassword: rootPassword, autologin: autologin, sameUserPassword: sameUserPassword });
|
|
218
|
-
redraw(usersElem);
|
|
219
217
|
hostname = await (0, get_hostname_1.default)(hostname);
|
|
220
218
|
}
|
|
221
219
|
return {
|
|
@@ -296,7 +294,7 @@ class Krill {
|
|
|
296
294
|
*/
|
|
297
295
|
async pvExist() {
|
|
298
296
|
let exist = false;
|
|
299
|
-
const check =
|
|
297
|
+
const check = `#!/bin/sh\npvdisplay |grep "PV Name" >/dev/null && echo 1|| echo 0`;
|
|
300
298
|
if (shelljs_1.default.exec(check).stdout.trim() === '1') {
|
|
301
299
|
exist = true;
|
|
302
300
|
}
|
|
@@ -327,7 +325,7 @@ async function confirm(elem, msg = "Confirm") {
|
|
|
327
325
|
*/
|
|
328
326
|
function redraw(elem) {
|
|
329
327
|
let opt = {};
|
|
330
|
-
opt.patchConsole =
|
|
328
|
+
opt.patchConsole = true;
|
|
331
329
|
opt.debug = false;
|
|
332
330
|
shelljs_1.default.exec('clear');
|
|
333
331
|
(0, ink_1.render)(elem, opt);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const utils_1 = require("../lib/utils");
|
|
5
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
|
+
class Locales {
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
async getEnabled() {
|
|
11
|
+
const cmd = `localectl list-locales`;
|
|
12
|
+
let enabledLocales = [];
|
|
13
|
+
const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
|
|
14
|
+
if (result.code === 0) {
|
|
15
|
+
const lines = result.data.split('\n');
|
|
16
|
+
for (const line of lines) {
|
|
17
|
+
enabledLocales.push(line.replace(/"/g, '').replace(/'/g, '').trim());
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return enabledLocales;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
async getSupported() {
|
|
26
|
+
const file = '/usr/share/i18n/SUPPORTED';
|
|
27
|
+
const cmd = `cut -f1 -d.|grep UTF-0 < ${file}`;
|
|
28
|
+
let lines = [];
|
|
29
|
+
const retLines = [];
|
|
30
|
+
if (fs_1.default.existsSync(file)) {
|
|
31
|
+
lines = fs_1.default.readFileSync(file, 'utf-8').split('\n');
|
|
32
|
+
for (const line of lines) {
|
|
33
|
+
retLines.push(line.replace(' UTF-8', ''));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return retLines;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
async getDefault() {
|
|
42
|
+
const file = '/etc/default/locale';
|
|
43
|
+
const cmd = `grep LANG < ${file}|cut -f2 -d=`;
|
|
44
|
+
let defaultLanguage = "";
|
|
45
|
+
if (fs_1.default.existsSync(file)) {
|
|
46
|
+
const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
|
|
47
|
+
if (result.code === 0) {
|
|
48
|
+
defaultLanguage = result.data.replace(/"/g, '').replace(/'/g, '').trim();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return defaultLanguage;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.default = Locales;
|
package/lib/classes/n8.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const tslib_1 = require("tslib");
|
|
10
|
-
const node_fs_1 =
|
|
10
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
11
11
|
class n8 {
|
|
12
12
|
/**
|
|
13
13
|
*
|
package/lib/classes/ovary.d.ts
CHANGED
|
@@ -6,23 +6,19 @@ import Users from './users';
|
|
|
6
6
|
* Ovary:
|
|
7
7
|
*/
|
|
8
8
|
export default class Ovary {
|
|
9
|
+
verbose: boolean;
|
|
10
|
+
echo: {};
|
|
9
11
|
toNull: string;
|
|
10
12
|
incubator: Incubator;
|
|
11
13
|
settings: Settings;
|
|
12
14
|
familyId: string;
|
|
13
15
|
snapshot_prefix: string;
|
|
14
16
|
snapshot_basename: string;
|
|
15
|
-
theme: string;
|
|
16
17
|
compression: string;
|
|
17
|
-
/**
|
|
18
|
-
* Egg
|
|
19
|
-
* @param compression
|
|
20
|
-
*/
|
|
21
|
-
constructor(snapshot_prefix?: string, snapshot_basename?: string, theme?: string, compression?: string);
|
|
22
18
|
/**
|
|
23
19
|
* @returns {boolean} success
|
|
24
20
|
*/
|
|
25
|
-
fertilization(): Promise<boolean>;
|
|
21
|
+
fertilization(snapshot_prefix?: string, snapshot_basename?: string, theme?: string, compression?: string): Promise<boolean>;
|
|
26
22
|
/**
|
|
27
23
|
*
|
|
28
24
|
* @param basename
|
|
@@ -31,7 +27,12 @@ export default class Ovary {
|
|
|
31
27
|
/**
|
|
32
28
|
* Crea la struttura della workdir
|
|
33
29
|
*/
|
|
34
|
-
liveCreateStructure(
|
|
30
|
+
liveCreateStructure(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @param cmd
|
|
34
|
+
*/
|
|
35
|
+
tryCatch(cmd?: string): Promise<void>;
|
|
35
36
|
/**
|
|
36
37
|
* editLiveFs
|
|
37
38
|
* - Truncate logs, remove archived log
|
|
@@ -42,33 +43,32 @@ export default class Ovary {
|
|
|
42
43
|
* - Add some basic files to /dev
|
|
43
44
|
* - Clear configs from /etc/network/interfaces, wicd and NetworkManager and netman
|
|
44
45
|
*/
|
|
45
|
-
editLiveFs(
|
|
46
|
+
editLiveFs(): Promise<void>;
|
|
46
47
|
/**
|
|
47
48
|
* syslinux
|
|
48
49
|
*/
|
|
49
|
-
syslinux(
|
|
50
|
+
syslinux(): Promise<void>;
|
|
50
51
|
/**
|
|
51
52
|
* async isolinux
|
|
52
53
|
*/
|
|
53
|
-
isolinux(theme?: string
|
|
54
|
+
isolinux(theme?: string): Promise<void>;
|
|
54
55
|
/**
|
|
55
56
|
* copy kernel
|
|
56
57
|
*/
|
|
57
|
-
kernelCopy(
|
|
58
|
+
kernelCopy(): Promise<void>;
|
|
58
59
|
/**
|
|
59
|
-
* necessita di
|
|
60
|
+
* necessita di echoYes
|
|
60
61
|
*/
|
|
61
|
-
initrdCreate(
|
|
62
|
+
initrdCreate(): Promise<void>;
|
|
62
63
|
/**
|
|
63
|
-
*
|
|
64
|
-
* @param verbose
|
|
64
|
+
* We must upgrade to initrdCreate for Debian/Ubuntu
|
|
65
65
|
* @returns
|
|
66
66
|
*/
|
|
67
67
|
initrdCopy(verbose?: boolean): Promise<void>;
|
|
68
68
|
/**
|
|
69
69
|
* squashFs: crea in live filesystem.squashfs
|
|
70
70
|
*/
|
|
71
|
-
makeSquashfs(scriptOnly?: boolean
|
|
71
|
+
makeSquashfs(scriptOnly?: boolean): Promise<void>;
|
|
72
72
|
/**
|
|
73
73
|
* Restituisce true per le direcory da montare con overlay
|
|
74
74
|
*
|
|
@@ -97,36 +97,36 @@ export default class Ovary {
|
|
|
97
97
|
*
|
|
98
98
|
* @param verbose
|
|
99
99
|
*/
|
|
100
|
-
bindLiveFs(
|
|
100
|
+
bindLiveFs(): Promise<void>;
|
|
101
101
|
/**
|
|
102
102
|
* ubind del fs live
|
|
103
103
|
* @param verbose
|
|
104
104
|
*/
|
|
105
|
-
uBindLiveFs(
|
|
105
|
+
uBindLiveFs(): Promise<void>;
|
|
106
106
|
/**
|
|
107
107
|
* bind dei virtual file system
|
|
108
108
|
*/
|
|
109
|
-
bindVfs(
|
|
109
|
+
bindVfs(): Promise<void>;
|
|
110
110
|
/**
|
|
111
111
|
*
|
|
112
112
|
* @param verbose
|
|
113
113
|
*/
|
|
114
|
-
ubindVfs(
|
|
114
|
+
ubindVfs(): Promise<void>;
|
|
115
115
|
/**
|
|
116
116
|
*
|
|
117
117
|
* @param verbose
|
|
118
118
|
*/
|
|
119
|
-
cleanUsersAccounts(
|
|
119
|
+
cleanUsersAccounts(): Promise<void>;
|
|
120
120
|
/**
|
|
121
121
|
* list degli utenti: grep -E 1[0-9]{3} /etc/passwd | sed s/:/\ / | awk '{print $1}'
|
|
122
122
|
* create la home per user_opt
|
|
123
123
|
* @param verbose
|
|
124
124
|
*/
|
|
125
|
-
createUserLive(
|
|
125
|
+
createUserLive(): Promise<void>;
|
|
126
126
|
/**
|
|
127
127
|
*
|
|
128
128
|
*/
|
|
129
|
-
createXdgAutostart(theme: string | undefined, myAddons: IMyAddons
|
|
129
|
+
createXdgAutostart(theme: string | undefined, myAddons: IMyAddons): Promise<void>;
|
|
130
130
|
/**
|
|
131
131
|
* Creazione link desktop per lxde
|
|
132
132
|
* @param name
|
|
@@ -142,13 +142,13 @@ export default class Ovary {
|
|
|
142
142
|
/**
|
|
143
143
|
* makeEfi
|
|
144
144
|
*/
|
|
145
|
-
makeEfi(theme?: string
|
|
145
|
+
makeEfi(theme?: string): Promise<void>;
|
|
146
146
|
/**
|
|
147
147
|
* makeDotDisk
|
|
148
148
|
* create .disk/info, .disk/mksquashfs, .disk/mkiso
|
|
149
149
|
* return mkiso
|
|
150
150
|
*/
|
|
151
|
-
makeDotDisk(backup?: boolean
|
|
151
|
+
makeDotDisk(backup?: boolean): string;
|
|
152
152
|
/**
|
|
153
153
|
*
|
|
154
154
|
* @param backup
|
|
@@ -159,7 +159,7 @@ export default class Ovary {
|
|
|
159
159
|
* makeIso
|
|
160
160
|
* cmd: cmd 4 xorirriso
|
|
161
161
|
*/
|
|
162
|
-
makeIso(cmd: string, scriptOnly?: boolean
|
|
162
|
+
makeIso(cmd: string, scriptOnly?: boolean): Promise<void>;
|
|
163
163
|
/**
|
|
164
164
|
* finished = show the results
|
|
165
165
|
* @param scriptOnly
|