penguins-eggs 9.3.28 → 9.3.30
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/dist/classes/bleach.js +22 -22
- package/dist/classes/daddy.js +25 -25
- package/dist/classes/family/archlinux.js +16 -16
- package/dist/classes/family/debian.js +23 -23
- package/dist/classes/family/fedora.js +14 -14
- package/dist/classes/family/suse.js +14 -14
- package/dist/classes/incubation/distros/bionic.js +5 -4
- package/dist/classes/incubation/distros/buster.js +5 -4
- package/dist/classes/incubation/distros/focal.js +5 -4
- package/dist/classes/incubation/distros/jessie.js +2 -2
- package/dist/classes/incubation/distros/rolling.js +6 -4
- package/dist/classes/incubation/fisherman-helper/displaymanager.js +2 -2
- package/dist/classes/incubation/fisherman-helper/packages.js +6 -6
- package/dist/classes/incubation/fisherman.js +13 -17
- package/dist/classes/incubation/incubator.js +26 -25
- package/dist/classes/incubation/installer.js +5 -5
- package/dist/classes/keyboards.js +5 -5
- package/dist/classes/locales.js +6 -6
- package/dist/classes/n8.js +1 -1
- package/dist/classes/network.js +6 -0
- package/dist/classes/ovary.js +235 -225
- package/dist/classes/pacman.js +121 -121
- package/dist/classes/pve-live.js +2 -2
- package/dist/classes/pxe.js +32 -32
- package/dist/classes/settings.js +24 -24
- package/dist/classes/sources_list.js +8 -8
- package/dist/classes/systemctl.js +11 -11
- package/dist/classes/tailor.js +57 -57
- package/dist/classes/tools.js +2 -2
- package/dist/classes/users.js +2 -2
- package/dist/classes/utils.js +12 -12
- package/dist/classes/xdg.js +38 -38
- package/dist/classes/yolk.js +27 -27
- package/dist/commands/adapt.js +15 -9
- package/dist/commands/analyze.js +11 -11
- package/dist/commands/calamares.js +19 -19
- package/dist/commands/config.js +67 -67
- package/dist/commands/cuckoo.js +8 -8
- package/dist/commands/dad.js +8 -8
- package/dist/commands/export/deb.js +9 -9
- package/dist/commands/export/iso.js +8 -8
- package/dist/commands/install.js +8 -8
- package/dist/commands/kill.js +11 -12
- package/dist/commands/mom.js +5 -5
- package/dist/commands/produce.js +15 -15
- package/dist/commands/status.js +2 -2
- package/dist/commands/syncfrom.js +34 -34
- package/dist/commands/syncto.js +42 -42
- package/dist/commands/tools/clean.js +7 -7
- package/dist/commands/tools/ppa.js +17 -17
- package/dist/commands/tools/skel.js +11 -11
- package/dist/commands/tools/stat.js +2 -2
- package/dist/commands/tools/yolk.js +6 -6
- package/dist/commands/update.js +21 -21
- package/dist/commands/wardrobe/get.js +13 -7
- package/dist/commands/wardrobe/list.js +11 -5
- package/dist/commands/wardrobe/show.js +10 -7
- package/dist/commands/wardrobe/wear.js +16 -10
- package/dist/components/elements/information.js +16 -16
- package/dist/components/finished.js +4 -4
- package/dist/components/install.js +4 -4
- package/dist/components/keyboard.js +4 -4
- package/dist/components/location.js +4 -4
- package/dist/components/network.js +4 -4
- package/dist/components/partitions.js +4 -4
- package/dist/components/summary.js +4 -4
- package/dist/components/users.js +4 -4
- package/dist/components/welcome.js +4 -4
- package/dist/krill/krill-prepare.js +84 -84
- package/dist/krill/krill-sequence.js +140 -140
- package/dist/krill/modules/add-user.js +6 -6
- package/dist/krill/modules/bootloader-config-ubuntu.js +21 -21
- package/dist/krill/modules/bootloader.js +6 -6
- package/dist/krill/modules/change-password.js +2 -2
- package/dist/krill/modules/del-live-user.js +5 -5
- package/dist/krill/modules/fstab.js +10 -10
- package/dist/krill/modules/grubcfg.js +3 -3
- package/dist/krill/modules/initramfs-cfg.js +3 -3
- package/dist/krill/modules/initramfs.js +9 -9
- package/dist/krill/modules/locale.js +4 -4
- package/dist/krill/modules/m-keyboard.js +9 -9
- package/dist/krill/modules/m-timezone.js +3 -3
- package/dist/krill/modules/machine-id.js +3 -3
- package/dist/krill/modules/mkfs.js +6 -6
- package/dist/krill/modules/mount-fs.js +13 -13
- package/dist/krill/modules/mount-vfs.js +12 -12
- package/dist/krill/modules/network-cfg.js +5 -5
- package/dist/krill/modules/packages.js +10 -10
- package/dist/krill/modules/partition.js +69 -69
- package/dist/krill/modules/umount.js +6 -6
- package/dist/krill/modules/unpackfs.js +4 -4
- package/dist/lib/cli-autologin.js +12 -12
- package/dist/lib/select_keyboard_layout.js +2 -2
- package/dist/lib/select_keyboard_model.js +2 -2
- package/dist/lib/select_keyboard_option.js +2 -2
- package/dist/lib/select_keyboard_variant.js +2 -2
- package/dist/lib/select_languages.js +2 -2
- package/package.json +1 -1
|
@@ -6,8 +6,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const utils_1 = __importDefault(require("../../classes/utils"));
|
|
10
|
+
const utils_2 = require("../../lib/utils");
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
13
|
* @param this
|
|
@@ -24,20 +24,20 @@ async function addUser(name = 'live', password = 'evolution', fullName = '', roo
|
|
|
24
24
|
if (this.distro.familyId === 'archlinux') {
|
|
25
25
|
cmd = `chroot ${this.installTarget} useradd --create-home --shell /bin/bash ${name} ${this.toNull}`;
|
|
26
26
|
}
|
|
27
|
-
await (0,
|
|
27
|
+
await (0, utils_2.exec)(cmd, this.echo);
|
|
28
28
|
cmd = `echo ${name}:${password} | chroot ${this.installTarget} chpasswd ${this.toNull}`;
|
|
29
29
|
// echo ${name}:${password} | chroot ${this.installTarget} chpasswd ${this.toNull}
|
|
30
|
-
await (0,
|
|
30
|
+
await (0, utils_2.exec)(cmd, this.echo);
|
|
31
31
|
// Debian
|
|
32
32
|
cmd = `chroot ${this.installTarget} usermod -aG sudo ${name} ${this.toNull}`;
|
|
33
33
|
if (this.distro.familyId === 'archlinux') {
|
|
34
34
|
cmd = `chroot ${this.installTarget} usermod -aG wheel ${name}`;
|
|
35
35
|
}
|
|
36
36
|
try {
|
|
37
|
-
await (0,
|
|
37
|
+
await (0, utils_2.exec)(cmd, this.echo);
|
|
38
38
|
}
|
|
39
39
|
catch {
|
|
40
|
-
await
|
|
40
|
+
await utils_1.default.pressKeyToExit(cmd);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
exports.default = addUser;
|
|
@@ -6,8 +6,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const utils_1 = require("../../lib/utils");
|
|
10
|
+
const utils_2 = __importDefault(require("../../classes/utils"));
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
13
|
* @param this
|
|
@@ -16,80 +16,80 @@ async function bootloaderConfigUbuntu() {
|
|
|
16
16
|
let cmd = '';
|
|
17
17
|
try {
|
|
18
18
|
cmd = `chroot ${this.installTarget} apt-get update -y ${this.toNull}`;
|
|
19
|
-
await (0,
|
|
19
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
20
20
|
}
|
|
21
21
|
catch (error) {
|
|
22
22
|
console.log(error);
|
|
23
|
-
await
|
|
23
|
+
await utils_2.default.pressKeyToExit(cmd, true);
|
|
24
24
|
}
|
|
25
25
|
try {
|
|
26
26
|
cmd = `chroot ${this.installTarget} sleep 1 ${this.toNull}`;
|
|
27
|
-
await (0,
|
|
27
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
30
|
console.log(error);
|
|
31
|
-
await
|
|
31
|
+
await utils_2.default.pressKeyToExit(cmd, true);
|
|
32
32
|
}
|
|
33
33
|
const aptInstallOptions = ' apt install -y --no-upgrade --allow-unauthenticated -o Acquire::gpgv::Options::=--ignore-time-conflict ';
|
|
34
34
|
if (this.efi) {
|
|
35
35
|
try {
|
|
36
|
-
cmd = `chroot ${this.installTarget} ${aptInstallOptions} grub-efi-${
|
|
37
|
-
await (0,
|
|
36
|
+
cmd = `chroot ${this.installTarget} ${aptInstallOptions} grub-efi-${utils_2.default.machineArch()} --allow-unauthenticated ${this.toNull}`;
|
|
37
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
38
38
|
}
|
|
39
39
|
catch (error) {
|
|
40
40
|
console.log(error);
|
|
41
|
-
await
|
|
41
|
+
await utils_2.default.pressKeyToExit(cmd, true);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
else {
|
|
45
45
|
try {
|
|
46
46
|
cmd = `chroot ${this.installTarget} ${aptInstallOptions} grub-pc ${this.toNull}`;
|
|
47
|
-
await (0,
|
|
47
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
48
48
|
}
|
|
49
49
|
catch (error) {
|
|
50
50
|
console.log(error);
|
|
51
|
-
await
|
|
51
|
+
await utils_2.default.pressKeyToExit(cmd, true);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
try {
|
|
55
55
|
cmd = `chroot ${this.installTarget} sleep 1 ${this.toNull}`;
|
|
56
|
-
await (0,
|
|
56
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
57
57
|
}
|
|
58
58
|
catch (error) {
|
|
59
59
|
console.log(error);
|
|
60
|
-
await
|
|
60
|
+
await utils_2.default.pressKeyToExit(cmd, true);
|
|
61
61
|
}
|
|
62
62
|
try {
|
|
63
63
|
cmd = `chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`;
|
|
64
|
-
await (0,
|
|
64
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
65
65
|
}
|
|
66
66
|
catch (error) {
|
|
67
67
|
console.log(error);
|
|
68
|
-
await
|
|
68
|
+
await utils_2.default.pressKeyToExit(cmd, true);
|
|
69
69
|
}
|
|
70
70
|
try {
|
|
71
71
|
cmd = `chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`;
|
|
72
|
-
await (0,
|
|
72
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
73
73
|
}
|
|
74
74
|
catch (error) {
|
|
75
75
|
console.log(error);
|
|
76
|
-
await
|
|
76
|
+
await utils_2.default.pressKeyToExit(cmd, true);
|
|
77
77
|
}
|
|
78
78
|
try {
|
|
79
79
|
cmd = `chroot ${this.installTarget} update-grub ${this.toNull}`;
|
|
80
|
-
await (0,
|
|
80
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
81
81
|
}
|
|
82
82
|
catch (error) {
|
|
83
83
|
console.log(error);
|
|
84
|
-
await
|
|
84
|
+
await utils_2.default.pressKeyToExit(cmd, true);
|
|
85
85
|
}
|
|
86
86
|
try {
|
|
87
87
|
cmd = `chroot ${this.installTarget} sleep 1 ${this.toNull}`;
|
|
88
|
-
await (0,
|
|
88
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
89
89
|
}
|
|
90
90
|
catch (error) {
|
|
91
91
|
console.log(error);
|
|
92
|
-
await
|
|
92
|
+
await utils_2.default.pressKeyToExit(cmd, true);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
exports.default = bootloaderConfigUbuntu;
|
|
@@ -6,8 +6,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const utils_1 = require("../../lib/utils");
|
|
10
|
+
const utils_2 = __importDefault(require("../../classes/utils"));
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
13
|
* @param this
|
|
@@ -15,17 +15,17 @@ const utils_js_2 = __importDefault(require("../../classes/utils.js"));
|
|
|
15
15
|
async function bootloader() {
|
|
16
16
|
let cmd = `chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`;
|
|
17
17
|
try {
|
|
18
|
-
await (0,
|
|
18
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
19
19
|
}
|
|
20
20
|
catch {
|
|
21
|
-
await
|
|
21
|
+
await utils_2.default.pressKeyToExit(cmd);
|
|
22
22
|
}
|
|
23
23
|
cmd = `chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`;
|
|
24
24
|
try {
|
|
25
|
-
await (0,
|
|
25
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
26
26
|
}
|
|
27
27
|
catch {
|
|
28
|
-
await
|
|
28
|
+
await utils_2.default.pressKeyToExit(cmd);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
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_1 = require("../../lib/utils");
|
|
7
7
|
/**
|
|
8
8
|
* changePassword
|
|
9
9
|
* @param name
|
|
@@ -11,6 +11,6 @@ const utils_js_1 = require("../../lib/utils.js");
|
|
|
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_1.exec)(cmd, this.echo);
|
|
15
15
|
}
|
|
16
16
|
exports.default = changePassword;
|
|
@@ -6,19 +6,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const utils_1 = require("../../lib/utils");
|
|
10
|
+
const utils_2 = __importDefault(require("../../classes/utils"));
|
|
11
11
|
/**
|
|
12
12
|
* delUser
|
|
13
13
|
* va corretto con users.conf di calamares
|
|
14
14
|
*/
|
|
15
15
|
async function delLiveUser() {
|
|
16
|
-
if (
|
|
16
|
+
if (utils_2.default.isLive()) {
|
|
17
17
|
const user = this.settings.config.user_opt;
|
|
18
18
|
let userExists = false;
|
|
19
19
|
try {
|
|
20
20
|
const cmd = `#!/bin/sh\ngetent passwd "${user}" > /dev/null`;
|
|
21
|
-
await (0,
|
|
21
|
+
await (0, utils_1.exec)(cmd, utils_2.default.setEcho(this.verbose));
|
|
22
22
|
userExists = true;
|
|
23
23
|
}
|
|
24
24
|
catch (error) {
|
|
@@ -31,7 +31,7 @@ async function delLiveUser() {
|
|
|
31
31
|
if (this.distro.familyId === 'archlinux') {
|
|
32
32
|
cmd = `chroot ${this.installTarget} sudo userdel -r ${user} ${this.toNull}`;
|
|
33
33
|
}
|
|
34
|
-
await (0,
|
|
34
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -11,7 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
const
|
|
14
|
+
const utils_1 = __importDefault(require("../../classes/utils"));
|
|
15
15
|
const shelljs_1 = __importDefault(require("shelljs"));
|
|
16
16
|
/**
|
|
17
17
|
* fstab()
|
|
@@ -39,10 +39,10 @@ async function fstab(installDevice, crypted = false) {
|
|
|
39
39
|
text += '#\n';
|
|
40
40
|
text += '# <name> <device> <password> <options>\n';
|
|
41
41
|
text += `#swap_crypted was ${this.devices.swap.cryptedFrom}\n`;
|
|
42
|
-
text += `swap_crypted UUID=${
|
|
42
|
+
text += `swap_crypted UUID=${utils_1.default.uuid(this.devices.swap.cryptedFrom)} none luks,discard\n`;
|
|
43
43
|
text += `#root_crypted was ${this.devices.root.cryptedFrom}\n`;
|
|
44
|
-
text += `root_crypted UUID=${
|
|
45
|
-
|
|
44
|
+
text += `root_crypted UUID=${utils_1.default.uuid(this.devices.root.cryptedFrom)} none luks,swap\n`;
|
|
45
|
+
utils_1.default.write(crypttab, text);
|
|
46
46
|
}
|
|
47
47
|
const fstab = this.installTarget + '/etc/fstab';
|
|
48
48
|
let mountOptsRoot = '';
|
|
@@ -66,22 +66,22 @@ async function fstab(installDevice, crypted = false) {
|
|
|
66
66
|
}
|
|
67
67
|
text = '';
|
|
68
68
|
text += `# ${this.devices.root.name} ${this.devices.root.mountPoint} ${this.devices.root.fsType} ${mountOptsRoot}\n`;
|
|
69
|
-
text += `UUID=${
|
|
69
|
+
text += `UUID=${utils_1.default.uuid(this.devices.root.name)} ${this.devices.root.mountPoint} ${this.devices.root.fsType} ${mountOptsRoot}\n`;
|
|
70
70
|
if (this.devices.boot.name !== 'none') {
|
|
71
71
|
text += `# ${this.devices.boot.name} ${this.devices.boot.mountPoint} ${this.devices.boot.fsType} ${mountOptsBoot}\n`;
|
|
72
|
-
text += `UUID=${
|
|
72
|
+
text += `UUID=${utils_1.default.uuid(this.devices.boot.name)} ${this.devices.boot.mountPoint} ${this.devices.root.fsType} ${mountOptsBoot}\n`;
|
|
73
73
|
}
|
|
74
74
|
if (this.devices.data.name !== 'none') {
|
|
75
75
|
text += `# ${this.devices.data.name} ${this.devices.data.mountPoint} ${this.devices.data.fsType} ${mountOptsData}\n`;
|
|
76
|
-
text += `UUID=${
|
|
76
|
+
text += `UUID=${utils_1.default.uuid(this.devices.data.name)} ${this.devices.data.mountPoint} ${this.devices.data.fsType} ${mountOptsData}\n`;
|
|
77
77
|
}
|
|
78
78
|
if (this.efi) {
|
|
79
79
|
text += `# ${this.devices.efi.name} ${this.devices.efi.mountPoint} vfat ${mountOptsEfi}\n`;
|
|
80
|
-
text += `UUID=${
|
|
80
|
+
text += `UUID=${utils_1.default.uuid(this.devices.efi.name)} ${this.devices.efi.mountPoint} vfat ${mountOptsEfi}\n`;
|
|
81
81
|
}
|
|
82
82
|
text += `# ${this.devices.swap.name} ${this.devices.swap.mountPoint} ${this.devices.swap.fsType} ${mountOptsSwap}\n`;
|
|
83
|
-
text += `UUID=${
|
|
84
|
-
|
|
83
|
+
text += `UUID=${utils_1.default.uuid(this.devices.swap.name)} ${this.devices.swap.mountPoint} ${this.devices.swap.fsType} ${mountOptsSwap}\n`;
|
|
84
|
+
utils_1.default.write(fstab, text);
|
|
85
85
|
}
|
|
86
86
|
exports.default = fstab;
|
|
87
87
|
/**
|
|
@@ -11,7 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
const
|
|
14
|
+
const utils_1 = __importDefault(require("../../classes/utils"));
|
|
15
15
|
const fs_1 = __importDefault(require("fs"));
|
|
16
16
|
/**
|
|
17
17
|
* grubcfg
|
|
@@ -27,10 +27,10 @@ async function grubcfg() {
|
|
|
27
27
|
for (let i = 0; i < grubs.length; i++) {
|
|
28
28
|
if (grubs[i].includes('GRUB_CMDLINE_LINUX_DEFAULT=')) {
|
|
29
29
|
if (this.partitions.installationMode === 'full-encrypted') {
|
|
30
|
-
grubs[i] = `GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=${
|
|
30
|
+
grubs[i] = `GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=${utils_1.default.uuid(this.devices.swap.name)}"`;
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
grubs[i] = `GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=${
|
|
33
|
+
grubs[i] = `GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=${utils_1.default.uuid(this.devices.swap.name)}"`;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
content += grubs[i] + '\n';
|
|
@@ -11,7 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
const
|
|
14
|
+
const utils_1 = __importDefault(require("../../classes/utils"));
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
* @param this
|
|
@@ -25,9 +25,9 @@ async function initramfsCfg(installDevice) {
|
|
|
25
25
|
text += '#RESUME=none\n';
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
text += 'RESUME=UUID=' +
|
|
28
|
+
text += 'RESUME=UUID=' + utils_1.default.uuid(this.devices.swap.name);
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
utils_1.default.write(file, text);
|
|
31
31
|
}
|
|
32
32
|
else if (this.distro.familyId === 'archlinux') {
|
|
33
33
|
console.log('initramfsCfg skipped');
|
|
@@ -11,8 +11,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const utils_1 = require("../../lib/utils");
|
|
15
|
+
const utils_2 = __importDefault(require("../../classes/utils"));
|
|
16
16
|
const path_1 = __importDefault(require("path"));
|
|
17
17
|
/**
|
|
18
18
|
* initramfs()
|
|
@@ -21,31 +21,31 @@ async function initramfs() {
|
|
|
21
21
|
if (this.distro.familyId === 'debian') {
|
|
22
22
|
let cmd = `chroot ${this.installTarget} mkinitramfs -o ~/initrd.img-$(uname -r) ${this.toNull}`;
|
|
23
23
|
try {
|
|
24
|
-
await (0,
|
|
24
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
25
25
|
}
|
|
26
26
|
catch {
|
|
27
|
-
await
|
|
27
|
+
await utils_2.default.pressKeyToExit(cmd);
|
|
28
28
|
}
|
|
29
29
|
cmd = `chroot ${this.installTarget} mv ~/initrd.img-$(uname -r) /boot ${this.toNull}`;
|
|
30
30
|
try {
|
|
31
|
-
await (0,
|
|
31
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
32
32
|
}
|
|
33
33
|
catch {
|
|
34
|
-
await
|
|
34
|
+
await utils_2.default.pressKeyToExit(cmd);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
else if (this.distro.familyId === 'archlinux') {
|
|
38
|
-
let initrdImg =
|
|
38
|
+
let initrdImg = utils_2.default.initrdImg();
|
|
39
39
|
initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
|
|
40
40
|
let cmd = `mkinitcpio -c ${path_1.default.resolve(__dirname, '../../../mkinitcpio/arch/mkinitcpio-install.conf')} -g ${this.installTarget}/boot/${initrdImg}`; // ${this.toNull}
|
|
41
41
|
if (this.distro.codenameId === 'Qonos' || this.distro.codenameId === 'Ruah' || this.distro.codenameId === 'Sikaris') {
|
|
42
42
|
cmd = `mkinitcpio -c ${path_1.default.resolve(__dirname, '../../../mkinitcpio/manjaro/mkinitcpio-install.conf')} -g ${this.installTarget}/boot/${initrdImg}`; // ${this.toNull}
|
|
43
43
|
}
|
|
44
44
|
try {
|
|
45
|
-
await (0,
|
|
45
|
+
await (0, utils_1.exec)(cmd, utils_2.default.setEcho(true));
|
|
46
46
|
}
|
|
47
47
|
catch {
|
|
48
|
-
await
|
|
48
|
+
await utils_2.default.pressKeyToExit(cmd);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -11,7 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
const
|
|
14
|
+
const utils_1 = __importDefault(require("../../classes/utils"));
|
|
15
15
|
/**
|
|
16
16
|
* locale
|
|
17
17
|
*/
|
|
@@ -39,16 +39,16 @@ async function locale() {
|
|
|
39
39
|
content += `LC_MEASUREMENT=${defaultLocale}\n`;
|
|
40
40
|
content += `LC_IDENTIFICATION=${defaultLocale}\n`;
|
|
41
41
|
content += `LC_ALL=${defaultLocale}\n`;
|
|
42
|
-
|
|
42
|
+
utils_1.default.write(file, content);
|
|
43
43
|
// /etc/locale.conf
|
|
44
44
|
file = this.installTarget + '/etc/locale.conf';
|
|
45
|
-
|
|
45
|
+
utils_1.default.write(file, content);
|
|
46
46
|
// timezone
|
|
47
47
|
try {
|
|
48
48
|
await this.timezone();
|
|
49
49
|
}
|
|
50
50
|
catch (error) {
|
|
51
|
-
await
|
|
51
|
+
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.default = locale;
|
|
@@ -11,8 +11,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const utils_1 = __importDefault(require("../../classes/utils"));
|
|
15
|
+
const utils_2 = require("../../lib/utils");
|
|
16
16
|
const fs_1 = __importDefault(require("fs"));
|
|
17
17
|
/**
|
|
18
18
|
*
|
|
@@ -29,15 +29,15 @@ async function mKeyboard() {
|
|
|
29
29
|
*/
|
|
30
30
|
// systemd as default
|
|
31
31
|
let cmd = `chroot ${this.installTarget} localectl set-keymap ${this.keyboardLayout}`;
|
|
32
|
-
if (!
|
|
32
|
+
if (!utils_1.default.isSystemd()) {
|
|
33
33
|
cmd = `chroot ${this.installTarget} setupcon ${this.toNull}`;
|
|
34
34
|
}
|
|
35
35
|
try {
|
|
36
|
-
await (0,
|
|
36
|
+
await (0, utils_2.exec)(cmd, this.echo);
|
|
37
37
|
}
|
|
38
38
|
catch (error) {
|
|
39
39
|
console.log(error);
|
|
40
|
-
|
|
40
|
+
utils_1.default.pressKeyToExit(cmd, true);
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* this must to be not necessary but...
|
|
@@ -46,7 +46,7 @@ async function mKeyboard() {
|
|
|
46
46
|
* force change /etc/vconsole.conf
|
|
47
47
|
* force change /etc/X11/xorg.conf.d/00-keyboard.conf
|
|
48
48
|
*/
|
|
49
|
-
if (
|
|
49
|
+
if (utils_1.default.isSystemd()) {
|
|
50
50
|
let content = '# KEYBOARD CONFIGURATION FILE\n\n';
|
|
51
51
|
content += '# Consult the keyboard(5) manual page.\n\n';
|
|
52
52
|
content += '# See penguins-eggs/src/krill/modules/m-keyboard.ts\n\n';
|
|
@@ -56,12 +56,12 @@ async function mKeyboard() {
|
|
|
56
56
|
content += 'XKBOPTIONS=""\n';
|
|
57
57
|
content += '\n';
|
|
58
58
|
content += 'BACKSPACE="guess"\n';
|
|
59
|
-
|
|
59
|
+
utils_1.default.write(this.installTarget + '/etc/default/keyboard', content);
|
|
60
60
|
content = '# See penguins-eggs/src/krill/modules/set-keyboard.ts\n\n';
|
|
61
61
|
content += 'KEYMAP="' + this.keyboardLayout + '"\n';
|
|
62
62
|
content += 'FONT=\n';
|
|
63
63
|
content += 'FONT_MAP=\n';
|
|
64
|
-
|
|
64
|
+
utils_1.default.write(this.installTarget + '/etc/vconsole.conf', content);
|
|
65
65
|
content = '# See penguins-eggs/src/krill/modules/set-keyboard.ts\n\n';
|
|
66
66
|
content += '# Read and parsed by systemd-localed. It\'s probably wise not to edit this file\n';
|
|
67
67
|
content += '# manually too freely.\n';
|
|
@@ -72,7 +72,7 @@ async function mKeyboard() {
|
|
|
72
72
|
content += 'EndSection\n';
|
|
73
73
|
// Not always exist /etc/X11/xorg.conf.d
|
|
74
74
|
if (fs_1.default.existsSync(this.installTarget + '/etc/X11/xorg.conf.d')) {
|
|
75
|
-
|
|
75
|
+
utils_1.default.write(this.installTarget + '/etc/X11/xorg.conf.d/00-keyboard.conf', content);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -11,7 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
const
|
|
14
|
+
const utils_1 = require("../../lib/utils");
|
|
15
15
|
const fs_1 = __importDefault(require("fs"));
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
@@ -20,9 +20,9 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
20
20
|
async function mTimezone() {
|
|
21
21
|
if (fs_1.default.existsSync('/etc/localtime')) {
|
|
22
22
|
const cmd = `chroot ${this.installTarget} unlink /etc/localtime`;
|
|
23
|
-
await (0,
|
|
23
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
24
24
|
}
|
|
25
25
|
const cmd = `chroot ${this.installTarget} ln -sf /usr/share/zoneinfo/${this.region}/${this.zone} /etc/localtime`;
|
|
26
|
-
await (0,
|
|
26
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
27
27
|
}
|
|
28
28
|
exports.default = mTimezone;
|
|
@@ -11,7 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
const
|
|
14
|
+
const utils_1 = require("../../lib/utils");
|
|
15
15
|
const fs_1 = __importDefault(require("fs"));
|
|
16
16
|
/**
|
|
17
17
|
* On Ubuntu
|
|
@@ -21,8 +21,8 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
21
21
|
async function machineId() {
|
|
22
22
|
const file = `${this.installTarget}/etc/machine-id`;
|
|
23
23
|
if (fs_1.default.existsSync(file)) {
|
|
24
|
-
await (0,
|
|
24
|
+
await (0, utils_1.exec)(`rm ${file}`, this.echo);
|
|
25
25
|
}
|
|
26
|
-
await (0,
|
|
26
|
+
await (0, utils_1.exec)(`touch ${file}`);
|
|
27
27
|
}
|
|
28
28
|
exports.default = machineId;
|
|
@@ -8,30 +8,30 @@
|
|
|
8
8
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
const
|
|
11
|
+
const utils_1 = require("../../lib/utils");
|
|
12
12
|
/**
|
|
13
13
|
* mkfs
|
|
14
14
|
*/
|
|
15
15
|
async function mkfs() {
|
|
16
16
|
const result = true;
|
|
17
17
|
if (this.efi) {
|
|
18
|
-
await (0,
|
|
18
|
+
await (0, utils_1.exec)(`mkdosfs -F 32 -I ${this.devices.efi.name} ${this.toNull}`, this.echo);
|
|
19
19
|
}
|
|
20
20
|
if (this.devices.boot.name !== 'none') {
|
|
21
21
|
if (this.devices.boot.fsType === undefined) {
|
|
22
22
|
this.devices.boot.fsType = 'ext2';
|
|
23
23
|
this.devices.boot.mountPoint = '/boot';
|
|
24
24
|
}
|
|
25
|
-
await (0,
|
|
25
|
+
await (0, utils_1.exec)(`mke2fs -Ft ${this.devices.boot.fsType} ${this.devices.boot.name} ${this.toNull}`, this.echo);
|
|
26
26
|
}
|
|
27
27
|
if (this.devices.root.name !== 'none') {
|
|
28
|
-
await (0,
|
|
28
|
+
await (0, utils_1.exec)(`mke2fs -Ft ${this.devices.root.fsType} ${this.devices.root.name} ${this.toNull}`, this.echo);
|
|
29
29
|
}
|
|
30
30
|
if (this.devices.data.name !== 'none') {
|
|
31
|
-
await (0,
|
|
31
|
+
await (0, utils_1.exec)(`mke2fs -Ft ${this.devices.data.fsType} ${this.devices.data.name} ${this.toNull}`, this.echo);
|
|
32
32
|
}
|
|
33
33
|
if (this.devices.swap.name !== 'none') {
|
|
34
|
-
await (0,
|
|
34
|
+
await (0, utils_1.exec)(`mkswap ${this.devices.swap.name} ${this.toNull}`, this.echo);
|
|
35
35
|
}
|
|
36
36
|
return result;
|
|
37
37
|
}
|
|
@@ -12,35 +12,35 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.umountFs = exports.mountFs = void 0;
|
|
15
|
-
const
|
|
15
|
+
const utils_1 = require("../../lib/utils");
|
|
16
16
|
const fs_1 = __importDefault(require("fs"));
|
|
17
17
|
/**
|
|
18
18
|
* mountFs
|
|
19
19
|
*/
|
|
20
20
|
async function mountFs() {
|
|
21
21
|
if (!fs_1.default.existsSync(this.installTarget)) {
|
|
22
|
-
await (0,
|
|
22
|
+
await (0, utils_1.exec)(`mkdir ${this.installTarget} ${this.toNull}`, this.echo);
|
|
23
23
|
}
|
|
24
24
|
// root
|
|
25
|
-
await (0,
|
|
26
|
-
await (0,
|
|
27
|
-
await (0,
|
|
25
|
+
await (0, utils_1.exec)(`mount ${this.devices.root.name} ${this.installTarget}${this.devices.root.mountPoint} ${this.toNull}`, this.echo);
|
|
26
|
+
await (0, utils_1.exec)(`tune2fs -c 0 -i 0 ${this.devices.root.name} ${this.toNull}`, this.echo);
|
|
27
|
+
await (0, utils_1.exec)(`rm -rf ${this.installTarget}/lost+found ${this.toNull}`, this.echo);
|
|
28
28
|
// boot
|
|
29
29
|
if (this.devices.boot.name !== 'none') {
|
|
30
|
-
await (0,
|
|
31
|
-
await (0,
|
|
32
|
-
await (0,
|
|
30
|
+
await (0, utils_1.exec)(`mkdir ${this.installTarget}/boot -p ${this.toNull}`, this.echo);
|
|
31
|
+
await (0, utils_1.exec)(`mount ${this.devices.boot.name} ${this.installTarget}${this.devices.boot.mountPoint} ${this.toNull}`, this.echo);
|
|
32
|
+
await (0, utils_1.exec)(`tune2fs -c 0 -i 0 ${this.devices.boot.name} ${this.toNull}`, this.echo);
|
|
33
33
|
}
|
|
34
34
|
// data
|
|
35
35
|
if (this.devices.data.name !== 'none') {
|
|
36
|
-
await (0,
|
|
37
|
-
await (0,
|
|
38
|
-
await (0,
|
|
36
|
+
await (0, utils_1.exec)(`mkdir ${this.installTarget}${this.devices.data.mountPoint} -p ${this.toNull}`, this.echo);
|
|
37
|
+
await (0, utils_1.exec)(`mount ${this.devices.data.name} ${this.installTarget}${this.devices.data.mountPoint} ${this.toNull}`, this.echo);
|
|
38
|
+
await (0, utils_1.exec)(`tune2fs -c 0 -i 0 ${this.devices.data.name} ${this.toNull}`, this.echo);
|
|
39
39
|
}
|
|
40
40
|
// efi
|
|
41
41
|
if (this.efi && !fs_1.default.existsSync(this.installTarget + this.devices.efi.mountPoint)) {
|
|
42
|
-
await (0,
|
|
43
|
-
await (0,
|
|
42
|
+
await (0, utils_1.exec)(`mkdir ${this.installTarget}${this.devices.efi.mountPoint} -p ${this.toNull}`, this.echo);
|
|
43
|
+
await (0, utils_1.exec)(`mount ${this.devices.efi.name} ${this.installTarget}${this.devices.efi.mountPoint} ${this.toNull}`, this.echo);
|
|
44
44
|
}
|
|
45
45
|
return true;
|
|
46
46
|
}
|
|
@@ -9,24 +9,24 @@
|
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.umountVfs = exports.mountVfs = void 0;
|
|
12
|
-
const
|
|
12
|
+
const utils_1 = require("../../lib/utils");
|
|
13
13
|
/**
|
|
14
14
|
* mountvfs()
|
|
15
15
|
*/
|
|
16
16
|
async function mountVfs() {
|
|
17
|
-
await (0,
|
|
18
|
-
await (0,
|
|
19
|
-
await (0,
|
|
20
|
-
await (0,
|
|
21
|
-
await (0,
|
|
22
|
-
await (0,
|
|
23
|
-
await (0,
|
|
24
|
-
await (0,
|
|
25
|
-
await (0,
|
|
17
|
+
await (0, utils_1.exec)(`mkdir ${this.installTarget}/dev ${this.toNull}`, this.echo);
|
|
18
|
+
await (0, utils_1.exec)(`mkdir ${this.installTarget}/dev/pts ${this.toNull}`, this.echo);
|
|
19
|
+
await (0, utils_1.exec)(`mkdir ${this.installTarget}/proc ${this.toNull}`, this.echo);
|
|
20
|
+
await (0, utils_1.exec)(`mkdir ${this.installTarget}/sys ${this.toNull}`, this.echo);
|
|
21
|
+
await (0, utils_1.exec)(`mkdir ${this.installTarget}/run ${this.toNull}`, this.echo);
|
|
22
|
+
await (0, utils_1.exec)(`mount -o bind /dev ${this.installTarget}/dev ${this.toNull}`, this.echo);
|
|
23
|
+
await (0, utils_1.exec)(`mount -o bind /dev/pts ${this.installTarget}/dev/pts ${this.toNull}`, this.echo);
|
|
24
|
+
await (0, utils_1.exec)(`mount -o bind /proc ${this.installTarget}/proc ${this.toNull}`, this.echo);
|
|
25
|
+
await (0, utils_1.exec)(`mount -o bind /sys ${this.installTarget}/sys ${this.toNull}`, this.echo);
|
|
26
26
|
if (this.efi) {
|
|
27
|
-
await (0,
|
|
27
|
+
await (0, utils_1.exec)(`mount -o bind /sys/firmware/efi/efivars ${this.installTarget}/sys/firmware/efi/efivars ${this.toNull}`, this.echo);
|
|
28
28
|
}
|
|
29
|
-
await (0,
|
|
29
|
+
await (0, utils_1.exec)(`mount -o rbind /run ${this.installTarget}/run ${this.toNull}`, this.echo);
|
|
30
30
|
}
|
|
31
31
|
exports.mountVfs = mountVfs;
|
|
32
32
|
/**
|