penguins-eggs 9.3.26 → 9.3.28
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/.oclif.manifest.json +1 -1
- package/conf/derivatives.yaml +7 -0
- package/dist/classes/bleach.js +26 -24
- package/dist/classes/compressors.js +7 -5
- package/dist/classes/daddy.js +38 -36
- package/dist/classes/distro.js +30 -27
- package/dist/classes/family/archlinux.js +21 -19
- package/dist/classes/family/debian.js +33 -31
- package/dist/classes/family/fedora.js +19 -17
- package/dist/classes/family/suse.js +19 -17
- package/dist/classes/incubation/branding.js +8 -6
- package/dist/classes/incubation/distros/bionic.js +5 -3
- package/dist/classes/incubation/distros/buster.js +5 -3
- package/dist/classes/incubation/distros/focal.js +5 -3
- package/dist/classes/incubation/distros/jessie.js +6 -4
- package/dist/classes/incubation/distros/rolling.js +9 -7
- package/dist/classes/incubation/fisherman-helper/displaymanager.js +5 -3
- package/dist/classes/incubation/fisherman-helper/packages.js +17 -15
- package/dist/classes/incubation/fisherman.js +19 -19
- package/dist/classes/incubation/incubator.js +37 -35
- package/dist/classes/incubation/installer.js +8 -6
- package/dist/classes/initrd.js +5 -3
- package/dist/classes/keyboards.js +25 -23
- package/dist/classes/locales.js +19 -17
- package/dist/classes/n8.js +4 -2
- package/dist/classes/network.js +9 -9
- package/dist/classes/ovary.js +280 -281
- package/dist/classes/pacman.js +128 -128
- package/dist/classes/pve-live.js +7 -5
- package/dist/classes/pxe.js +141 -138
- package/dist/classes/settings.js +34 -32
- package/dist/classes/sources_list.js +31 -31
- package/dist/classes/systemctl.js +16 -14
- package/dist/classes/tailor.js +255 -262
- package/dist/classes/tools.js +7 -5
- package/dist/classes/users.js +30 -28
- package/dist/classes/utils.js +22 -20
- package/dist/classes/xdg.js +60 -58
- package/dist/classes/yolk.js +33 -33
- package/dist/commands/adapt.js +14 -12
- package/dist/commands/analyze.js +48 -15
- package/dist/commands/calamares.js +28 -26
- package/dist/commands/config.js +77 -79
- package/dist/commands/cuckoo.js +19 -17
- package/dist/commands/dad.js +16 -14
- package/dist/commands/export/deb.js +19 -17
- package/dist/commands/export/iso.js +17 -15
- package/dist/commands/install.js +31 -29
- package/dist/commands/kill.js +17 -15
- package/dist/commands/mom.js +11 -9
- package/dist/commands/produce.js +30 -28
- package/dist/commands/status.js +7 -5
- package/dist/commands/syncfrom.js +41 -41
- package/dist/commands/syncto.js +77 -80
- package/dist/commands/tools/clean.js +13 -11
- package/dist/commands/tools/ppa.js +26 -24
- package/dist/commands/tools/skel.js +18 -16
- package/dist/commands/tools/stat.js +12 -10
- package/dist/commands/tools/yolk.js +13 -11
- package/dist/commands/update.js +29 -27
- package/dist/commands/wardrobe/get.js +14 -12
- package/dist/commands/wardrobe/list.js +25 -23
- package/dist/commands/wardrobe/show.js +25 -23
- package/dist/commands/wardrobe/wear.js +24 -22
- package/dist/components/elements/information.js +21 -19
- package/dist/components/elements/steps.js +4 -2
- package/dist/components/elements/title.js +4 -2
- package/dist/components/finished.js +10 -8
- package/dist/components/install.js +10 -8
- package/dist/components/keyboard.js +10 -8
- package/dist/components/location.js +10 -8
- package/dist/components/network.js +10 -8
- package/dist/components/partitions.js +10 -8
- package/dist/components/summary.js +10 -8
- package/dist/components/users.js +33 -8
- package/dist/components/welcome.js +10 -8
- package/dist/interfaces/i-packages.js +1 -1
- package/dist/interfaces/i-pxe.js +39 -0
- package/dist/krill/krill-prepare.js +92 -90
- package/dist/krill/krill-sequence.js +148 -145
- package/dist/krill/modules/add-user.js +11 -9
- package/dist/krill/modules/bootloader-config-ubuntu.js +25 -23
- package/dist/krill/modules/bootloader.js +11 -9
- package/dist/krill/modules/change-password.js +2 -2
- package/dist/krill/modules/del-live-user.js +8 -6
- package/dist/krill/modules/fstab.js +35 -33
- package/dist/krill/modules/grubcfg.js +8 -6
- package/dist/krill/modules/hostname.js +19 -17
- package/dist/krill/modules/initramfs-cfg.js +6 -4
- package/dist/krill/modules/initramfs.js +17 -15
- package/dist/krill/modules/locale-cfg.js +12 -10
- package/dist/krill/modules/locale.js +13 -11
- package/dist/krill/modules/m-keyboard.js +33 -31
- package/dist/krill/modules/m-timezone.js +7 -5
- package/dist/krill/modules/machine-id.js +8 -6
- package/dist/krill/modules/mkfs.js +7 -7
- package/dist/krill/modules/mount-fs.js +22 -22
- package/dist/krill/modules/mount-vfs.js +12 -12
- package/dist/krill/modules/network-cfg.js +21 -21
- package/dist/krill/modules/packages.js +20 -18
- package/dist/krill/modules/partition.js +148 -139
- package/dist/krill/modules/remove-installer-link.js +5 -3
- package/dist/krill/modules/umount.js +9 -7
- package/dist/krill/modules/unpackfs.js +8 -6
- package/dist/lib/cli-autologin.js +163 -163
- package/dist/lib/dependencies.js +10 -10
- package/dist/lib/get_address.js +6 -4
- package/dist/lib/get_dns.js +6 -4
- package/dist/lib/get_domain.js +6 -4
- package/dist/lib/get_gateway.js +6 -4
- package/dist/lib/get_hostname.js +6 -4
- package/dist/lib/get_netmask.js +6 -4
- package/dist/lib/get_password.js +8 -6
- package/dist/lib/get_root_password.js +7 -5
- package/dist/lib/get_userfullname.js +6 -4
- package/dist/lib/get_username.js +6 -4
- package/dist/lib/select_address_type.js +6 -4
- package/dist/lib/select_filesystem_type.js +8 -6
- package/dist/lib/select_installation_device.js +7 -5
- package/dist/lib/select_installation_mode.js +6 -4
- package/dist/lib/select_interface.js +6 -4
- package/dist/lib/select_keyboard_layout.js +10 -8
- package/dist/lib/select_keyboard_model.js +10 -8
- package/dist/lib/select_keyboard_option.js +10 -8
- package/dist/lib/select_keyboard_variant.js +10 -8
- package/dist/lib/select_languages.js +9 -7
- package/dist/lib/select_regions.js +6 -4
- package/dist/lib/select_user_swap_choice.js +8 -6
- package/dist/lib/select_zones.js +12 -10
- package/dist/lib/utils.js +3 -3
- package/package.json +12 -5
- package/dist/dhcpd/dhcpd.js +0 -222
- package/dist/dhcpd/index.js +0 -7
- package/dist/dhcpd/packet/converters.js +0 -377
- package/dist/dhcpd/packet/options.js +0 -2
- package/dist/dhcpd/packet/types.js +0 -2
- package/dist/dhcpd/packet.js +0 -251
- package/dist/dhcpd/proxy.js +0 -152
- package/dist/dhcpd/server.js +0 -152
- package/dist/dhcpd/sprintf.js +0 -170
- package/dist/dhcpd/utils.js +0 -190
- package/dist/interfaces/i-pxe-options.js +0 -2
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
4
4
|
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
5
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const utils_2 = require("../../lib/utils");
|
|
9
|
+
const utils_js_1 = __importDefault(require("../../classes/utils.js"));
|
|
10
|
+
const utils_js_2 = require("../../lib/utils.js");
|
|
9
11
|
/**
|
|
10
12
|
*
|
|
11
13
|
* @param this
|
|
@@ -17,25 +19,25 @@ const utils_2 = require("../../lib/utils");
|
|
|
17
19
|
* @param homePhone
|
|
18
20
|
*/
|
|
19
21
|
async function addUser(name = 'live', password = 'evolution', fullName = '', roomNumber = '', workPhone = '', homePhone = '') {
|
|
20
|
-
// Debian
|
|
22
|
+
// Debian
|
|
21
23
|
let cmd = `chroot ${this.installTarget} adduser ${name} --home /home/${name} --shell /bin/bash --disabled-password --gecos "${fullName},${roomNumber},${workPhone},${homePhone}" ${this.toNull}`;
|
|
22
24
|
if (this.distro.familyId === 'archlinux') {
|
|
23
25
|
cmd = `chroot ${this.installTarget} useradd --create-home --shell /bin/bash ${name} ${this.toNull}`;
|
|
24
26
|
}
|
|
25
|
-
await (0,
|
|
27
|
+
await (0, utils_js_2.exec)(cmd, this.echo);
|
|
26
28
|
cmd = `echo ${name}:${password} | chroot ${this.installTarget} chpasswd ${this.toNull}`;
|
|
27
29
|
// echo ${name}:${password} | chroot ${this.installTarget} chpasswd ${this.toNull}
|
|
28
|
-
await (0,
|
|
30
|
+
await (0, utils_js_2.exec)(cmd, this.echo);
|
|
29
31
|
// Debian
|
|
30
32
|
cmd = `chroot ${this.installTarget} usermod -aG sudo ${name} ${this.toNull}`;
|
|
31
33
|
if (this.distro.familyId === 'archlinux') {
|
|
32
34
|
cmd = `chroot ${this.installTarget} usermod -aG wheel ${name}`;
|
|
33
35
|
}
|
|
34
36
|
try {
|
|
35
|
-
await (0,
|
|
37
|
+
await (0, utils_js_2.exec)(cmd, this.echo);
|
|
36
38
|
}
|
|
37
|
-
catch
|
|
38
|
-
await
|
|
39
|
+
catch {
|
|
40
|
+
await utils_js_1.default.pressKeyToExit(cmd);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
exports.default = addUser;
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
4
4
|
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
5
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const utils_2 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
9
|
+
const utils_js_1 = require("../../lib/utils.js");
|
|
10
|
+
const utils_js_2 = __importDefault(require("../../classes/utils.js"));
|
|
9
11
|
/**
|
|
10
12
|
*
|
|
11
13
|
* @param this
|
|
@@ -14,80 +16,80 @@ async function bootloaderConfigUbuntu() {
|
|
|
14
16
|
let cmd = '';
|
|
15
17
|
try {
|
|
16
18
|
cmd = `chroot ${this.installTarget} apt-get update -y ${this.toNull}`;
|
|
17
|
-
await (0,
|
|
19
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
18
20
|
}
|
|
19
21
|
catch (error) {
|
|
20
22
|
console.log(error);
|
|
21
|
-
await
|
|
23
|
+
await utils_js_2.default.pressKeyToExit(cmd, true);
|
|
22
24
|
}
|
|
23
25
|
try {
|
|
24
26
|
cmd = `chroot ${this.installTarget} sleep 1 ${this.toNull}`;
|
|
25
|
-
await (0,
|
|
27
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
26
28
|
}
|
|
27
29
|
catch (error) {
|
|
28
30
|
console.log(error);
|
|
29
|
-
await
|
|
31
|
+
await utils_js_2.default.pressKeyToExit(cmd, true);
|
|
30
32
|
}
|
|
31
|
-
|
|
33
|
+
const aptInstallOptions = ' apt install -y --no-upgrade --allow-unauthenticated -o Acquire::gpgv::Options::=--ignore-time-conflict ';
|
|
32
34
|
if (this.efi) {
|
|
33
35
|
try {
|
|
34
|
-
cmd = `chroot ${this.installTarget} ${aptInstallOptions} grub-efi-${
|
|
35
|
-
await (0,
|
|
36
|
+
cmd = `chroot ${this.installTarget} ${aptInstallOptions} grub-efi-${utils_js_2.default.machineArch()} --allow-unauthenticated ${this.toNull}`;
|
|
37
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
36
38
|
}
|
|
37
39
|
catch (error) {
|
|
38
40
|
console.log(error);
|
|
39
|
-
await
|
|
41
|
+
await utils_js_2.default.pressKeyToExit(cmd, true);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
else {
|
|
43
45
|
try {
|
|
44
46
|
cmd = `chroot ${this.installTarget} ${aptInstallOptions} grub-pc ${this.toNull}`;
|
|
45
|
-
await (0,
|
|
47
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
46
48
|
}
|
|
47
49
|
catch (error) {
|
|
48
50
|
console.log(error);
|
|
49
|
-
await
|
|
51
|
+
await utils_js_2.default.pressKeyToExit(cmd, true);
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
try {
|
|
53
55
|
cmd = `chroot ${this.installTarget} sleep 1 ${this.toNull}`;
|
|
54
|
-
await (0,
|
|
56
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
55
57
|
}
|
|
56
58
|
catch (error) {
|
|
57
59
|
console.log(error);
|
|
58
|
-
await
|
|
60
|
+
await utils_js_2.default.pressKeyToExit(cmd, true);
|
|
59
61
|
}
|
|
60
62
|
try {
|
|
61
63
|
cmd = `chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`;
|
|
62
|
-
await (0,
|
|
64
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
63
65
|
}
|
|
64
66
|
catch (error) {
|
|
65
67
|
console.log(error);
|
|
66
|
-
await
|
|
68
|
+
await utils_js_2.default.pressKeyToExit(cmd, true);
|
|
67
69
|
}
|
|
68
70
|
try {
|
|
69
71
|
cmd = `chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`;
|
|
70
|
-
await (0,
|
|
72
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
71
73
|
}
|
|
72
74
|
catch (error) {
|
|
73
75
|
console.log(error);
|
|
74
|
-
await
|
|
76
|
+
await utils_js_2.default.pressKeyToExit(cmd, true);
|
|
75
77
|
}
|
|
76
78
|
try {
|
|
77
79
|
cmd = `chroot ${this.installTarget} update-grub ${this.toNull}`;
|
|
78
|
-
await (0,
|
|
80
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
79
81
|
}
|
|
80
82
|
catch (error) {
|
|
81
83
|
console.log(error);
|
|
82
|
-
await
|
|
84
|
+
await utils_js_2.default.pressKeyToExit(cmd, true);
|
|
83
85
|
}
|
|
84
86
|
try {
|
|
85
87
|
cmd = `chroot ${this.installTarget} sleep 1 ${this.toNull}`;
|
|
86
|
-
await (0,
|
|
88
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
87
89
|
}
|
|
88
90
|
catch (error) {
|
|
89
91
|
console.log(error);
|
|
90
|
-
await
|
|
92
|
+
await utils_js_2.default.pressKeyToExit(cmd, true);
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
exports.default = bootloaderConfigUbuntu;
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
4
4
|
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
5
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const utils_2 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
9
|
+
const utils_js_1 = require("../../lib/utils.js");
|
|
10
|
+
const utils_js_2 = __importDefault(require("../../classes/utils.js"));
|
|
9
11
|
/**
|
|
10
12
|
*
|
|
11
13
|
* @param this
|
|
@@ -13,17 +15,17 @@ const utils_2 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
|
13
15
|
async function bootloader() {
|
|
14
16
|
let cmd = `chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`;
|
|
15
17
|
try {
|
|
16
|
-
await (0,
|
|
18
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
17
19
|
}
|
|
18
|
-
catch
|
|
19
|
-
await
|
|
20
|
+
catch {
|
|
21
|
+
await utils_js_2.default.pressKeyToExit(cmd);
|
|
20
22
|
}
|
|
21
23
|
cmd = `chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`;
|
|
22
24
|
try {
|
|
23
|
-
await (0,
|
|
25
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
24
26
|
}
|
|
25
|
-
catch
|
|
26
|
-
await
|
|
27
|
+
catch {
|
|
28
|
+
await utils_js_2.default.pressKeyToExit(cmd);
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
exports.default = bootloader;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
6
|
+
const utils_js_1 = require("../../lib/utils.js");
|
|
7
7
|
/**
|
|
8
8
|
* changePassword
|
|
9
9
|
* @param name
|
|
@@ -11,6 +11,6 @@ const utils_1 = require("../../lib/utils");
|
|
|
11
11
|
*/
|
|
12
12
|
async function changePassword(name = 'live', newPassword = 'evolution') {
|
|
13
13
|
const cmd = `echo ${name}:${newPassword} | chroot ${this.installTarget} chpasswd ${this.toNull}`;
|
|
14
|
-
await (0,
|
|
14
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
15
15
|
}
|
|
16
16
|
exports.default = changePassword;
|
|
@@ -2,21 +2,23 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
4
4
|
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
5
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const utils_2 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
9
|
+
const utils_js_1 = require("../../lib/utils.js");
|
|
10
|
+
const utils_js_2 = __importDefault(require("../../classes/utils.js"));
|
|
9
11
|
/**
|
|
10
12
|
* delUser
|
|
11
13
|
* va corretto con users.conf di calamares
|
|
12
14
|
*/
|
|
13
15
|
async function delLiveUser() {
|
|
14
|
-
if (
|
|
16
|
+
if (utils_js_2.default.isLive()) {
|
|
15
17
|
const user = this.settings.config.user_opt;
|
|
16
18
|
let userExists = false;
|
|
17
19
|
try {
|
|
18
20
|
const cmd = `#!/bin/sh\ngetent passwd "${user}" > /dev/null`;
|
|
19
|
-
await (0,
|
|
21
|
+
await (0, utils_js_1.exec)(cmd, utils_js_2.default.setEcho(this.verbose));
|
|
20
22
|
userExists = true;
|
|
21
23
|
}
|
|
22
24
|
catch (error) {
|
|
@@ -29,7 +31,7 @@ async function delLiveUser() {
|
|
|
29
31
|
if (this.distro.familyId === 'archlinux') {
|
|
30
32
|
cmd = `chroot ${this.installTarget} sudo userdel -r ${user} ${this.toNull}`;
|
|
31
33
|
}
|
|
32
|
-
await (0,
|
|
34
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
*
|
|
8
8
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
9
9
|
*/
|
|
10
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
|
+
};
|
|
10
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
14
|
+
const utils_js_1 = __importDefault(require("../../classes/utils.js"));
|
|
15
|
+
const shelljs_1 = __importDefault(require("shelljs"));
|
|
14
16
|
/**
|
|
15
17
|
* fstab()
|
|
16
18
|
* @param devices
|
|
@@ -18,34 +20,34 @@ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
|
18
20
|
async function fstab(installDevice, crypted = false) {
|
|
19
21
|
let text = '';
|
|
20
22
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
* crypttab
|
|
24
|
+
*/
|
|
23
25
|
if (this.partitions.installationMode === 'full-encrypted') {
|
|
24
26
|
const crypttab = this.installTarget + '/etc/crypttab';
|
|
25
|
-
text =
|
|
26
|
-
text +=
|
|
27
|
-
text +=
|
|
28
|
-
text +=
|
|
29
|
-
text +=
|
|
30
|
-
text +=
|
|
31
|
-
text +=
|
|
32
|
-
text +=
|
|
33
|
-
text +=
|
|
34
|
-
text +=
|
|
35
|
-
text +=
|
|
36
|
-
text +=
|
|
37
|
-
text +=
|
|
38
|
-
text +=
|
|
27
|
+
text = '';
|
|
28
|
+
text += '# /etc/crypttab: mappings for encrypted partitions.\n';
|
|
29
|
+
text += '#\n';
|
|
30
|
+
text += '# Each mapped device will be created in /dev/mapper, so your /etc/fstab\n';
|
|
31
|
+
text += '# should use the /dev/mapper/<name> paths for encrypted devices.\n';
|
|
32
|
+
text += '#\n';
|
|
33
|
+
text += '# See crypttab(5) for the supported syntax.\n';
|
|
34
|
+
text += '#\n';
|
|
35
|
+
text += '# NOTE: You need not list your root (/) partition here, but it must be set up\n';
|
|
36
|
+
text += '# beforehand by the initramfs (/etc/mkinitcpio.conf). The same applies\n';
|
|
37
|
+
text += '# to encrypted swap, which should be set up with mkinitcpio-openswap\n';
|
|
38
|
+
text += '# for resume support.\n';
|
|
39
|
+
text += '#\n';
|
|
40
|
+
text += '# <name> <device> <password> <options>\n';
|
|
39
41
|
text += `#swap_crypted was ${this.devices.swap.cryptedFrom}\n`;
|
|
40
|
-
text += `swap_crypted UUID=${
|
|
42
|
+
text += `swap_crypted UUID=${utils_js_1.default.uuid(this.devices.swap.cryptedFrom)} none luks,discard\n`;
|
|
41
43
|
text += `#root_crypted was ${this.devices.root.cryptedFrom}\n`;
|
|
42
|
-
text += `root_crypted UUID=${
|
|
43
|
-
|
|
44
|
+
text += `root_crypted UUID=${utils_js_1.default.uuid(this.devices.root.cryptedFrom)} none luks,swap\n`;
|
|
45
|
+
utils_js_1.default.write(crypttab, text);
|
|
44
46
|
}
|
|
45
47
|
const fstab = this.installTarget + '/etc/fstab';
|
|
46
48
|
let mountOptsRoot = '';
|
|
47
49
|
let mountOptsBoot = '';
|
|
48
|
-
let mountOptsData =
|
|
50
|
+
let mountOptsData = '';
|
|
49
51
|
let mountOptsEfi = '';
|
|
50
52
|
let mountOptsSwap = '';
|
|
51
53
|
if (await isRotational(installDevice)) {
|
|
@@ -62,24 +64,24 @@ async function fstab(installDevice, crypted = false) {
|
|
|
62
64
|
mountOptsEfi = 'defaults,noatime 0 2';
|
|
63
65
|
mountOptsSwap = 'defaults,noatime 0 2';
|
|
64
66
|
}
|
|
65
|
-
text =
|
|
67
|
+
text = '';
|
|
66
68
|
text += `# ${this.devices.root.name} ${this.devices.root.mountPoint} ${this.devices.root.fsType} ${mountOptsRoot}\n`;
|
|
67
|
-
text += `UUID=${
|
|
68
|
-
if (this.devices.boot.name !==
|
|
69
|
+
text += `UUID=${utils_js_1.default.uuid(this.devices.root.name)} ${this.devices.root.mountPoint} ${this.devices.root.fsType} ${mountOptsRoot}\n`;
|
|
70
|
+
if (this.devices.boot.name !== 'none') {
|
|
69
71
|
text += `# ${this.devices.boot.name} ${this.devices.boot.mountPoint} ${this.devices.boot.fsType} ${mountOptsBoot}\n`;
|
|
70
|
-
text += `UUID=${
|
|
72
|
+
text += `UUID=${utils_js_1.default.uuid(this.devices.boot.name)} ${this.devices.boot.mountPoint} ${this.devices.root.fsType} ${mountOptsBoot}\n`;
|
|
71
73
|
}
|
|
72
|
-
if (this.devices.data.name !==
|
|
74
|
+
if (this.devices.data.name !== 'none') {
|
|
73
75
|
text += `# ${this.devices.data.name} ${this.devices.data.mountPoint} ${this.devices.data.fsType} ${mountOptsData}\n`;
|
|
74
|
-
text += `UUID=${
|
|
76
|
+
text += `UUID=${utils_js_1.default.uuid(this.devices.data.name)} ${this.devices.data.mountPoint} ${this.devices.data.fsType} ${mountOptsData}\n`;
|
|
75
77
|
}
|
|
76
78
|
if (this.efi) {
|
|
77
79
|
text += `# ${this.devices.efi.name} ${this.devices.efi.mountPoint} vfat ${mountOptsEfi}\n`;
|
|
78
|
-
text += `UUID=${
|
|
80
|
+
text += `UUID=${utils_js_1.default.uuid(this.devices.efi.name)} ${this.devices.efi.mountPoint} vfat ${mountOptsEfi}\n`;
|
|
79
81
|
}
|
|
80
82
|
text += `# ${this.devices.swap.name} ${this.devices.swap.mountPoint} ${this.devices.swap.fsType} ${mountOptsSwap}\n`;
|
|
81
|
-
text += `UUID=${
|
|
82
|
-
|
|
83
|
+
text += `UUID=${utils_js_1.default.uuid(this.devices.swap.name)} ${this.devices.swap.mountPoint} ${this.devices.swap.fsType} ${mountOptsSwap}\n`;
|
|
84
|
+
utils_js_1.default.write(fstab, text);
|
|
83
85
|
}
|
|
84
86
|
exports.default = fstab;
|
|
85
87
|
/**
|
|
@@ -87,7 +89,7 @@ exports.default = fstab;
|
|
|
87
89
|
* @param device
|
|
88
90
|
*/
|
|
89
91
|
async function isRotational(device) {
|
|
90
|
-
device = device.
|
|
92
|
+
device = device.slice(4);
|
|
91
93
|
let response;
|
|
92
94
|
let retVal = false;
|
|
93
95
|
response = shelljs_1.default.exec(`cat /sys/block/${device}/queue/rotational`, { silent: true }).stdout.trim();
|
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
*
|
|
8
8
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
9
9
|
*/
|
|
10
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
|
+
};
|
|
10
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
14
|
+
const utils_js_1 = __importDefault(require("../../classes/utils.js"));
|
|
15
|
+
const fs_1 = __importDefault(require("fs"));
|
|
14
16
|
/**
|
|
15
17
|
* grubcfg
|
|
16
18
|
* - open /etc/default/grub
|
|
@@ -19,16 +21,16 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
|
19
21
|
* 's/GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=/g'
|
|
20
22
|
*/
|
|
21
23
|
async function grubcfg() {
|
|
22
|
-
|
|
24
|
+
const file = `${this.installTarget}/etc/default/grub`;
|
|
23
25
|
let content = '';
|
|
24
26
|
const grubs = fs_1.default.readFileSync(file, 'utf-8').split('\n');
|
|
25
27
|
for (let i = 0; i < grubs.length; i++) {
|
|
26
28
|
if (grubs[i].includes('GRUB_CMDLINE_LINUX_DEFAULT=')) {
|
|
27
29
|
if (this.partitions.installationMode === 'full-encrypted') {
|
|
28
|
-
grubs[i] = `GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=${
|
|
30
|
+
grubs[i] = `GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=${utils_js_1.default.uuid(this.devices.swap.name)}"`;
|
|
29
31
|
}
|
|
30
32
|
else {
|
|
31
|
-
grubs[i] = `GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=${
|
|
33
|
+
grubs[i] = `GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=${utils_js_1.default.uuid(this.devices.swap.name)}"`;
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
content += grubs[i] + '\n';
|
|
@@ -7,27 +7,29 @@
|
|
|
7
7
|
*
|
|
8
8
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
9
9
|
*/
|
|
10
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
|
+
};
|
|
10
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
const
|
|
12
|
-
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
14
|
+
const fs_1 = __importDefault(require("fs"));
|
|
13
15
|
/**
|
|
14
16
|
* hostname
|
|
15
17
|
*/
|
|
16
18
|
async function hostname(domain = 'local') {
|
|
17
|
-
|
|
19
|
+
const hostname = this.users.hostname;
|
|
18
20
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
* hostname
|
|
22
|
+
*/
|
|
21
23
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
const file = this.installTarget + '/etc/hostname';
|
|
25
|
+
const text = hostname;
|
|
24
26
|
fs_1.default.writeFileSync(file, text);
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
* hosts
|
|
30
|
+
*/
|
|
29
31
|
{
|
|
30
|
-
|
|
32
|
+
const file = this.installTarget + '/etc/hosts';
|
|
31
33
|
let text = '127.0.0.1 localhost localhost.localdomain\n';
|
|
32
34
|
if (this.network.addressType === 'static') {
|
|
33
35
|
text += `${this.network.address} ${hostname} pvelocalhost\n`;
|
|
@@ -35,13 +37,13 @@ async function hostname(domain = 'local') {
|
|
|
35
37
|
else {
|
|
36
38
|
text += `127.0.1.1 ${hostname}.${domain} ${hostname} \n`;
|
|
37
39
|
}
|
|
38
|
-
text +=
|
|
39
|
-
text +=
|
|
40
|
-
text +=
|
|
41
|
-
text +=
|
|
42
|
-
text +=
|
|
43
|
-
text +=
|
|
44
|
-
text +=
|
|
40
|
+
text += '# The following lines are desirable for IPv6 capable hosts\n';
|
|
41
|
+
text += ':: 1 ip6 - localhost ip6 - loopback\n';
|
|
42
|
+
text += 'fe00:: 0 ip6 - localnet\n';
|
|
43
|
+
text += 'ff00:: 0 ip6 - mcastprefix\n';
|
|
44
|
+
text += 'ff02:: 1 ip6 - allnodes\n';
|
|
45
|
+
text += 'ff02:: 2 ip6 - allrouters\n';
|
|
46
|
+
text += 'ff02:: 3 ip6 - allhosts\n';
|
|
45
47
|
fs_1.default.writeFileSync(file, text);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
*
|
|
8
8
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
9
9
|
*/
|
|
10
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
|
+
};
|
|
10
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
const
|
|
12
|
-
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
14
|
+
const utils_js_1 = __importDefault(require("../../classes/utils.js"));
|
|
13
15
|
/**
|
|
14
16
|
*
|
|
15
17
|
* @param this
|
|
@@ -23,9 +25,9 @@ async function initramfsCfg(installDevice) {
|
|
|
23
25
|
text += '#RESUME=none\n';
|
|
24
26
|
}
|
|
25
27
|
else {
|
|
26
|
-
text += 'RESUME=UUID=' +
|
|
28
|
+
text += 'RESUME=UUID=' + utils_js_1.default.uuid(this.devices.swap.name);
|
|
27
29
|
}
|
|
28
|
-
|
|
30
|
+
utils_js_1.default.write(file, text);
|
|
29
31
|
}
|
|
30
32
|
else if (this.distro.familyId === 'archlinux') {
|
|
31
33
|
console.log('initramfsCfg skipped');
|
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
*
|
|
8
8
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
9
9
|
*/
|
|
10
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
|
+
};
|
|
10
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
14
|
+
const utils_js_1 = require("../../lib/utils.js");
|
|
15
|
+
const utils_js_2 = __importDefault(require("../../classes/utils.js"));
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
15
17
|
/**
|
|
16
18
|
* initramfs()
|
|
17
19
|
*/
|
|
@@ -19,31 +21,31 @@ async function initramfs() {
|
|
|
19
21
|
if (this.distro.familyId === 'debian') {
|
|
20
22
|
let cmd = `chroot ${this.installTarget} mkinitramfs -o ~/initrd.img-$(uname -r) ${this.toNull}`;
|
|
21
23
|
try {
|
|
22
|
-
await (0,
|
|
24
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
23
25
|
}
|
|
24
|
-
catch
|
|
25
|
-
await
|
|
26
|
+
catch {
|
|
27
|
+
await utils_js_2.default.pressKeyToExit(cmd);
|
|
26
28
|
}
|
|
27
29
|
cmd = `chroot ${this.installTarget} mv ~/initrd.img-$(uname -r) /boot ${this.toNull}`;
|
|
28
30
|
try {
|
|
29
|
-
await (0,
|
|
31
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
30
32
|
}
|
|
31
|
-
catch
|
|
32
|
-
await
|
|
33
|
+
catch {
|
|
34
|
+
await utils_js_2.default.pressKeyToExit(cmd);
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
else if (this.distro.familyId === 'archlinux') {
|
|
36
|
-
let initrdImg =
|
|
37
|
-
initrdImg = initrdImg.
|
|
38
|
+
let initrdImg = utils_js_2.default.initrdImg();
|
|
39
|
+
initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
|
|
38
40
|
let cmd = `mkinitcpio -c ${path_1.default.resolve(__dirname, '../../../mkinitcpio/arch/mkinitcpio-install.conf')} -g ${this.installTarget}/boot/${initrdImg}`; // ${this.toNull}
|
|
39
41
|
if (this.distro.codenameId === 'Qonos' || this.distro.codenameId === 'Ruah' || this.distro.codenameId === 'Sikaris') {
|
|
40
42
|
cmd = `mkinitcpio -c ${path_1.default.resolve(__dirname, '../../../mkinitcpio/manjaro/mkinitcpio-install.conf')} -g ${this.installTarget}/boot/${initrdImg}`; // ${this.toNull}
|
|
41
43
|
}
|
|
42
44
|
try {
|
|
43
|
-
await (0,
|
|
45
|
+
await (0, utils_js_1.exec)(cmd, utils_js_2.default.setEcho(true));
|
|
44
46
|
}
|
|
45
|
-
catch
|
|
46
|
-
await
|
|
47
|
+
catch {
|
|
48
|
+
await utils_js_2.default.pressKeyToExit(cmd);
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
*
|
|
8
8
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
9
9
|
*/
|
|
10
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
|
+
};
|
|
10
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
const
|
|
12
|
-
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
14
|
+
const fs_1 = __importDefault(require("fs"));
|
|
13
15
|
/* localeCfg
|
|
14
16
|
* Enable the configured locales (those set by the user on the
|
|
15
17
|
* user page) in /etc/locale.gen, if they are available in the
|
|
@@ -17,29 +19,29 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
|
17
19
|
*/
|
|
18
20
|
async function localeCfg() {
|
|
19
21
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
* influence: - locale-gen
|
|
23
|
+
*/
|
|
22
24
|
let supporteds = [];
|
|
23
25
|
if (this.distro.familyId === 'debian') {
|
|
24
26
|
// Format: en_US.UTF-8 UTF-8
|
|
25
27
|
supporteds = fs_1.default.readFileSync('/usr/share/i18n/SUPPORTED', 'utf-8').split('\n');
|
|
26
28
|
}
|
|
27
29
|
else if (this.distro.familyId === 'archlinux') {
|
|
28
|
-
// shx.exec('localectl list-locales > /tmp/SUPPORTED') // with await exec don't work!
|
|
30
|
+
// shx.exec('localectl list-locales > /tmp/SUPPORTED') // with await exec don't work!
|
|
29
31
|
const supportedsSource = fs_1.default.readFileSync('/etc/locale.gen', 'utf-8').split('\n');
|
|
30
|
-
// Original Format: #en_US.UTF-8 UTF-8
|
|
32
|
+
// Original Format: #en_US.UTF-8 UTF-8
|
|
31
33
|
for (let line of supportedsSource) {
|
|
32
|
-
if (line.
|
|
33
|
-
line = line.
|
|
34
|
+
if (line.slice(0, 2) !== '# ') { // se non è un commento
|
|
35
|
+
line = line.slice(1); // Rimuove #
|
|
34
36
|
}
|
|
35
37
|
supporteds.push(line);
|
|
36
38
|
}
|
|
37
|
-
// Format: en_US.UTF-8 UTF-8
|
|
39
|
+
// Format: en_US.UTF-8 UTF-8
|
|
38
40
|
}
|
|
39
41
|
const localeGenSource = fs_1.default.readFileSync(`${this.installTarget}/etc/locale.gen`, 'utf-8').split('\n');
|
|
40
42
|
let localeGenDest = '';
|
|
41
43
|
const krillBookmark = '# Locales enabled by krill\n';
|
|
42
|
-
for (
|
|
44
|
+
for (const line of localeGenSource) {
|
|
43
45
|
if (line.includes(krillBookmark)) {
|
|
44
46
|
break;
|
|
45
47
|
}
|