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
|
@@ -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 pacman_1 = __importDefault(require("../../classes/pacman"));
|
|
16
16
|
/**
|
|
17
17
|
/**
|
|
18
18
|
* networkcfg
|
|
@@ -24,7 +24,7 @@ const pacman_js_1 = __importDefault(require("../../classes/pacman.js"));
|
|
|
24
24
|
*/
|
|
25
25
|
async function networkCfg() {
|
|
26
26
|
if (this.distro.familyId === 'debian' && // if netplan, don't create entries in /etc/network/interfaces
|
|
27
|
-
!
|
|
27
|
+
!pacman_1.default.packageIsInstalled('netplan.io')) {
|
|
28
28
|
const file = this.installTarget + '/etc/network/interfaces';
|
|
29
29
|
let content = '# created by eggs\n\n';
|
|
30
30
|
content += 'auto lo\n';
|
|
@@ -36,7 +36,7 @@ async function networkCfg() {
|
|
|
36
36
|
content += ' netmask ' + this.network.netmask + '\n';
|
|
37
37
|
content += ' gateway ' + this.network.gateway + '\n';
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
utils_1.default.write(file, content);
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* resolv.conf
|
|
@@ -48,7 +48,7 @@ async function networkCfg() {
|
|
|
48
48
|
for (const element of this.network.dns) {
|
|
49
49
|
content += 'nameserver ' + element + '\n';
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
utils_1.default.write(file, content);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.default = networkCfg;
|
|
@@ -11,9 +11,9 @@ 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
|
|
16
|
-
const
|
|
14
|
+
const utils_1 = require("../../lib/utils");
|
|
15
|
+
const utils_2 = __importDefault(require("../../classes/utils"));
|
|
16
|
+
const pacman_1 = __importDefault(require("../../classes/pacman"));
|
|
17
17
|
const fs_1 = __importDefault(require("fs"));
|
|
18
18
|
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
19
19
|
/**
|
|
@@ -21,9 +21,9 @@ const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
|
21
21
|
* @param this
|
|
22
22
|
*/
|
|
23
23
|
async function packages() {
|
|
24
|
-
const echoYes =
|
|
24
|
+
const echoYes = utils_2.default.setEcho(true);
|
|
25
25
|
let modulePath = '/etc/penguins-eggs.d/krill/';
|
|
26
|
-
if (
|
|
26
|
+
if (pacman_1.default.packageIsInstalled('calamares')) {
|
|
27
27
|
modulePath = '/etc/calamares/';
|
|
28
28
|
}
|
|
29
29
|
const config_file = `${this.installTarget}${modulePath}modules/packages.conf`;
|
|
@@ -46,15 +46,15 @@ async function packages() {
|
|
|
46
46
|
for (const elem of remove) {
|
|
47
47
|
cmd += elem + ' ';
|
|
48
48
|
}
|
|
49
|
-
await (0,
|
|
49
|
+
await (0, utils_1.exec)(`${cmd} ${this.toNull}`, this.echo);
|
|
50
50
|
}
|
|
51
51
|
if (install.length > 0) {
|
|
52
52
|
let cmd = `chroot ${this.installTarget} apt-get install -y `;
|
|
53
53
|
for (const elem of install) {
|
|
54
54
|
cmd += elem + ' ';
|
|
55
55
|
}
|
|
56
|
-
await (0,
|
|
57
|
-
await (0,
|
|
56
|
+
await (0, utils_1.exec)(`chroot ${this.installTarget} apt-get update ${this.toNull}`, this.echo);
|
|
57
|
+
await (0, utils_1.exec)(`${cmd} ${this.toNull}`, this.echo);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
else if (packages.backend === 'pacman') {
|
|
@@ -66,11 +66,11 @@ async function packages() {
|
|
|
66
66
|
for (const elem of remove) {
|
|
67
67
|
cmd += elem + ' ';
|
|
68
68
|
}
|
|
69
|
-
await (0,
|
|
69
|
+
await (0, utils_1.exec)(`${cmd} ${echoYes}`, this.echo);
|
|
70
70
|
}
|
|
71
71
|
if (install.length > 0) {
|
|
72
72
|
for (const elem of install) {
|
|
73
|
-
await (0,
|
|
73
|
+
await (0, utils_1.exec)(`chroot ${this.installTarget} pacman -S ${elem}`, echoYes);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -12,8 +12,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.lvmPartInfo = void 0;
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const utils_1 = require("../../lib/utils");
|
|
16
|
+
const utils_2 = __importDefault(require("../../classes/utils"));
|
|
17
17
|
const shelljs_1 = __importDefault(require("shelljs"));
|
|
18
18
|
const os_1 = __importDefault(require("os"));
|
|
19
19
|
/**
|
|
@@ -21,7 +21,7 @@ const os_1 = __importDefault(require("os"));
|
|
|
21
21
|
* @param this
|
|
22
22
|
*/
|
|
23
23
|
async function partition() {
|
|
24
|
-
const echoYes =
|
|
24
|
+
const echoYes = utils_2.default.setEcho(true);
|
|
25
25
|
let retVal = false;
|
|
26
26
|
const installDevice = this.partitions.installationDevice;
|
|
27
27
|
/**
|
|
@@ -59,11 +59,11 @@ async function partition() {
|
|
|
59
59
|
* BIOS: working
|
|
60
60
|
* ===========================================================================================
|
|
61
61
|
*/
|
|
62
|
-
await (0,
|
|
63
|
-
await (0,
|
|
64
|
-
await (0,
|
|
65
|
-
await (0,
|
|
66
|
-
await (0,
|
|
62
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
|
|
63
|
+
await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary linux-swap 1MiB ${swapSize + 1}MiB`, this.echo); // dev/sda1 swap
|
|
64
|
+
await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 ${swapSize + 1}MiB 100%`, this.echo); // dev/sda2 root
|
|
65
|
+
await (0, utils_1.exec)(`parted ${installDevice} set 1 boot on`, this.echo);
|
|
66
|
+
await (0, utils_1.exec)(`parted ${installDevice} set 1 esp on`, this.echo);
|
|
67
67
|
// SWAP
|
|
68
68
|
this.devices.swap.name = `${installDevice}${p}1`;
|
|
69
69
|
this.devices.swap.fsType = 'swap';
|
|
@@ -84,27 +84,27 @@ async function partition() {
|
|
|
84
84
|
* BIOS: full-encrypt:
|
|
85
85
|
* ===========================================================================================
|
|
86
86
|
*/
|
|
87
|
-
await (0,
|
|
88
|
-
await (0,
|
|
89
|
-
await (0,
|
|
90
|
-
await (0,
|
|
91
|
-
await (0,
|
|
92
|
-
await (0,
|
|
87
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
|
|
88
|
+
await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 1MiB 512MiB`, this.echo); // sda1
|
|
89
|
+
await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary linux-swap 512MiB ${swapSize + 512}MiB`, this.echo); // sda2
|
|
90
|
+
await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext4 ${swapSize + 512}MiB 100%`, this.echo); // sda3
|
|
91
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
|
|
92
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
|
|
93
93
|
// BOOT 512M
|
|
94
94
|
this.devices.boot.name = `${installDevice}${p}1`; // 'boot'
|
|
95
95
|
this.devices.boot.fsType = 'ext4';
|
|
96
96
|
this.devices.boot.mountPoint = '/boot';
|
|
97
97
|
// SWAP 8G
|
|
98
98
|
// this.redraw(<Install message={`Formatting LUKS ${installDevice}2`} percent={0} />)
|
|
99
|
-
const crytoSwap = await (0,
|
|
99
|
+
const crytoSwap = await (0, utils_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}2`, echoYes);
|
|
100
100
|
if (crytoSwap.code !== 0) {
|
|
101
|
-
|
|
101
|
+
utils_2.default.warning(`Error: ${crytoSwap.code} ${crytoSwap.data}`);
|
|
102
102
|
process.exit(1);
|
|
103
103
|
}
|
|
104
104
|
// this.redraw(<Install message={`Opening ${installDevice}${p}2 as swap_crypted`} percent={0} />)
|
|
105
|
-
const crytoSwapOpen = await (0,
|
|
105
|
+
const crytoSwapOpen = await (0, utils_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}2 swap_crypted`, echoYes);
|
|
106
106
|
if (crytoSwapOpen.code !== 0) {
|
|
107
|
-
|
|
107
|
+
utils_2.default.warning(`Error: ${crytoSwapOpen.code} ${crytoSwapOpen.data}`);
|
|
108
108
|
process.exit(1);
|
|
109
109
|
}
|
|
110
110
|
this.devices.swap.name = '/dev/mapper/swap_crypted';
|
|
@@ -113,15 +113,15 @@ async function partition() {
|
|
|
113
113
|
this.devices.swap.mountPoint = 'none';
|
|
114
114
|
// ROOT
|
|
115
115
|
// this.redraw(<Install message={`Formatting LUKS ${installDevice}${p}3`} percent={0} />)
|
|
116
|
-
const crytoRoot = await (0,
|
|
116
|
+
const crytoRoot = await (0, utils_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}3`, echoYes);
|
|
117
117
|
if (crytoRoot.code !== 0) {
|
|
118
|
-
|
|
118
|
+
utils_2.default.warning(`Error: ${crytoRoot.code} ${crytoRoot.data}`);
|
|
119
119
|
process.exit(1);
|
|
120
120
|
}
|
|
121
121
|
// this.redraw(<Install message={`Opening ${installDevice}${p}3 as root_crypted`} percent={0} />)
|
|
122
|
-
const crytoRootOpen = await (0,
|
|
122
|
+
const crytoRootOpen = await (0, utils_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}3 root_crypted`, echoYes);
|
|
123
123
|
if (crytoRootOpen.code !== 0) {
|
|
124
|
-
|
|
124
|
+
utils_2.default.warning(`Error: ${crytoRootOpen.code} ${crytoRootOpen.data}`);
|
|
125
125
|
process.exit(1);
|
|
126
126
|
}
|
|
127
127
|
this.devices.root.name = '/dev/mapper/root_crypted';
|
|
@@ -139,12 +139,12 @@ async function partition() {
|
|
|
139
139
|
* UEFI: working
|
|
140
140
|
* ===========================================================================================
|
|
141
141
|
*/
|
|
142
|
-
await (0,
|
|
143
|
-
await (0,
|
|
144
|
-
await (0,
|
|
145
|
-
await (0,
|
|
146
|
-
await (0,
|
|
147
|
-
await (0,
|
|
142
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
|
|
143
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
|
|
144
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart swap linux-swap 256MiB ${swapSize + 256}Mib`, this.echo); // sda2 swap
|
|
145
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart root ext4 ${swapSize + 256}MiB 100%`, this.echo); // sda3 root
|
|
146
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
|
|
147
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
|
|
148
148
|
this.devices.efi.name = `${installDevice}${p}1`;
|
|
149
149
|
this.devices.efi.fsType = 'F 32 -I';
|
|
150
150
|
this.devices.efi.mountPoint = '/boot/efi';
|
|
@@ -166,13 +166,13 @@ async function partition() {
|
|
|
166
166
|
* UEFI, full-encrypt
|
|
167
167
|
* ===========================================================================================
|
|
168
168
|
*/
|
|
169
|
-
await (0,
|
|
170
|
-
await (0,
|
|
171
|
-
await (0,
|
|
172
|
-
await (0,
|
|
173
|
-
await (0,
|
|
174
|
-
await (0,
|
|
175
|
-
await (0,
|
|
169
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
|
|
170
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
|
|
171
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart boot ext4 256MiB 768MiB`, this.echo); // sda2 boot
|
|
172
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart swap linux-swap 768MiB ${swapSize + 768}MiB`, this.echo); // sda3 swap
|
|
173
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart root ext4 ${swapSize + 768}MiB 100%`, this.echo); // sda4 root
|
|
174
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
|
|
175
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
|
|
176
176
|
// EFI 256M
|
|
177
177
|
this.devices.efi.name = `${installDevice}${p}1`; // 'efi'
|
|
178
178
|
this.devices.efi.fsType = 'F 32 -I';
|
|
@@ -194,15 +194,15 @@ async function partition() {
|
|
|
194
194
|
*/
|
|
195
195
|
// SWAP 8G
|
|
196
196
|
// redraw(<Install message={`Formatting LUKS ${installDevice}${p}3`} percent={0} />)
|
|
197
|
-
const crytoSwap = await (0,
|
|
197
|
+
const crytoSwap = await (0, utils_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}3`, echoYes);
|
|
198
198
|
if (crytoSwap.code !== 0) {
|
|
199
|
-
|
|
199
|
+
utils_2.default.warning(`Error: ${crytoSwap.code} ${crytoSwap.data}`);
|
|
200
200
|
process.exit(1);
|
|
201
201
|
}
|
|
202
202
|
// this.redraw(<Install message={`Opening ${installDevice}${p}3 as swap_crypted`} percent={0} />)
|
|
203
|
-
const crytoSwapOpen = await (0,
|
|
203
|
+
const crytoSwapOpen = await (0, utils_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}3 swap_crypted`, echoYes);
|
|
204
204
|
if (crytoSwapOpen.code !== 0) {
|
|
205
|
-
|
|
205
|
+
utils_2.default.warning(`Error: ${crytoSwapOpen.code} ${crytoSwapOpen.data}`);
|
|
206
206
|
process.exit(1);
|
|
207
207
|
}
|
|
208
208
|
this.devices.swap.name = '/dev/mapper/swap_crypted';
|
|
@@ -211,15 +211,15 @@ async function partition() {
|
|
|
211
211
|
this.devices.swap.mountPoint = 'none';
|
|
212
212
|
// ROOT
|
|
213
213
|
// this.redraw(<Install message={`Formatting LUKS ${installDevice}${p}4`} percent={0} />)
|
|
214
|
-
const crytoRoot = await (0,
|
|
214
|
+
const crytoRoot = await (0, utils_1.exec)(`cryptsetup -y -v luksFormat --type luks2 ${installDevice}${p}4`, echoYes);
|
|
215
215
|
if (crytoRoot.code !== 0) {
|
|
216
|
-
|
|
216
|
+
utils_2.default.warning(`Error: ${crytoRoot.code} ${crytoRoot.data}`);
|
|
217
217
|
process.exit(1);
|
|
218
218
|
}
|
|
219
219
|
// this.redraw(<Install message={`Opening ${installDevice}${p}4 as root_crypted`} percent={0} />)
|
|
220
|
-
const crytoRootOpen = await (0,
|
|
220
|
+
const crytoRootOpen = await (0, utils_1.exec)(`cryptsetup luksOpen --type luks2 ${installDevice}${p}4 root_crypted`, echoYes);
|
|
221
221
|
if (crytoRootOpen.code !== 0) {
|
|
222
|
-
|
|
222
|
+
utils_2.default.warning(`Error: ${crytoRootOpen.code} ${crytoRootOpen.data}`);
|
|
223
223
|
process.exit(1);
|
|
224
224
|
}
|
|
225
225
|
this.devices.root.name = '/dev/mapper/root_crypted';
|
|
@@ -239,22 +239,22 @@ async function partition() {
|
|
|
239
239
|
* ===========================================================================================
|
|
240
240
|
*/
|
|
241
241
|
// Creo partizioni
|
|
242
|
-
await (0,
|
|
243
|
-
await (0,
|
|
244
|
-
await (0,
|
|
245
|
-
await (0,
|
|
246
|
-
await (0,
|
|
242
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mklabel msdos`, this.echo);
|
|
243
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart primary ext2 1 512`, this.echo); // sda1
|
|
244
|
+
await (0, utils_1.exec)(`parted --script --align optimal ${installDevice} mkpart primary ext2 512 100%`, this.echo); // sda2
|
|
245
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
|
|
246
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 2 lvm on`, this.echo); // sda2
|
|
247
247
|
const partInfo = await lvmPartInfo(installDevice);
|
|
248
248
|
const lvmPartname = partInfo[0];
|
|
249
249
|
const lvmSwapSize = partInfo[1];
|
|
250
250
|
const lvmRootSize = partInfo[2];
|
|
251
|
-
await (0,
|
|
252
|
-
await (0,
|
|
253
|
-
await (0,
|
|
254
|
-
await (0,
|
|
255
|
-
await (0,
|
|
256
|
-
await (0,
|
|
257
|
-
await (0,
|
|
251
|
+
await (0, utils_1.exec)(`pvcreate /dev/${lvmPartname}`, this.echo);
|
|
252
|
+
await (0, utils_1.exec)(`vgcreate pve /dev/${lvmPartname}`, this.echo);
|
|
253
|
+
await (0, utils_1.exec)('vgchange -an', this.echo);
|
|
254
|
+
await (0, utils_1.exec)(`lvcreate -L ${lvmSwapSize} -nswap pve`, this.echo);
|
|
255
|
+
await (0, utils_1.exec)(`lvcreate -L ${lvmRootSize} -nroot pve`, this.echo);
|
|
256
|
+
await (0, utils_1.exec)('lvcreate -l 100%FREE -ndata pve', this.echo);
|
|
257
|
+
await (0, utils_1.exec)('vgchange -a y pve', this.echo);
|
|
258
258
|
this.devices.efi.name = 'none';
|
|
259
259
|
this.devices.boot.name = `${installDevice}${p}1`;
|
|
260
260
|
this.devices.root.fsType = 'ext2';
|
|
@@ -274,24 +274,24 @@ async function partition() {
|
|
|
274
274
|
* PROXMOX VE: lvm2 and UEFI
|
|
275
275
|
* ===========================================================================================
|
|
276
276
|
*/
|
|
277
|
-
await (0,
|
|
278
|
-
await (0,
|
|
279
|
-
await (0,
|
|
280
|
-
await (0,
|
|
281
|
-
await (0,
|
|
282
|
-
await (0,
|
|
283
|
-
await (0,
|
|
277
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mklabel gpt`, this.echo);
|
|
278
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart efi fat32 34s 256MiB`, this.echo); // sda1 EFI
|
|
279
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart boot ext2 256MiB 768MiB`, this.echo); // sda2 boot
|
|
280
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} mkpart lvm ext4 768MiB 100%`, this.echo); // sda3 lmv2
|
|
281
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 1 boot on`, this.echo); // sda1
|
|
282
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 1 esp on`, this.echo); // sda1
|
|
283
|
+
await (0, utils_1.exec)(`parted --script ${installDevice} set 3 lvm on`, this.echo); // sda3
|
|
284
284
|
const partInfo = await lvmPartInfo(installDevice);
|
|
285
285
|
const lvmPartname = partInfo[0];
|
|
286
286
|
const lvmSwapSize = partInfo[1];
|
|
287
287
|
const lvmRootSize = partInfo[2];
|
|
288
|
-
await (0,
|
|
289
|
-
await (0,
|
|
290
|
-
await (0,
|
|
291
|
-
await (0,
|
|
292
|
-
await (0,
|
|
293
|
-
await (0,
|
|
294
|
-
await (0,
|
|
288
|
+
await (0, utils_1.exec)(`pvcreate /dev/${lvmPartname}`, this.echo);
|
|
289
|
+
await (0, utils_1.exec)(`vgcreate pve /dev/${lvmPartname}`, this.echo);
|
|
290
|
+
await (0, utils_1.exec)('vgchange -an', this.echo);
|
|
291
|
+
await (0, utils_1.exec)(`lvcreate -L ${lvmSwapSize} -nswap pve`, this.echo);
|
|
292
|
+
await (0, utils_1.exec)(`lvcreate -L ${lvmRootSize} -nroot pve`, this.echo);
|
|
293
|
+
await (0, utils_1.exec)('lvcreate -l 100%FREE -ndata pve', this.echo);
|
|
294
|
+
await (0, utils_1.exec)('vgchange -a y pve', this.echo);
|
|
295
295
|
this.devices.efi.name = `${installDevice}${p}1`;
|
|
296
296
|
this.devices.efi.fsType = 'F 32 -I';
|
|
297
297
|
this.devices.efi.mountPoint = '/boot/efi';
|
|
@@ -11,22 +11,22 @@ 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
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @param mountpoint
|
|
19
19
|
*/
|
|
20
20
|
async function umount(mountPoint = '') {
|
|
21
21
|
let message = 'umount: ' + mountPoint;
|
|
22
|
-
if (
|
|
22
|
+
if (utils_1.default.isMountpoint(mountPoint)) {
|
|
23
23
|
try {
|
|
24
|
-
await (0,
|
|
25
|
-
await (0,
|
|
24
|
+
await (0, utils_2.exec)(`umount ${mountPoint} ${this.toNull}`, this.echo);
|
|
25
|
+
await (0, utils_2.exec)('sleep 1', this.echo);
|
|
26
26
|
}
|
|
27
27
|
catch (error) {
|
|
28
28
|
message += +mountPoint + JSON.stringify(error);
|
|
29
|
-
await
|
|
29
|
+
await utils_1.default.pressKeyToExit(message);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -11,15 +11,15 @@ 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
|
/**
|
|
17
17
|
* unpackfs
|
|
18
18
|
*/
|
|
19
19
|
async function unpackfs() {
|
|
20
20
|
// const cmd = `unsquashfs -d ${this.installTarget} -f ${this.distro.liveMediumPath}`
|
|
21
21
|
const cmd = `unsquashfs -d ${this.installTarget} -f ${this.distro.liveMediumPath}${this.distro.squashfs}`;
|
|
22
|
-
const echoYes =
|
|
23
|
-
await (0,
|
|
22
|
+
const echoYes = utils_1.default.setEcho(true);
|
|
23
|
+
await (0, utils_2.exec)(cmd, echoYes);
|
|
24
24
|
}
|
|
25
25
|
exports.default = unpackfs;
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const shelljs_1 = __importDefault(require("shelljs"));
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const utils_1 = __importDefault(require("../classes/utils"));
|
|
10
|
+
const pacman_1 = __importDefault(require("../classes/pacman"));
|
|
11
11
|
const chalk_1 = __importDefault(require("chalk"));
|
|
12
12
|
const pjson = require('../../package.json');
|
|
13
13
|
// libraries
|
|
14
|
-
const
|
|
14
|
+
const utils_2 = require("../lib/utils");
|
|
15
15
|
const startMessage = 'eggs-start-message';
|
|
16
16
|
const stopMessage = 'eggs-stop-message';
|
|
17
17
|
/*
|
|
@@ -23,7 +23,7 @@ const stopMessage = 'eggs-stop-message';
|
|
|
23
23
|
*/
|
|
24
24
|
class CliAutologin {
|
|
25
25
|
async addAutologin(distro, version, user, userPasswd, rootPasswd, chroot = '/') {
|
|
26
|
-
if (
|
|
26
|
+
if (utils_1.default.isSystemd()) {
|
|
27
27
|
/**
|
|
28
28
|
* Systemd
|
|
29
29
|
*/
|
|
@@ -42,7 +42,7 @@ class CliAutologin {
|
|
|
42
42
|
await this.addIssue(distro, version, user, userPasswd, rootPasswd, chroot);
|
|
43
43
|
await this.addMotd(distro, version, user, userPasswd, rootPasswd, chroot);
|
|
44
44
|
}
|
|
45
|
-
else if (
|
|
45
|
+
else if (utils_1.default.isSysvinit()) {
|
|
46
46
|
/**
|
|
47
47
|
* sysvinit
|
|
48
48
|
*/
|
|
@@ -68,7 +68,7 @@ class CliAutologin {
|
|
|
68
68
|
* @param chroot
|
|
69
69
|
*/
|
|
70
70
|
async remove(chroot = '/') {
|
|
71
|
-
if (
|
|
71
|
+
if (utils_1.default.isSystemd()) {
|
|
72
72
|
/**
|
|
73
73
|
* Systemd
|
|
74
74
|
*/
|
|
@@ -80,7 +80,7 @@ class CliAutologin {
|
|
|
80
80
|
this.msgRemove(`${chroot}/etc/motd`);
|
|
81
81
|
this.msgRemove(`${chroot}/etc/issue`);
|
|
82
82
|
}
|
|
83
|
-
else if (
|
|
83
|
+
else if (utils_1.default.isSysvinit()) {
|
|
84
84
|
/**
|
|
85
85
|
* sysvinit
|
|
86
86
|
*/
|
|
@@ -113,21 +113,21 @@ class CliAutologin {
|
|
|
113
113
|
async addMotd(distro, version, user, userPasswd, rootPasswd, chroot = '/') {
|
|
114
114
|
const fileMotd = `${chroot}/etc/motd`;
|
|
115
115
|
let installer = 'sudo eggs install';
|
|
116
|
-
if (
|
|
117
|
-
if (
|
|
116
|
+
if (pacman_1.default.packageIsInstalled('calamares')) {
|
|
117
|
+
if (pacman_1.default.packageIsInstalled('plasma-desktop')) {
|
|
118
118
|
installer = 'startplasma-wayland to run GUI and launch calamares';
|
|
119
119
|
}
|
|
120
|
-
else if (
|
|
120
|
+
else if (pacman_1.default.packageIsInstalled('xfce4')) {
|
|
121
121
|
installer = 'startxfce4 to run GUI and launch calamares installer';
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
if (!fs_1.default.existsSync(fileMotd)) {
|
|
125
|
-
await (0,
|
|
125
|
+
await (0, utils_2.exec)(`touch ${fileMotd}`);
|
|
126
126
|
}
|
|
127
127
|
this.msgRemove(fileMotd);
|
|
128
128
|
let eggsMotd = fs_1.default.readFileSync(fileMotd, 'utf-8');
|
|
129
129
|
eggsMotd += startMessage + '\n';
|
|
130
|
-
eggsMotd +=
|
|
130
|
+
eggsMotd += utils_1.default.flag() + '\n';
|
|
131
131
|
eggsMotd += 'You are logged as: ' + chalk_1.default.bold(user) + ' your password is: ' + chalk_1.default.bold(userPasswd) + ', root password: ' + chalk_1.default.bold(rootPasswd) + '\n\n';
|
|
132
132
|
eggsMotd += 'install : ' + chalk_1.default.bold(installer) + '\n';
|
|
133
133
|
eggsMotd += ' unattended : ' + chalk_1.default.bold('sudo eggs install --unattended # us configuration') + '\n';
|
|
@@ -9,12 +9,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
* author: Piero Proietti
|
|
10
10
|
*/
|
|
11
11
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
12
|
-
const
|
|
12
|
+
const keyboards_1 = __importDefault(require("../classes/keyboards"));
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
16
|
async function selectKeyboardLayout(selected = '') {
|
|
17
|
-
const keyboards = new
|
|
17
|
+
const keyboards = new keyboards_1.default();
|
|
18
18
|
const layouts = keyboards.getLayouts();
|
|
19
19
|
const supported = [];
|
|
20
20
|
for (const l of layouts) {
|
|
@@ -9,12 +9,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
* author: Piero Proietti
|
|
10
10
|
*/
|
|
11
11
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
12
|
-
const
|
|
12
|
+
const keyboards_1 = __importDefault(require("../classes/keyboards"));
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
16
|
async function selectKeyboardModel(selected = '') {
|
|
17
|
-
const keyboards = new
|
|
17
|
+
const keyboards = new keyboards_1.default();
|
|
18
18
|
const models = keyboards.getModels();
|
|
19
19
|
const supported = [];
|
|
20
20
|
for (const m of models) {
|
|
@@ -9,12 +9,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
* author: Piero Proietti
|
|
10
10
|
*/
|
|
11
11
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
12
|
-
const
|
|
12
|
+
const keyboards_1 = __importDefault(require("../classes/keyboards"));
|
|
13
13
|
/**
|
|
14
14
|
* selectKeyboardOption
|
|
15
15
|
*/
|
|
16
16
|
async function selectKeyboardOption(selected = '') {
|
|
17
|
-
const keyboards = new
|
|
17
|
+
const keyboards = new keyboards_1.default();
|
|
18
18
|
const options = keyboards.getOptions();
|
|
19
19
|
const supported = [];
|
|
20
20
|
for (const o of options) {
|
|
@@ -9,12 +9,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
* author: Piero Proietti
|
|
10
10
|
*/
|
|
11
11
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
12
|
-
const
|
|
12
|
+
const keyboards_1 = __importDefault(require("../classes/keyboards"));
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
16
|
async function selectKeyboardVariant(keyboardLayout = '') {
|
|
17
|
-
const keyboards = new
|
|
17
|
+
const keyboards = new keyboards_1.default();
|
|
18
18
|
const variants = keyboards.getVariants(keyboardLayout);
|
|
19
19
|
const supported = [];
|
|
20
20
|
supported.push(''); // inserisce una varian nulla
|
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
* less /usr/share/i18n/SUPPORTED
|
|
8
8
|
*/
|
|
9
9
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
10
|
-
const
|
|
10
|
+
const locales_1 = __importDefault(require("../classes/locales"));
|
|
11
11
|
async function selectLanguages(selectedLanguage = '') {
|
|
12
|
-
const locales = new
|
|
12
|
+
const locales = new locales_1.default();
|
|
13
13
|
const supported = await locales.getSupported();
|
|
14
14
|
const selected = selectedLanguage;
|
|
15
15
|
const questions = [
|