penguins-eggs 10.0.3 → 10.0.8
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 +25 -28
- package/README.md +101 -1159
- package/assets/calamares/install-system.sh +9 -5
- package/conf/derivatives.yaml +2 -1
- package/dist/classes/bleach.d.ts +6 -6
- package/dist/classes/bleach.js +6 -6
- package/dist/classes/cfs.d.ts +6 -6
- package/dist/classes/cfs.js +6 -6
- package/dist/classes/compressors.d.ts +8 -7
- package/dist/classes/compressors.js +19 -9
- package/dist/classes/daddy.d.ts +6 -6
- package/dist/classes/daddy.js +13 -13
- package/dist/classes/distro.d.ts +12 -2
- package/dist/classes/distro.js +41 -46
- package/dist/classes/families/archlinux.d.ts +6 -6
- package/dist/classes/families/archlinux.js +7 -11
- package/dist/classes/families/debian.d.ts +6 -6
- package/dist/classes/families/debian.js +6 -6
- package/dist/classes/families/mockup.js +2 -4
- package/dist/classes/families/suse.d.ts +2 -2
- package/dist/classes/families/suse.js +2 -2
- package/dist/classes/incubation/branding.js +24 -25
- package/dist/classes/incubation/distros/focal.js +1 -1
- package/dist/classes/incubation/distros/rolling.d.ts +4 -4
- package/dist/classes/incubation/distros/rolling.js +4 -4
- package/dist/classes/incubation/fisherman-helper/packages.js +2 -6
- package/dist/classes/incubation/incubator.js +6 -7
- package/dist/classes/incubation/installer.js +1 -2
- package/dist/classes/initrd.d.ts +6 -6
- package/dist/classes/initrd.js +6 -6
- package/dist/classes/keyboards.d.ts +6 -6
- package/dist/classes/keyboards.js +6 -6
- package/dist/classes/locales.d.ts +12 -12
- package/dist/classes/locales.js +14 -14
- package/dist/classes/n8.d.ts +9 -7
- package/dist/classes/n8.js +8 -12
- package/dist/classes/network.d.ts +6 -6
- package/dist/classes/network.js +9 -11
- package/dist/classes/ovary.d.ts +44 -49
- package/dist/classes/ovary.js +231 -259
- package/dist/classes/pacman.d.ts +6 -6
- package/dist/classes/pacman.js +8 -10
- package/dist/classes/pve-live.d.ts +6 -6
- package/dist/classes/pve-live.js +6 -6
- package/dist/classes/pxe.d.ts +34 -25
- package/dist/classes/pxe.js +205 -190
- package/dist/classes/settings.d.ts +7 -7
- package/dist/classes/settings.js +10 -10
- package/dist/classes/sources_list.d.ts +16 -16
- package/dist/classes/sources_list.js +20 -20
- package/dist/classes/systemctl.js +2 -2
- package/dist/classes/tailor.d.ts +22 -22
- package/dist/classes/tailor.js +88 -88
- package/dist/classes/tools.d.ts +6 -6
- package/dist/classes/tools.js +6 -6
- package/dist/classes/users.d.ts +9 -9
- package/dist/classes/users.js +33 -35
- package/dist/classes/xdg.d.ts +6 -6
- package/dist/classes/xdg.js +10 -9
- package/dist/classes/yolk.d.ts +8 -8
- package/dist/classes/yolk.js +9 -15
- package/dist/commands/adapt.js +2 -4
- package/dist/commands/analyze.js +1 -1
- package/dist/commands/calamares.js +9 -14
- package/dist/commands/config.d.ts +2 -3
- package/dist/commands/config.js +11 -23
- package/dist/commands/cuckoo.d.ts +1 -1
- package/dist/commands/cuckoo.js +11 -10
- package/dist/commands/dad.js +2 -6
- package/dist/commands/export/deb.js +2 -6
- package/dist/commands/export/iso.js +2 -5
- package/dist/commands/install.d.ts +1 -1
- package/dist/commands/install.js +5 -9
- package/dist/commands/kill.js +3 -5
- package/dist/commands/mom.js +2 -4
- package/dist/commands/produce.d.ts +2 -1
- package/dist/commands/produce.js +16 -18
- package/dist/commands/status.js +2 -4
- package/dist/commands/syncfrom.d.ts +2 -2
- package/dist/commands/syncfrom.js +6 -9
- package/dist/commands/syncto.js +8 -12
- package/dist/commands/tools/clean.js +3 -5
- package/dist/commands/tools/ppa.js +14 -17
- package/dist/commands/tools/skel.js +2 -5
- package/dist/commands/tools/stat.js +3 -7
- package/dist/commands/tools/yolk.js +2 -4
- package/dist/commands/update.js +4 -6
- package/dist/commands/wardrobe/get.js +4 -7
- package/dist/commands/wardrobe/list.js +11 -15
- package/dist/commands/wardrobe/show.js +11 -15
- package/dist/commands/wardrobe/wear.js +3 -7
- package/dist/interfaces/i-packages.d.ts +1 -1
- package/dist/interfaces/i-pxe.d.ts +35 -11
- package/dist/interfaces/i-pxe.js +0 -7
- package/dist/interfaces/i-settings.d.ts +15 -21
- package/dist/krill/modules/change-password.d.ts +4 -4
- package/dist/krill/modules/change-password.js +4 -4
- package/dist/krill/modules/del-live-user.d.ts +3 -3
- package/dist/krill/modules/del-live-user.js +3 -3
- package/dist/krill/modules/fstab.d.ts +3 -3
- package/dist/krill/modules/fstab.js +5 -5
- package/dist/krill/modules/grubcfg.d.ts +6 -6
- package/dist/krill/modules/grubcfg.js +6 -6
- package/dist/krill/modules/hostname.js +4 -4
- package/dist/krill/modules/initramfs.d.ts +2 -2
- package/dist/krill/modules/initramfs.js +2 -2
- package/dist/krill/modules/locale-cfg.js +8 -7
- package/dist/krill/modules/locale.d.ts +2 -2
- package/dist/krill/modules/locale.js +6 -6
- package/dist/krill/modules/m-keyboard.js +14 -14
- package/dist/krill/modules/mkfs.d.ts +2 -2
- package/dist/krill/modules/mkfs.js +2 -2
- package/dist/krill/modules/mount-fs.d.ts +2 -2
- package/dist/krill/modules/mount-fs.js +2 -2
- package/dist/krill/modules/mount-vfs.d.ts +4 -4
- package/dist/krill/modules/mount-vfs.js +4 -4
- package/dist/krill/modules/packages.js +25 -33
- package/dist/krill/modules/partition.js +38 -38
- package/dist/krill/modules/remove-installer-link.d.ts +2 -2
- package/dist/krill/modules/remove-installer-link.js +2 -2
- package/dist/krill/modules/umount.d.ts +3 -3
- package/dist/krill/modules/umount.js +4 -4
- package/dist/krill/modules/unpackfs.d.ts +2 -2
- package/dist/krill/modules/unpackfs.js +2 -2
- package/dist/krill/sequence.js +2 -1
- package/dist/lib/cli-autologin.js +3 -3
- package/dist/lib/get_address.js +2 -3
- package/dist/lib/get_dns.js +2 -3
- package/dist/lib/get_domain.js +2 -3
- package/dist/lib/get_gateway.js +2 -3
- package/dist/lib/get_hostname.js +2 -3
- package/dist/lib/get_netmask.js +2 -3
- package/dist/lib/get_password.js +3 -4
- package/dist/lib/get_userfullname.js +2 -3
- package/dist/lib/get_username.js +2 -2
- package/dist/lib/kill_me_softly.js +3 -18
- package/dist/lib/select_address_type.js +2 -2
- package/dist/lib/select_filesystem_type.js +9 -3
- package/dist/lib/select_installation_device.js +2 -2
- package/dist/lib/select_installation_mode.js +2 -3
- package/dist/lib/select_interface.js +2 -2
- package/dist/lib/select_keyboard_layout.d.ts +2 -2
- package/dist/lib/select_keyboard_layout.js +4 -4
- package/dist/lib/select_keyboard_model.d.ts +2 -2
- package/dist/lib/select_keyboard_model.js +4 -4
- package/dist/lib/select_keyboard_option.d.ts +2 -2
- package/dist/lib/select_keyboard_option.js +4 -4
- package/dist/lib/select_keyboard_variant.d.ts +2 -2
- package/dist/lib/select_keyboard_variant.js +4 -4
- package/dist/lib/select_languages.js +2 -2
- package/dist/lib/select_regions.js +2 -3
- package/dist/lib/select_user_swap_choice.js +2 -3
- package/dist/lib/select_zones.js +8 -10
- package/dist/lib/utils.js +1 -1
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +17 -23
- package/package.json +24 -22
- package/scripts/_eggs +354 -314
- package/scripts/eggs.bash +8 -8
|
@@ -1,21 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/interfaces/i-pxe.ts
|
|
3
|
-
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
8
1
|
export interface ITftpOptions {
|
|
9
|
-
denyPUT: boolean;
|
|
10
2
|
host: string;
|
|
11
3
|
port: number;
|
|
12
4
|
root: string;
|
|
5
|
+
denyPUT: boolean;
|
|
13
6
|
}
|
|
14
7
|
export interface IDhcpOptions {
|
|
8
|
+
subnet: string;
|
|
9
|
+
host: string;
|
|
10
|
+
tftpserver: string;
|
|
15
11
|
bios_filename: string;
|
|
16
12
|
efi32_filename: string;
|
|
17
13
|
efi64_filename: string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
}
|
|
15
|
+
export interface IDhcpd {
|
|
16
|
+
constructor(opts: IDhcpOptions): void;
|
|
17
|
+
pre_init: (pkt: IPacket) => void;
|
|
18
|
+
discover: (pkt: IPacket) => void;
|
|
19
|
+
request: (pkt: IPacket) => void;
|
|
20
|
+
inform: (pkt: IPacket) => void;
|
|
21
|
+
proxy_request: (pkt: IPacket) => IPacket;
|
|
22
|
+
}
|
|
23
|
+
export interface IProxy {
|
|
24
|
+
bind: (port: number, addr: string, cb: any) => IPacket;
|
|
25
|
+
}
|
|
26
|
+
export interface IServer {
|
|
27
|
+
bind: (port: number, addr: string, cb: any) => IPacket;
|
|
28
|
+
}
|
|
29
|
+
export interface IPacket {
|
|
30
|
+
getRequestedIPAddress: () => string;
|
|
31
|
+
op: (op: any) => IPacket;
|
|
32
|
+
htype: (htype: any) => IPacket;
|
|
33
|
+
hlen: (hlen: any) => IPacket;
|
|
34
|
+
hops: (hops: any) => IPacket;
|
|
35
|
+
xid: (xid: any) => IPacket;
|
|
36
|
+
secs: (secs: any) => IPacket;
|
|
37
|
+
flags: (flags: any) => IPacket;
|
|
38
|
+
ciaddr: (ciaddr: string) => IPacket;
|
|
39
|
+
siaddr: (siaddr: string) => IPacket;
|
|
40
|
+
giaddr: (giaddr: string) => IPacket;
|
|
41
|
+
chaddr: (chaddr: any) => IPacket;
|
|
42
|
+
sname: (sname: any) => IPacket;
|
|
43
|
+
fname: (fname: any) => IPacket;
|
|
44
|
+
options: (options: any) => IPacket;
|
|
21
45
|
}
|
package/dist/interfaces/i-pxe.js
CHANGED
|
@@ -14,26 +14,20 @@ interface Iinstance {
|
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
16
|
export interface ISettings {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
exec: string[];
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
show: string[];
|
|
36
|
-
}
|
|
37
|
-
];
|
|
17
|
+
branding: string;
|
|
18
|
+
'disable-cancel': boolean;
|
|
19
|
+
'disable-cancel-during-exec': boolean;
|
|
20
|
+
'dont-chroot': boolean;
|
|
21
|
+
instances: [instance: Iinstance];
|
|
22
|
+
'modules-search': string[];
|
|
23
|
+
'oem-setup': boolean;
|
|
24
|
+
'prompt-install': boolean;
|
|
25
|
+
sequence: [{
|
|
26
|
+
show: string[];
|
|
27
|
+
}, {
|
|
28
|
+
exec: string[];
|
|
29
|
+
}, {
|
|
30
|
+
show: string[];
|
|
31
|
+
}];
|
|
38
32
|
}
|
|
39
33
|
export {};
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import Sequence from '../sequence.js';
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* changePassword
|
|
12
|
+
* @param name
|
|
13
|
+
* @param newPassword
|
|
14
|
+
*/
|
|
15
15
|
export default function changePassword(this: Sequence, name?: string, newPassword?: string): Promise<void>;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { exec } from '../../lib/utils.js';
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* changePassword
|
|
12
|
+
* @param name
|
|
13
|
+
* @param newPassword
|
|
14
|
+
*/
|
|
15
15
|
export default async function changePassword(name = 'live', newPassword = 'evolution') {
|
|
16
16
|
const cmd = `echo ${name}:${newPassword} | chroot ${this.installTarget} chpasswd ${this.toNull}`;
|
|
17
17
|
await exec(cmd, this.echo);
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
import Utils from '../../classes/utils.js';
|
|
10
10
|
import { exec } from '../../lib/utils.js';
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*/
|
|
12
|
+
* delUser
|
|
13
|
+
* va corretto con users.conf di calamares
|
|
14
|
+
*/
|
|
15
15
|
export default async function delLiveUser() {
|
|
16
16
|
if (Utils.isLive()) {
|
|
17
17
|
const user = this.settings.config.user_opt;
|
|
@@ -10,14 +10,14 @@ import shx from 'shelljs';
|
|
|
10
10
|
import Pacman from '../../classes/pacman.js';
|
|
11
11
|
import Utils from '../../classes/utils.js';
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
* fstab()
|
|
14
|
+
* @param devices
|
|
15
|
+
*/
|
|
16
16
|
export default async function fstab(installDevice, crypted = false) {
|
|
17
17
|
let text = '';
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
* crypttab
|
|
20
|
+
*/
|
|
21
21
|
if (this.partitions.installationMode === 'full-encrypted') {
|
|
22
22
|
const crypttab = this.installTarget + '/etc/crypttab';
|
|
23
23
|
text += '# /etc/crypttab: mappings for encrypted partitions.\n';
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import Sequence from '../sequence.js';
|
|
10
10
|
/**
|
|
11
|
-
* grubcfg
|
|
12
|
-
* - open /etc/default/grub
|
|
13
|
-
* - find GRUB_CMDLINE_LINUX_DEFAULT=
|
|
14
|
-
* - replace with GRUB_CMDLINE_LINUX_DEFAULT=
|
|
15
|
-
* 's/GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=/g'
|
|
16
|
-
*/
|
|
11
|
+
* grubcfg
|
|
12
|
+
* - open /etc/default/grub
|
|
13
|
+
* - find GRUB_CMDLINE_LINUX_DEFAULT=
|
|
14
|
+
* - replace with GRUB_CMDLINE_LINUX_DEFAULT=
|
|
15
|
+
* 's/GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=/g'
|
|
16
|
+
*/
|
|
17
17
|
export default function grubcfg(this: Sequence): Promise<void>;
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
import fs from 'node:fs';
|
|
10
10
|
import Utils from '../../classes/utils.js';
|
|
11
11
|
/**
|
|
12
|
-
* grubcfg
|
|
13
|
-
* - open /etc/default/grub
|
|
14
|
-
* - find GRUB_CMDLINE_LINUX_DEFAULT=
|
|
15
|
-
* - replace with GRUB_CMDLINE_LINUX_DEFAULT=
|
|
16
|
-
* 's/GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=/g'
|
|
17
|
-
*/
|
|
12
|
+
* grubcfg
|
|
13
|
+
* - open /etc/default/grub
|
|
14
|
+
* - find GRUB_CMDLINE_LINUX_DEFAULT=
|
|
15
|
+
* - replace with GRUB_CMDLINE_LINUX_DEFAULT=
|
|
16
|
+
* 's/GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT=/g'
|
|
17
|
+
*/
|
|
18
18
|
export default async function grubcfg() {
|
|
19
19
|
const file = `${this.installTarget}/etc/default/grub`;
|
|
20
20
|
let content = '';
|
|
@@ -13,16 +13,16 @@ import fs from 'node:fs';
|
|
|
13
13
|
export default async function hostname(domain = '') {
|
|
14
14
|
const { hostname } = this.users;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
* hostname
|
|
17
|
+
*/
|
|
18
18
|
{
|
|
19
19
|
const file = this.installTarget + '/etc/hostname';
|
|
20
20
|
const text = hostname;
|
|
21
21
|
fs.writeFileSync(file, text);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
* hosts
|
|
25
|
+
*/
|
|
26
26
|
{
|
|
27
27
|
const file = this.installTarget + '/etc/hosts';
|
|
28
28
|
if (domain === '(none)') {
|
|
@@ -12,8 +12,8 @@ import { exec } from '../../lib/utils.js';
|
|
|
12
12
|
// _dirname
|
|
13
13
|
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
* initramfs()
|
|
16
|
+
*/
|
|
17
17
|
export default async function initramfs() {
|
|
18
18
|
if (this.distro.familyId === 'debian') {
|
|
19
19
|
let cmd = `chroot ${this.installTarget} mkinitramfs -o ~/initrd.img-$(uname -r) ${this.toNull}`;
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import fs from 'node:fs';
|
|
10
10
|
/* localeCfg
|
|
11
|
-
* Enable the configured locales (those set by the user on the
|
|
12
|
-
* user page) in /etc/locale.gen, if they are available in the
|
|
13
|
-
* target system.
|
|
14
|
-
*/
|
|
11
|
+
* Enable the configured locales (those set by the user on the
|
|
12
|
+
* user page) in /etc/locale.gen, if they are available in the
|
|
13
|
+
* target system.
|
|
14
|
+
*/
|
|
15
15
|
export default async function localeCfg() {
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* influence: - locale-gen
|
|
18
|
+
*/
|
|
19
19
|
let supporteds = [];
|
|
20
20
|
if (this.distro.familyId === 'debian') {
|
|
21
21
|
// Format: en_US.UTF-8 UTF-8
|
|
@@ -26,7 +26,8 @@ export default async function localeCfg() {
|
|
|
26
26
|
const supportedsSource = fs.readFileSync('/etc/locale.gen', 'utf8').split('\n');
|
|
27
27
|
// Original Format: #en_US.UTF-8 UTF-8
|
|
28
28
|
for (let line of supportedsSource) {
|
|
29
|
-
if (line.slice(0, 2) !== '# ') {
|
|
29
|
+
if (line.slice(0, 2) !== '# ') {
|
|
30
|
+
// se non è un commento
|
|
30
31
|
line = line.slice(1); // Rimuove #
|
|
31
32
|
}
|
|
32
33
|
supporteds.push(line);
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import Utils from '../../classes/utils.js';
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* locale
|
|
12
|
+
*/
|
|
13
13
|
export default async function locale() {
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
* influcence: - /etc/default/locale
|
|
16
|
+
* - /etc/locale.conf
|
|
17
|
+
* - /etc/timezone
|
|
18
|
+
*/
|
|
19
19
|
const defaultLocale = this.language;
|
|
20
20
|
// /etc/default/locale
|
|
21
21
|
let file = this.installTarget + '/etc/default/locale';
|
|
@@ -15,13 +15,13 @@ import { exec } from '../../lib/utils.js';
|
|
|
15
15
|
*/
|
|
16
16
|
export default async function mKeyboard() {
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
* influence: - /etc/default/keyboard (x11)
|
|
19
|
+
* - /etc/vconsole.conf (console)
|
|
20
|
+
* - /etc/X11/xorg.conf.d/00-keyboard.conf
|
|
21
|
+
*
|
|
22
|
+
* Problem: Actually don't update /etc/default/keyboard (x11)
|
|
23
|
+
* /etc/vconsole.conf is update in installed systems
|
|
24
|
+
*/
|
|
25
25
|
// systemd as default
|
|
26
26
|
let cmd = `chroot ${this.installTarget} localectl set-keymap ${this.keyboardLayout}`;
|
|
27
27
|
if (!Utils.isSystemd()) {
|
|
@@ -35,12 +35,12 @@ export default async function mKeyboard() {
|
|
|
35
35
|
Utils.pressKeyToExit(cmd, true);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
* this must to be not necessary but...
|
|
39
|
+
*
|
|
40
|
+
* force change /etc/default/keyboard (x11)
|
|
41
|
+
* force change /etc/vconsole.conf
|
|
42
|
+
* force change /etc/X11/xorg.conf.d/00-keyboard.conf
|
|
43
|
+
*/
|
|
44
44
|
let content = '# KEYBOARD CONFIGURATION FILE\n\n';
|
|
45
45
|
content += '# Consult the keyboard(5) manual page.\n\n';
|
|
46
46
|
content += '# See penguins-eggs/src/krill/modules/m-keyboard.ts\n\n';
|
|
@@ -65,7 +65,7 @@ export default async function mKeyboard() {
|
|
|
65
65
|
* 00-keyboard.conf: dovrebbe dipendere da X
|
|
66
66
|
*/
|
|
67
67
|
content = '# See penguins-eggs/src/krill/modules/set-keyboard.ts\n\n';
|
|
68
|
-
content +=
|
|
68
|
+
content += "# Read and parsed by systemd-localed. It's probably wise not to edit this file\n";
|
|
69
69
|
content += '# manually too freely.\n';
|
|
70
70
|
content += 'Section "InputClass"\n';
|
|
71
71
|
content += ' Identifier "system-keyboard"\n';
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import fs from 'node:fs';
|
|
10
10
|
import { exec } from '../../lib/utils.js';
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
* mountFs
|
|
13
|
+
*/
|
|
14
14
|
export async function mountFs() {
|
|
15
15
|
if (!fs.existsSync(this.installTarget)) {
|
|
16
16
|
await exec(`mkdir ${this.installTarget} ${this.toNull}`, this.echo);
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import Sequence from '../sequence.js';
|
|
10
10
|
/**
|
|
11
|
-
* mountvfs()
|
|
12
|
-
*/
|
|
11
|
+
* mountvfs()
|
|
12
|
+
*/
|
|
13
13
|
export declare function mountVfs(this: Sequence): Promise<void>;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
17
|
export declare function umountVfs(this: Sequence): Promise<void>;
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { exec } from '../../lib/utils.js';
|
|
10
10
|
/**
|
|
11
|
-
* mountvfs()
|
|
12
|
-
*/
|
|
11
|
+
* mountvfs()
|
|
12
|
+
*/
|
|
13
13
|
export async function mountVfs() {
|
|
14
14
|
await exec(`mkdir ${this.installTarget}/dev ${this.toNull}`, this.echo);
|
|
15
15
|
await exec(`mkdir ${this.installTarget}/dev/pts ${this.toNull}`, this.echo);
|
|
@@ -26,8 +26,8 @@ export async function mountVfs() {
|
|
|
26
26
|
await exec(`mount -o rbind /run ${this.installTarget}/run ${this.toNull}`, this.echo);
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
31
|
export async function umountVfs() {
|
|
32
32
|
await this.umount(`${this.installTarget}/dev/pts`);
|
|
33
33
|
await this.umount(`${this.installTarget}/dev`);
|
|
@@ -23,10 +23,10 @@ export default async function packages() {
|
|
|
23
23
|
}
|
|
24
24
|
const config_file = `${modulePath}modules/packages.conf`;
|
|
25
25
|
if (fs.existsSync(config_file)) {
|
|
26
|
-
|
|
26
|
+
const packages = yaml.load(fs.readFileSync(config_file, 'utf8'));
|
|
27
27
|
let packagesToInstall = [];
|
|
28
28
|
let packagesToRemove = [];
|
|
29
|
-
for (
|
|
29
|
+
for (const operation of packages.operations) {
|
|
30
30
|
if ('try_remove' in operation) {
|
|
31
31
|
packagesToRemove = operation.try_remove;
|
|
32
32
|
}
|
|
@@ -36,47 +36,39 @@ export default async function packages() {
|
|
|
36
36
|
}
|
|
37
37
|
if (packages.backend === 'apt') {
|
|
38
38
|
// Debian/Devuan/Ubuntu
|
|
39
|
-
if (packagesToRemove != undefined) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
cmd += elem + ' ';
|
|
45
|
-
}
|
|
39
|
+
if (packagesToRemove != undefined && packagesToRemove.length > 0) {
|
|
40
|
+
let cmd = `chroot ${this.installTarget} apt-get purge -y `;
|
|
41
|
+
for (const elem of packagesToRemove) {
|
|
42
|
+
if (Pacman.packageIsInstalled(elem)) {
|
|
43
|
+
cmd += elem + ' ';
|
|
46
44
|
}
|
|
47
|
-
await exec(`${cmd} ${this.toNull}`, this.echo);
|
|
48
|
-
let autoremove = `chroot ${this.installTarget} apt-get autoremove -y ${this.toNull}`;
|
|
49
|
-
await exec(autoremove, this.echo);
|
|
50
45
|
}
|
|
46
|
+
await exec(`${cmd} ${this.toNull}`, this.echo);
|
|
47
|
+
const autoremove = `chroot ${this.installTarget} apt-get autoremove -y ${this.toNull}`;
|
|
48
|
+
await exec(autoremove, this.echo);
|
|
51
49
|
}
|
|
52
|
-
if (packagesToInstall != undefined) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
cmd += elem + ' ';
|
|
57
|
-
}
|
|
58
|
-
let update = `chroot ${this.installTarget} apt-get update ${this.toNull}`;
|
|
59
|
-
await exec(update, this.echo);
|
|
60
|
-
await exec(`${cmd} ${this.toNull}`, this.echo);
|
|
50
|
+
if (packagesToInstall != undefined && packagesToInstall.length > 0) {
|
|
51
|
+
let cmd = `chroot ${this.installTarget} apt-get install -y `;
|
|
52
|
+
for (const elem of packagesToInstall) {
|
|
53
|
+
cmd += elem + ' ';
|
|
61
54
|
}
|
|
55
|
+
const update = `chroot ${this.installTarget} apt-get update ${this.toNull}`;
|
|
56
|
+
await exec(update, this.echo);
|
|
57
|
+
await exec(`${cmd} ${this.toNull}`, this.echo);
|
|
62
58
|
}
|
|
63
59
|
}
|
|
64
60
|
else if (packages.backend === 'pacman') {
|
|
65
61
|
// arch/manjaro
|
|
66
|
-
if (packagesToRemove != undefined) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
cmd += elem + ' ';
|
|
71
|
-
}
|
|
72
|
-
await exec(`${cmd} ${echoYes}`, this.echo);
|
|
62
|
+
if (packagesToRemove != undefined && packagesToRemove.length > 0) {
|
|
63
|
+
let cmd = `chroot ${this.installTarget} pacman -R\n`;
|
|
64
|
+
for (const elem of packagesToRemove) {
|
|
65
|
+
cmd += elem + ' ';
|
|
73
66
|
}
|
|
67
|
+
await exec(`${cmd} ${echoYes}`, this.echo);
|
|
74
68
|
}
|
|
75
|
-
if (packagesToInstall != undefined) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
await exec(`chroot ${this.installTarget} pacman -S ${elem}`, echoYes);
|
|
79
|
-
}
|
|
69
|
+
if (packagesToInstall != undefined && packagesToInstall.length > 0) {
|
|
70
|
+
for (const elem of packagesToInstall) {
|
|
71
|
+
await exec(`chroot ${this.installTarget} pacman -S ${elem}`, echoYes);
|
|
80
72
|
}
|
|
81
73
|
}
|
|
82
74
|
}
|