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
|
@@ -7,22 +7,24 @@
|
|
|
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
|
* locale
|
|
15
17
|
*/
|
|
16
18
|
async function locale() {
|
|
17
19
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
* influcence: - /etc/default/locale
|
|
21
|
+
* - /etc/locale.conf
|
|
22
|
+
* - /etc/timezone
|
|
23
|
+
*/
|
|
24
|
+
const defaultLocale = this.language;
|
|
23
25
|
// /etc/default/locale
|
|
24
26
|
let file = this.installTarget + '/etc/default/locale';
|
|
25
|
-
let content =
|
|
27
|
+
let content = '';
|
|
26
28
|
content += `LANG=${defaultLocale}\n`;
|
|
27
29
|
content += `LC_CTYPE=${defaultLocale}\n`;
|
|
28
30
|
content += `LC_NUMERIC=${defaultLocale}\n`;
|
|
@@ -37,16 +39,16 @@ async function locale() {
|
|
|
37
39
|
content += `LC_MEASUREMENT=${defaultLocale}\n`;
|
|
38
40
|
content += `LC_IDENTIFICATION=${defaultLocale}\n`;
|
|
39
41
|
content += `LC_ALL=${defaultLocale}\n`;
|
|
40
|
-
|
|
42
|
+
utils_js_1.default.write(file, content);
|
|
41
43
|
// /etc/locale.conf
|
|
42
44
|
file = this.installTarget + '/etc/locale.conf';
|
|
43
|
-
|
|
45
|
+
utils_js_1.default.write(file, content);
|
|
44
46
|
// timezone
|
|
45
47
|
try {
|
|
46
48
|
await this.timezone();
|
|
47
49
|
}
|
|
48
50
|
catch (error) {
|
|
49
|
-
await
|
|
51
|
+
await utils_js_1.default.pressKeyToExit(JSON.stringify(error));
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
exports.default = locale;
|
|
@@ -7,44 +7,46 @@
|
|
|
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 fs_1 = tslib_1.__importDefault(require("fs"));
|
|
14
|
+
const utils_js_1 = __importDefault(require("../../classes/utils.js"));
|
|
15
|
+
const utils_js_2 = require("../../lib/utils.js");
|
|
16
|
+
const fs_1 = __importDefault(require("fs"));
|
|
15
17
|
/**
|
|
16
18
|
*
|
|
17
19
|
* @param this
|
|
18
20
|
*/
|
|
19
21
|
async function mKeyboard() {
|
|
20
22
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
* influence: - /etc/default/keyboard (x11)
|
|
24
|
+
* - /etc/vconsole.conf (console)
|
|
25
|
+
* - /etc/X11/xorg.conf.d/00-keyboard.conf
|
|
26
|
+
*
|
|
27
|
+
* Problem: Actually don't update /etc/default/keyboard (x11)
|
|
28
|
+
* /etc/vconsole.conf is update in installed systems
|
|
29
|
+
*/
|
|
28
30
|
// systemd as default
|
|
29
31
|
let cmd = `chroot ${this.installTarget} localectl set-keymap ${this.keyboardLayout}`;
|
|
30
|
-
if (!
|
|
32
|
+
if (!utils_js_1.default.isSystemd()) {
|
|
31
33
|
cmd = `chroot ${this.installTarget} setupcon ${this.toNull}`;
|
|
32
34
|
}
|
|
33
35
|
try {
|
|
34
|
-
await (0,
|
|
36
|
+
await (0, utils_js_2.exec)(cmd, this.echo);
|
|
35
37
|
}
|
|
36
38
|
catch (error) {
|
|
37
39
|
console.log(error);
|
|
38
|
-
|
|
40
|
+
utils_js_1.default.pressKeyToExit(cmd, true);
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (
|
|
43
|
+
* this must to be not necessary but...
|
|
44
|
+
*
|
|
45
|
+
* force change /etc/default/keyboard (x11)
|
|
46
|
+
* force change /etc/vconsole.conf
|
|
47
|
+
* force change /etc/X11/xorg.conf.d/00-keyboard.conf
|
|
48
|
+
*/
|
|
49
|
+
if (utils_js_1.default.isSystemd()) {
|
|
48
50
|
let content = '# KEYBOARD CONFIGURATION FILE\n\n';
|
|
49
51
|
content += '# Consult the keyboard(5) manual page.\n\n';
|
|
50
52
|
content += '# See penguins-eggs/src/krill/modules/m-keyboard.ts\n\n';
|
|
@@ -54,23 +56,23 @@ async function mKeyboard() {
|
|
|
54
56
|
content += 'XKBOPTIONS=""\n';
|
|
55
57
|
content += '\n';
|
|
56
58
|
content += 'BACKSPACE="guess"\n';
|
|
57
|
-
|
|
59
|
+
utils_js_1.default.write(this.installTarget + '/etc/default/keyboard', content);
|
|
58
60
|
content = '# See penguins-eggs/src/krill/modules/set-keyboard.ts\n\n';
|
|
59
61
|
content += 'KEYMAP="' + this.keyboardLayout + '"\n';
|
|
60
62
|
content += 'FONT=\n';
|
|
61
63
|
content += 'FONT_MAP=\n';
|
|
62
|
-
|
|
64
|
+
utils_js_1.default.write(this.installTarget + '/etc/vconsole.conf', content);
|
|
63
65
|
content = '# See penguins-eggs/src/krill/modules/set-keyboard.ts\n\n';
|
|
64
|
-
content +=
|
|
65
|
-
content +=
|
|
66
|
-
content +=
|
|
67
|
-
content +=
|
|
68
|
-
content +=
|
|
69
|
-
content +=
|
|
70
|
-
content +=
|
|
66
|
+
content += '# Read and parsed by systemd-localed. It\'s probably wise not to edit this file\n';
|
|
67
|
+
content += '# manually too freely.\n';
|
|
68
|
+
content += 'Section "InputClass"\n';
|
|
69
|
+
content += ' Identifier "system-keyboard"\n';
|
|
70
|
+
content += ' MatchIsKeyboard "on"\n';
|
|
71
|
+
content += ' Option "XkbLayout" "' + this.keyboardLayout + '"\n';
|
|
72
|
+
content += 'EndSection\n';
|
|
71
73
|
// Not always exist /etc/X11/xorg.conf.d
|
|
72
74
|
if (fs_1.default.existsSync(this.installTarget + '/etc/X11/xorg.conf.d')) {
|
|
73
|
-
|
|
75
|
+
utils_js_1.default.write(this.installTarget + '/etc/X11/xorg.conf.d/00-keyboard.conf', content);
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
}
|
|
@@ -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 = require("../../lib/utils.js");
|
|
15
|
+
const fs_1 = __importDefault(require("fs"));
|
|
14
16
|
/**
|
|
15
17
|
*
|
|
16
18
|
* @param this
|
|
@@ -18,9 +20,9 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
|
18
20
|
async function mTimezone() {
|
|
19
21
|
if (fs_1.default.existsSync('/etc/localtime')) {
|
|
20
22
|
const cmd = `chroot ${this.installTarget} unlink /etc/localtime`;
|
|
21
|
-
await (0,
|
|
23
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
22
24
|
}
|
|
23
25
|
const cmd = `chroot ${this.installTarget} ln -sf /usr/share/zoneinfo/${this.region}/${this.zone} /etc/localtime`;
|
|
24
|
-
await (0,
|
|
26
|
+
await (0, utils_js_1.exec)(cmd, this.echo);
|
|
25
27
|
}
|
|
26
28
|
exports.default = mTimezone;
|
|
@@ -7,20 +7,22 @@
|
|
|
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 = require("../../lib/utils.js");
|
|
15
|
+
const fs_1 = __importDefault(require("fs"));
|
|
14
16
|
/**
|
|
15
17
|
* On Ubuntu
|
|
16
18
|
* /etc/machine-id must exist to be re-created
|
|
17
19
|
* https://unix.stackexchange.com/questions/402999/is-it-ok-to-change-etc-machine-id
|
|
18
20
|
*/
|
|
19
21
|
async function machineId() {
|
|
20
|
-
|
|
22
|
+
const file = `${this.installTarget}/etc/machine-id`;
|
|
21
23
|
if (fs_1.default.existsSync(file)) {
|
|
22
|
-
await (0,
|
|
24
|
+
await (0, utils_js_1.exec)(`rm ${file}`, this.echo);
|
|
23
25
|
}
|
|
24
|
-
await (0,
|
|
26
|
+
await (0, utils_js_1.exec)(`touch ${file}`);
|
|
25
27
|
}
|
|
26
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_js_1 = require("../../lib/utils.js");
|
|
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_js_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
|
-
this.devices.boot.fsType =
|
|
22
|
+
this.devices.boot.fsType = 'ext2';
|
|
23
23
|
this.devices.boot.mountPoint = '/boot';
|
|
24
24
|
}
|
|
25
|
-
await (0,
|
|
25
|
+
await (0, utils_js_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_js_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_js_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_js_1.exec)(`mkswap ${this.devices.swap.name} ${this.toNull}`, this.echo);
|
|
35
35
|
}
|
|
36
36
|
return result;
|
|
37
37
|
}
|
|
@@ -7,40 +7,40 @@
|
|
|
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
14
|
exports.umountFs = exports.mountFs = void 0;
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
15
|
+
const utils_js_1 = require("../../lib/utils.js");
|
|
16
|
+
const fs_1 = __importDefault(require("fs"));
|
|
15
17
|
/**
|
|
16
18
|
* mountFs
|
|
17
19
|
*/
|
|
18
20
|
async function mountFs() {
|
|
19
21
|
if (!fs_1.default.existsSync(this.installTarget)) {
|
|
20
|
-
await (0,
|
|
22
|
+
await (0, utils_js_1.exec)(`mkdir ${this.installTarget} ${this.toNull}`, this.echo);
|
|
21
23
|
}
|
|
22
24
|
// root
|
|
23
|
-
await (0,
|
|
24
|
-
await (0,
|
|
25
|
-
await (0,
|
|
25
|
+
await (0, utils_js_1.exec)(`mount ${this.devices.root.name} ${this.installTarget}${this.devices.root.mountPoint} ${this.toNull}`, this.echo);
|
|
26
|
+
await (0, utils_js_1.exec)(`tune2fs -c 0 -i 0 ${this.devices.root.name} ${this.toNull}`, this.echo);
|
|
27
|
+
await (0, utils_js_1.exec)(`rm -rf ${this.installTarget}/lost+found ${this.toNull}`, this.echo);
|
|
26
28
|
// boot
|
|
27
|
-
if (this.devices.boot.name !==
|
|
28
|
-
await (0,
|
|
29
|
-
await (0,
|
|
30
|
-
await (0,
|
|
29
|
+
if (this.devices.boot.name !== 'none') {
|
|
30
|
+
await (0, utils_js_1.exec)(`mkdir ${this.installTarget}/boot -p ${this.toNull}`, this.echo);
|
|
31
|
+
await (0, utils_js_1.exec)(`mount ${this.devices.boot.name} ${this.installTarget}${this.devices.boot.mountPoint} ${this.toNull}`, this.echo);
|
|
32
|
+
await (0, utils_js_1.exec)(`tune2fs -c 0 -i 0 ${this.devices.boot.name} ${this.toNull}`, this.echo);
|
|
31
33
|
}
|
|
32
34
|
// data
|
|
33
|
-
if (this.devices.data.name !==
|
|
34
|
-
await (0,
|
|
35
|
-
await (0,
|
|
36
|
-
await (0,
|
|
35
|
+
if (this.devices.data.name !== 'none') {
|
|
36
|
+
await (0, utils_js_1.exec)(`mkdir ${this.installTarget}${this.devices.data.mountPoint} -p ${this.toNull}`, this.echo);
|
|
37
|
+
await (0, utils_js_1.exec)(`mount ${this.devices.data.name} ${this.installTarget}${this.devices.data.mountPoint} ${this.toNull}`, this.echo);
|
|
38
|
+
await (0, utils_js_1.exec)(`tune2fs -c 0 -i 0 ${this.devices.data.name} ${this.toNull}`, this.echo);
|
|
37
39
|
}
|
|
38
40
|
// efi
|
|
39
|
-
if (this.efi) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
await (0, utils_1.exec)(`mount ${this.devices.efi.name} ${this.installTarget}${this.devices.efi.mountPoint} ${this.toNull}`, this.echo);
|
|
43
|
-
}
|
|
41
|
+
if (this.efi && !fs_1.default.existsSync(this.installTarget + this.devices.efi.mountPoint)) {
|
|
42
|
+
await (0, utils_js_1.exec)(`mkdir ${this.installTarget}${this.devices.efi.mountPoint} -p ${this.toNull}`, this.echo);
|
|
43
|
+
await (0, utils_js_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
|
}
|
|
@@ -54,11 +54,11 @@ async function umountFs() {
|
|
|
54
54
|
await this.umount(this.devices.efi.name);
|
|
55
55
|
}
|
|
56
56
|
// data
|
|
57
|
-
if (this.devices.data.name !==
|
|
57
|
+
if (this.devices.data.name !== 'none') {
|
|
58
58
|
await this.umount(this.devices.data.name);
|
|
59
59
|
}
|
|
60
60
|
// boot
|
|
61
|
-
if (this.devices.boot.name !==
|
|
61
|
+
if (this.devices.boot.name !== 'none') {
|
|
62
62
|
await this.umount(this.devices.boot.name);
|
|
63
63
|
}
|
|
64
64
|
// root
|
|
@@ -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_js_1 = require("../../lib/utils.js");
|
|
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_js_1.exec)(`mkdir ${this.installTarget}/dev ${this.toNull}`, this.echo);
|
|
18
|
+
await (0, utils_js_1.exec)(`mkdir ${this.installTarget}/dev/pts ${this.toNull}`, this.echo);
|
|
19
|
+
await (0, utils_js_1.exec)(`mkdir ${this.installTarget}/proc ${this.toNull}`, this.echo);
|
|
20
|
+
await (0, utils_js_1.exec)(`mkdir ${this.installTarget}/sys ${this.toNull}`, this.echo);
|
|
21
|
+
await (0, utils_js_1.exec)(`mkdir ${this.installTarget}/run ${this.toNull}`, this.echo);
|
|
22
|
+
await (0, utils_js_1.exec)(`mount -o bind /dev ${this.installTarget}/dev ${this.toNull}`, this.echo);
|
|
23
|
+
await (0, utils_js_1.exec)(`mount -o bind /dev/pts ${this.installTarget}/dev/pts ${this.toNull}`, this.echo);
|
|
24
|
+
await (0, utils_js_1.exec)(`mount -o bind /proc ${this.installTarget}/proc ${this.toNull}`, this.echo);
|
|
25
|
+
await (0, utils_js_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_js_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_js_1.exec)(`mount -o rbind /run ${this.installTarget}/run ${this.toNull}`, this.echo);
|
|
30
30
|
}
|
|
31
31
|
exports.mountVfs = mountVfs;
|
|
32
32
|
/**
|
|
@@ -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 pacman_1 = tslib_1.__importDefault(require("../../classes/pacman"));
|
|
14
|
+
const utils_js_1 = __importDefault(require("../../classes/utils.js"));
|
|
15
|
+
const pacman_js_1 = __importDefault(require("../../classes/pacman.js"));
|
|
14
16
|
/**
|
|
15
17
|
/**
|
|
16
18
|
* networkcfg
|
|
@@ -21,26 +23,24 @@ const pacman_1 = tslib_1.__importDefault(require("../../classes/pacman"));
|
|
|
21
23
|
* - manjaro: ? // ip address add 192.168.61/24 + dev enp6s18
|
|
22
24
|
*/
|
|
23
25
|
async function networkCfg() {
|
|
24
|
-
if (this.distro.familyId === 'debian'
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
content += ' gateway ' + this.network.gateway + '\n';
|
|
37
|
-
}
|
|
38
|
-
utils_1.default.write(file, content);
|
|
26
|
+
if (this.distro.familyId === 'debian' && // if netplan, don't create entries in /etc/network/interfaces
|
|
27
|
+
!pacman_js_1.default.packageIsInstalled('netplan.io')) {
|
|
28
|
+
const file = this.installTarget + '/etc/network/interfaces';
|
|
29
|
+
let content = '# created by eggs\n\n';
|
|
30
|
+
content += 'auto lo\n';
|
|
31
|
+
content += 'iface lo inet loopback\n\n';
|
|
32
|
+
content += 'auto ' + this.network.iface + '\n';
|
|
33
|
+
content += 'iface ' + this.network.iface + ' inet ' + this.network.addressType + '\n';
|
|
34
|
+
if (this.network.addressType !== 'dhcp') {
|
|
35
|
+
content += ' address ' + this.network.address + '\n';
|
|
36
|
+
content += ' netmask ' + this.network.netmask + '\n';
|
|
37
|
+
content += ' gateway ' + this.network.gateway + '\n';
|
|
39
38
|
}
|
|
39
|
+
utils_js_1.default.write(file, content);
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
* resolv.conf
|
|
43
|
+
*/
|
|
44
44
|
if (this.network.addressType !== 'dhcp') {
|
|
45
45
|
const file = this.installTarget + '/etc/resolv.conf';
|
|
46
46
|
let content = '# created by eggs\n\n';
|
|
@@ -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_js_1.default.write(file, content);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.default = networkCfg;
|
|
@@ -7,21 +7,23 @@
|
|
|
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
|
|
15
|
-
const
|
|
16
|
-
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
14
|
+
const utils_js_1 = require("../../lib/utils.js");
|
|
15
|
+
const utils_js_2 = __importDefault(require("../../classes/utils.js"));
|
|
16
|
+
const pacman_js_1 = __importDefault(require("../../classes/pacman.js"));
|
|
17
|
+
const fs_1 = __importDefault(require("fs"));
|
|
18
|
+
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
17
19
|
/**
|
|
18
20
|
*
|
|
19
21
|
* @param this
|
|
20
22
|
*/
|
|
21
23
|
async function packages() {
|
|
22
|
-
|
|
24
|
+
const echoYes = utils_js_2.default.setEcho(true);
|
|
23
25
|
let modulePath = '/etc/penguins-eggs.d/krill/';
|
|
24
|
-
if (
|
|
26
|
+
if (pacman_js_1.default.packageIsInstalled('calamares')) {
|
|
25
27
|
modulePath = '/etc/calamares/';
|
|
26
28
|
}
|
|
27
29
|
const config_file = `${this.installTarget}${modulePath}modules/packages.conf`;
|
|
@@ -29,7 +31,7 @@ async function packages() {
|
|
|
29
31
|
let install = [];
|
|
30
32
|
if (fs_1.default.existsSync(config_file)) {
|
|
31
33
|
const packages = js_yaml_1.default.load(fs_1.default.readFileSync(config_file, 'utf-8'));
|
|
32
|
-
|
|
34
|
+
const operations = JSON.parse(JSON.stringify(packages.operations));
|
|
33
35
|
remove = operations[0].remove;
|
|
34
36
|
if (operations.length > 1) {
|
|
35
37
|
install = operations[1].install;
|
|
@@ -37,38 +39,38 @@ async function packages() {
|
|
|
37
39
|
if (operations !== undefined) {
|
|
38
40
|
if (packages.backend === 'apt') {
|
|
39
41
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
* apt: Debian/Devuan/Ubuntu
|
|
43
|
+
*/
|
|
42
44
|
if (remove.length > 0) {
|
|
43
45
|
let cmd = `chroot ${this.installTarget} apt-get purge -y `;
|
|
44
46
|
for (const elem of remove) {
|
|
45
47
|
cmd += elem + ' ';
|
|
46
48
|
}
|
|
47
|
-
await (0,
|
|
49
|
+
await (0, utils_js_1.exec)(`${cmd} ${this.toNull}`, this.echo);
|
|
48
50
|
}
|
|
49
51
|
if (install.length > 0) {
|
|
50
52
|
let cmd = `chroot ${this.installTarget} apt-get install -y `;
|
|
51
53
|
for (const elem of install) {
|
|
52
54
|
cmd += elem + ' ';
|
|
53
55
|
}
|
|
54
|
-
await (0,
|
|
55
|
-
await (0,
|
|
56
|
+
await (0, utils_js_1.exec)(`chroot ${this.installTarget} apt-get update ${this.toNull}`, this.echo);
|
|
57
|
+
await (0, utils_js_1.exec)(`${cmd} ${this.toNull}`, this.echo);
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
else if (packages.backend === 'pacman') {
|
|
59
61
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
* pacman: arch/manjaro
|
|
63
|
+
*/
|
|
62
64
|
if (remove.length > 0) {
|
|
63
65
|
let cmd = `chroot ${this.installTarget} pacman -R\n`;
|
|
64
66
|
for (const elem of remove) {
|
|
65
67
|
cmd += elem + ' ';
|
|
66
68
|
}
|
|
67
|
-
await (0,
|
|
69
|
+
await (0, utils_js_1.exec)(`${cmd} ${echoYes}`, this.echo);
|
|
68
70
|
}
|
|
69
71
|
if (install.length > 0) {
|
|
70
72
|
for (const elem of install) {
|
|
71
|
-
await (0,
|
|
73
|
+
await (0, utils_js_1.exec)(`chroot ${this.installTarget} pacman -S ${elem}`, echoYes);
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
}
|