penguins-eggs 10.0.26 → 10.0.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 +2 -1463
- package/README.md +3 -741
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +4 -4
- package/package.json +3 -3
- package/scripts/love +13 -18
- package/dist/classes/bleach.d.ts +0 -32
- package/dist/classes/bleach.js +0 -136
- package/dist/classes/cfs.d.ts +0 -17
- package/dist/classes/cfs.js +0 -39
- package/dist/classes/cli-autologin.d.ts +0 -52
- package/dist/classes/cli-autologin.js +0 -230
- package/dist/classes/compressors.d.ts +0 -54
- package/dist/classes/compressors.js +0 -109
- package/dist/classes/daddy.d.ts +0 -26
- package/dist/classes/daddy.js +0 -161
- package/dist/classes/distro.d.ts +0 -36
- package/dist/classes/distro.js +0 -346
- package/dist/classes/families/alpine.d.ts +0 -55
- package/dist/classes/families/alpine.js +0 -108
- package/dist/classes/families/archlinux.d.ts +0 -61
- package/dist/classes/families/archlinux.js +0 -140
- package/dist/classes/families/debian.d.ts +0 -65
- package/dist/classes/families/debian.js +0 -138
- package/dist/classes/families/fedora.d.ts +0 -52
- package/dist/classes/families/fedora.js +0 -100
- package/dist/classes/families/mockup.d.ts +0 -60
- package/dist/classes/families/mockup.js +0 -79
- package/dist/classes/families/opensuse.d.ts +0 -52
- package/dist/classes/families/opensuse.js +0 -104
- package/dist/classes/incubation/branding.d.ts +0 -17
- package/dist/classes/incubation/branding.js +0 -89
- package/dist/classes/incubation/distros/bionic.d.ts +0 -32
- package/dist/classes/incubation/distros/bionic.js +0 -83
- package/dist/classes/incubation/distros/buster.d.ts +0 -32
- package/dist/classes/incubation/distros/buster.js +0 -85
- package/dist/classes/incubation/distros/jessie.d.ts +0 -31
- package/dist/classes/incubation/distros/jessie.js +0 -44
- package/dist/classes/incubation/distros/noble.d.ts +0 -32
- package/dist/classes/incubation/distros/noble.js +0 -85
- package/dist/classes/incubation/distros/rolling.d.ts +0 -32
- package/dist/classes/incubation/distros/rolling.js +0 -82
- package/dist/classes/incubation/fisherman-helper/displaymanager.d.ts +0 -11
- package/dist/classes/incubation/fisherman-helper/displaymanager.js +0 -39
- package/dist/classes/incubation/fisherman-helper/packages.d.ts +0 -20
- package/dist/classes/incubation/fisherman-helper/packages.js +0 -72
- package/dist/classes/incubation/fisherman-helper/settings.d.ts +0 -15
- package/dist/classes/incubation/fisherman-helper/settings.js +0 -83
- package/dist/classes/incubation/fisherman.d.ts +0 -77
- package/dist/classes/incubation/fisherman.js +0 -251
- package/dist/classes/incubation/incubator.d.ts +0 -40
- package/dist/classes/incubation/incubator.js +0 -328
- package/dist/classes/incubation/installer.d.ts +0 -13
- package/dist/classes/incubation/installer.js +0 -64
- package/dist/classes/keyboards.d.ts +0 -50
- package/dist/classes/keyboards.js +0 -217
- package/dist/classes/locales.d.ts +0 -21
- package/dist/classes/locales.js +0 -80
- package/dist/classes/n8.d.ts +0 -18
- package/dist/classes/n8.js +0 -36
- package/dist/classes/network.d.ts +0 -37
- package/dist/classes/network.js +0 -98
- package/dist/classes/ovary.d.ts +0 -214
- package/dist/classes/ovary.js +0 -1879
- package/dist/classes/pacman.d.ts +0 -149
- package/dist/classes/pacman.js +0 -699
- package/dist/classes/pve-live.d.ts +0 -17
- package/dist/classes/pve-live.js +0 -52
- package/dist/classes/pxe.d.ts +0 -74
- package/dist/classes/pxe.js +0 -410
- package/dist/classes/settings.d.ts +0 -53
- package/dist/classes/settings.js +0 -185
- package/dist/classes/sources_list.d.ts +0 -28
- package/dist/classes/sources_list.js +0 -89
- package/dist/classes/systemctl.d.ts +0 -47
- package/dist/classes/systemctl.js +0 -86
- package/dist/classes/tailor.d.ts +0 -46
- package/dist/classes/tailor.js +0 -539
- package/dist/classes/tools.d.ts +0 -30
- package/dist/classes/tools.js +0 -54
- package/dist/classes/users.d.ts +0 -28
- package/dist/classes/users.js +0 -143
- package/dist/classes/utils.d.ts +0 -323
- package/dist/classes/utils.js +0 -946
- package/dist/classes/xdg.d.ts +0 -45
- package/dist/classes/xdg.js +0 -329
- package/dist/classes/yolk.d.ts +0 -33
- package/dist/classes/yolk.js +0 -114
- package/dist/commands/adapt.d.ts +0 -17
- package/dist/commands/adapt.js +0 -33
- package/dist/commands/analyze.d.ts +0 -26
- package/dist/commands/analyze.js +0 -95
- package/dist/commands/calamares.d.ts +0 -29
- package/dist/commands/calamares.js +0 -110
- package/dist/commands/config.d.ts +0 -35
- package/dist/commands/config.js +0 -192
- package/dist/commands/cuckoo.d.ts +0 -16
- package/dist/commands/cuckoo.js +0 -62
- package/dist/commands/dad.d.ts +0 -20
- package/dist/commands/dad.js +0 -46
- package/dist/commands/export/deb.d.ts +0 -19
- package/dist/commands/export/deb.js +0 -51
- package/dist/commands/export/iso.d.ts +0 -19
- package/dist/commands/export/iso.js +0 -55
- package/dist/commands/install.d.ts +0 -37
- package/dist/commands/install.js +0 -92
- package/dist/commands/kill.d.ts +0 -24
- package/dist/commands/kill.js +0 -50
- package/dist/commands/mom.d.ts +0 -16
- package/dist/commands/mom.js +0 -30
- package/dist/commands/produce.d.ts +0 -34
- package/dist/commands/produce.js +0 -199
- package/dist/commands/status.d.ts +0 -23
- package/dist/commands/status.js +0 -31
- package/dist/commands/syncfrom.d.ts +0 -45
- package/dist/commands/syncfrom.js +0 -152
- package/dist/commands/syncto.d.ts +0 -40
- package/dist/commands/syncto.js +0 -175
- package/dist/commands/tools/clean.d.ts +0 -18
- package/dist/commands/tools/clean.js +0 -37
- package/dist/commands/tools/ppa.d.ts +0 -26
- package/dist/commands/tools/ppa.js +0 -138
- package/dist/commands/tools/skel.d.ts +0 -18
- package/dist/commands/tools/skel.js +0 -44
- package/dist/commands/tools/stat.d.ts +0 -31
- package/dist/commands/tools/stat.js +0 -70
- package/dist/commands/tools/yolk.d.ts +0 -24
- package/dist/commands/tools/yolk.js +0 -45
- package/dist/commands/update.d.ts +0 -47
- package/dist/commands/update.js +0 -140
- package/dist/commands/wardrobe/get.d.ts +0 -23
- package/dist/commands/wardrobe/get.js +0 -52
- package/dist/commands/wardrobe/list.d.ts +0 -24
- package/dist/commands/wardrobe/list.js +0 -125
- package/dist/commands/wardrobe/show.d.ts +0 -25
- package/dist/commands/wardrobe/show.js +0 -97
- package/dist/commands/wardrobe/wear.d.ts +0 -26
- package/dist/commands/wardrobe/wear.js +0 -81
- package/dist/components/finished.d.ts +0 -15
- package/dist/components/finished.js +0 -55
- package/dist/components/information.d.ts +0 -8
- package/dist/components/information.js +0 -153
- package/dist/components/install.d.ts +0 -15
- package/dist/components/install.js +0 -56
- package/dist/components/keyboard.d.ts +0 -16
- package/dist/components/keyboard.js +0 -54
- package/dist/components/location.d.ts +0 -16
- package/dist/components/location.js +0 -59
- package/dist/components/network.d.ts +0 -19
- package/dist/components/network.js +0 -65
- package/dist/components/partitions.d.ts +0 -16
- package/dist/components/partitions.js +0 -73
- package/dist/components/steps.d.ts +0 -13
- package/dist/components/steps.js +0 -148
- package/dist/components/summary.d.ts +0 -24
- package/dist/components/summary.js +0 -82
- package/dist/components/title.d.ts +0 -11
- package/dist/components/title.js +0 -35
- package/dist/components/users.d.ts +0 -24
- package/dist/components/users.js +0 -80
- package/dist/components/welcome.d.ts +0 -13
- package/dist/components/welcome.js +0 -63
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -8
- package/dist/interfaces/i-addons.d.ts +0 -13
- package/dist/interfaces/i-addons.js +0 -8
- package/dist/interfaces/i-analyze.d.ts +0 -17
- package/dist/interfaces/i-analyze.js +0 -17
- package/dist/interfaces/i-app.d.ts +0 -14
- package/dist/interfaces/i-app.js +0 -8
- package/dist/interfaces/i-branding.d.ts +0 -36
- package/dist/interfaces/i-branding.js +0 -8
- package/dist/interfaces/i-calamares-partition.d.ts +0 -18
- package/dist/interfaces/i-calamares-partition.js +0 -8
- package/dist/interfaces/i-config-tools.d.ts +0 -18
- package/dist/interfaces/i-config-tools.js +0 -8
- package/dist/interfaces/i-devices.d.ts +0 -20
- package/dist/interfaces/i-devices.js +0 -8
- package/dist/interfaces/i-distro.d.ts +0 -27
- package/dist/interfaces/i-distro.js +0 -8
- package/dist/interfaces/i-drive-list.d.ts +0 -33
- package/dist/interfaces/i-drive-list.js +0 -8
- package/dist/interfaces/i-eggs-config.d.ts +0 -32
- package/dist/interfaces/i-eggs-config.js +0 -8
- package/dist/interfaces/i-excludes.d.ts +0 -14
- package/dist/interfaces/i-excludes.js +0 -8
- package/dist/interfaces/i-exec.d.ts +0 -11
- package/dist/interfaces/i-exec.js +0 -8
- package/dist/interfaces/i-initrd.d.ts +0 -13
- package/dist/interfaces/i-initrd.js +0 -8
- package/dist/interfaces/i-install.d.ts +0 -16
- package/dist/interfaces/i-install.js +0 -8
- package/dist/interfaces/i-installer.d.ts +0 -17
- package/dist/interfaces/i-installer.js +0 -8
- package/dist/interfaces/i-krill-config.d.ts +0 -33
- package/dist/interfaces/i-krill-config.js +0 -8
- package/dist/interfaces/i-krill.d.ts +0 -42
- package/dist/interfaces/i-krill.js +0 -8
- package/dist/interfaces/i-materia.d.ts +0 -41
- package/dist/interfaces/i-materia.js +0 -8
- package/dist/interfaces/i-net.d.ts +0 -16
- package/dist/interfaces/i-net.js +0 -8
- package/dist/interfaces/i-packages.d.ts +0 -16
- package/dist/interfaces/i-packages.js +0 -8
- package/dist/interfaces/i-partitions.d.ts +0 -16
- package/dist/interfaces/i-partitions.js +0 -8
- package/dist/interfaces/i-pxe.d.ts +0 -45
- package/dist/interfaces/i-pxe.js +0 -1
- package/dist/interfaces/i-remix.d.ts +0 -21
- package/dist/interfaces/i-remix.js +0 -8
- package/dist/interfaces/i-settings.d.ts +0 -33
- package/dist/interfaces/i-settings.js +0 -8
- package/dist/interfaces/i-user.d.ts +0 -14
- package/dist/interfaces/i-user.js +0 -8
- package/dist/interfaces/i-workdir.d.ts +0 -14
- package/dist/interfaces/i-workdir.js +0 -8
- package/dist/interfaces/i-xkb-model.d.ts +0 -24
- package/dist/interfaces/i-xkb-model.js +0 -8
- package/dist/interfaces/index.d.ts +0 -25
- package/dist/interfaces/index.js +0 -8
- package/dist/krill/modules/add-user.d.ts +0 -20
- package/dist/krill/modules/add-user.js +0 -50
- package/dist/krill/modules/bootloader-config-arch.d.ts +0 -14
- package/dist/krill/modules/bootloader-config-arch.js +0 -37
- package/dist/krill/modules/bootloader-config-debian.d.ts +0 -10
- package/dist/krill/modules/bootloader-config-debian.js +0 -50
- package/dist/krill/modules/bootloader-config.d.ts +0 -10
- package/dist/krill/modules/bootloader-config.js +0 -16
- package/dist/krill/modules/bootloader.d.ts +0 -14
- package/dist/krill/modules/bootloader.js +0 -30
- package/dist/krill/modules/change-password.d.ts +0 -15
- package/dist/krill/modules/change-password.js +0 -18
- package/dist/krill/modules/del-live-user.d.ts +0 -14
- package/dist/krill/modules/del-live-user.js +0 -38
- package/dist/krill/modules/fstab.d.ts +0 -14
- package/dist/krill/modules/fstab.js +0 -121
- package/dist/krill/modules/grubcfg.d.ts +0 -17
- package/dist/krill/modules/grubcfg.js +0 -29
- package/dist/krill/modules/hostname.d.ts +0 -13
- package/dist/krill/modules/hostname.js +0 -50
- package/dist/krill/modules/initramfs-cfg.d.ts +0 -14
- package/dist/krill/modules/initramfs-cfg.js +0 -25
- package/dist/krill/modules/initramfs.d.ts +0 -13
- package/dist/krill/modules/initramfs.js +0 -48
- package/dist/krill/modules/locale-cfg.d.ts +0 -10
- package/dist/krill/modules/locale-cfg.js +0 -61
- package/dist/krill/modules/locale.d.ts +0 -13
- package/dist/krill/modules/locale.js +0 -48
- package/dist/krill/modules/m-keyboard.d.ts +0 -14
- package/dist/krill/modules/m-keyboard.js +0 -79
- package/dist/krill/modules/m-timezone.d.ts +0 -14
- package/dist/krill/modules/m-timezone.js +0 -22
- package/dist/krill/modules/machine-id.d.ts +0 -15
- package/dist/krill/modules/machine-id.js +0 -30
- package/dist/krill/modules/mkfs.d.ts +0 -13
- package/dist/krill/modules/mkfs.js +0 -48
- package/dist/krill/modules/mount-fs.d.ts +0 -17
- package/dist/krill/modules/mount-fs.js +0 -60
- package/dist/krill/modules/mount-vfs.d.ts +0 -17
- package/dist/krill/modules/mount-vfs.js +0 -40
- package/dist/krill/modules/network-cfg.d.ts +0 -19
- package/dist/krill/modules/network-cfg.js +0 -64
- package/dist/krill/modules/packages.d.ts +0 -14
- package/dist/krill/modules/packages.js +0 -98
- package/dist/krill/modules/partition.d.ts +0 -20
- package/dist/krill/modules/partition.js +0 -324
- package/dist/krill/modules/remove-installer-link.d.ts +0 -13
- package/dist/krill/modules/remove-installer-link.js +0 -35
- package/dist/krill/modules/umount.d.ts +0 -14
- package/dist/krill/modules/umount.js +0 -27
- package/dist/krill/modules/unpackfs.d.ts +0 -13
- package/dist/krill/modules/unpackfs.js +0 -19
- package/dist/krill/prepare.d.ts +0 -78
- package/dist/krill/prepare.js +0 -626
- package/dist/krill/sequence.d.ts +0 -157
- package/dist/krill/sequence.js +0 -665
- package/dist/lib/get_address.d.ts +0 -8
- package/dist/lib/get_address.js +0 -23
- package/dist/lib/get_dns.d.ts +0 -8
- package/dist/lib/get_dns.js +0 -23
- package/dist/lib/get_domain.d.ts +0 -8
- package/dist/lib/get_domain.js +0 -23
- package/dist/lib/get_gateway.d.ts +0 -8
- package/dist/lib/get_gateway.js +0 -23
- package/dist/lib/get_hostname.d.ts +0 -8
- package/dist/lib/get_hostname.js +0 -23
- package/dist/lib/get_netmask.d.ts +0 -8
- package/dist/lib/get_netmask.js +0 -23
- package/dist/lib/get_password.d.ts +0 -8
- package/dist/lib/get_password.js +0 -36
- package/dist/lib/get_userfullname.d.ts +0 -8
- package/dist/lib/get_userfullname.js +0 -23
- package/dist/lib/get_username.d.ts +0 -8
- package/dist/lib/get_username.js +0 -23
- package/dist/lib/kill_me_softly.d.ts +0 -11
- package/dist/lib/kill_me_softly.js +0 -61
- package/dist/lib/select_address_type.d.ts +0 -8
- package/dist/lib/select_address_type.js +0 -24
- package/dist/lib/select_filesystem_type.d.ts +0 -8
- package/dist/lib/select_filesystem_type.js +0 -45
- package/dist/lib/select_installation_device.d.ts +0 -8
- package/dist/lib/select_installation_device.js +0 -30
- package/dist/lib/select_installation_mode.d.ts +0 -8
- package/dist/lib/select_installation_mode.js +0 -24
- package/dist/lib/select_interface.d.ts +0 -8
- package/dist/lib/select_interface.js +0 -24
- package/dist/lib/select_keyboard_layout.d.ts +0 -11
- package/dist/lib/select_keyboard_layout.js +0 -36
- package/dist/lib/select_keyboard_model.d.ts +0 -11
- package/dist/lib/select_keyboard_model.js +0 -34
- package/dist/lib/select_keyboard_option.d.ts +0 -11
- package/dist/lib/select_keyboard_option.js +0 -34
- package/dist/lib/select_keyboard_variant.d.ts +0 -11
- package/dist/lib/select_keyboard_variant.js +0 -35
- package/dist/lib/select_languages.d.ts +0 -8
- package/dist/lib/select_languages.js +0 -28
- package/dist/lib/select_regions.d.ts +0 -8
- package/dist/lib/select_regions.js +0 -24
- package/dist/lib/select_user_swap_choice.d.ts +0 -8
- package/dist/lib/select_user_swap_choice.js +0 -34
- package/dist/lib/select_zones.d.ts +0 -8
- package/dist/lib/select_zones.js +0 -518
- package/dist/lib/utils.d.ts +0 -34
- package/dist/lib/utils.js +0 -79
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/classes/compressors.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
|
-
import shx from 'shelljs';
|
|
9
|
-
export default class Compressors {
|
|
10
|
-
dest = '/tmp/eggs-mksquash-dest';
|
|
11
|
-
isEnabled = {
|
|
12
|
-
error: false,
|
|
13
|
-
gzip: true,
|
|
14
|
-
lz4: false,
|
|
15
|
-
lzma: false,
|
|
16
|
-
lzo: false,
|
|
17
|
-
xz: false,
|
|
18
|
-
zstd: false
|
|
19
|
-
};
|
|
20
|
-
source = '/tmp/eggs-mksquash-test';
|
|
21
|
-
/**
|
|
22
|
-
* fast compression
|
|
23
|
-
* @returns
|
|
24
|
-
*/
|
|
25
|
-
fast() {
|
|
26
|
-
let comp = 'gzip';
|
|
27
|
-
if (this.isEnabled.zstd) {
|
|
28
|
-
comp = 'zstd -b 1M -Xcompression-level 3';
|
|
29
|
-
}
|
|
30
|
-
else if (this.isEnabled.lz4) {
|
|
31
|
-
comp = 'lz4';
|
|
32
|
-
}
|
|
33
|
-
return comp;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* max
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
|
-
max() {
|
|
40
|
-
let filter = 'x86';
|
|
41
|
-
if (process.arch === 'arm64') {
|
|
42
|
-
filter = 'arm';
|
|
43
|
-
}
|
|
44
|
-
const options = '-b 1M -no-duplicates -no-recovery -always-use-fragments';
|
|
45
|
-
if (process.arch === 'ia32') {
|
|
46
|
-
// options = '-b 1M'
|
|
47
|
-
}
|
|
48
|
-
const comp = `xz -Xbcj ${filter} ${options}`;
|
|
49
|
-
return comp;
|
|
50
|
-
}
|
|
51
|
-
pendrive(level = '15') {
|
|
52
|
-
let comp = 'gzip';
|
|
53
|
-
if (this.isEnabled.zstd) {
|
|
54
|
-
comp = `zstd -b 1M -Xcompression-level ${level}`;
|
|
55
|
-
}
|
|
56
|
-
else if (this.isEnabled.lz4) {
|
|
57
|
-
comp = 'lz4';
|
|
58
|
-
}
|
|
59
|
-
return comp;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* populate
|
|
63
|
-
*/
|
|
64
|
-
async populate() {
|
|
65
|
-
await this.prepareCheck();
|
|
66
|
-
this.isEnabled.error = await this.check('error');
|
|
67
|
-
this.isEnabled.lzma = await this.check('lzma');
|
|
68
|
-
this.isEnabled.lzo = await this.check('lzo');
|
|
69
|
-
this.isEnabled.lz4 = await this.check('lz4');
|
|
70
|
-
this.isEnabled.xz = await this.check('xz');
|
|
71
|
-
this.isEnabled.zstd = await this.check('zstd');
|
|
72
|
-
await this.removeCheck();
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* standard
|
|
76
|
-
* @returns
|
|
77
|
-
*/
|
|
78
|
-
standard() {
|
|
79
|
-
const comp = 'xz -b 1M';
|
|
80
|
-
return comp;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* check mksquashfs exists
|
|
84
|
-
* @param compressor
|
|
85
|
-
* @returns
|
|
86
|
-
*/
|
|
87
|
-
async check(compressor) {
|
|
88
|
-
let result = false;
|
|
89
|
-
const { stderr } = shx.exec('mksquashfs ' + this.source + ' ' + this.dest + ' -comp ' + compressor + ' -ef ' + this.dest, { silent: true });
|
|
90
|
-
if (stderr === '') {
|
|
91
|
-
result = true;
|
|
92
|
-
}
|
|
93
|
-
return result;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* prepareCheck
|
|
97
|
-
*/
|
|
98
|
-
async prepareCheck() {
|
|
99
|
-
shx.exec('rm -rf ' + this.source, { silent: true });
|
|
100
|
-
shx.exec('mkdir ' + this.source, { silent: true });
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* removeCheck
|
|
104
|
-
*/
|
|
105
|
-
async removeCheck() {
|
|
106
|
-
shx.exec('rm -rf ' + this.source, { silent: true });
|
|
107
|
-
shx.exec('rm -f ' + this.dest, { silent: true });
|
|
108
|
-
}
|
|
109
|
-
}
|
package/dist/classes/daddy.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/classes/daddy.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
|
-
import Settings from '../classes/settings.js';
|
|
9
|
-
import { IEggsConfig } from '../interfaces/i-eggs-config.js';
|
|
10
|
-
export default class Daddy {
|
|
11
|
-
settings: Settings;
|
|
12
|
-
/**
|
|
13
|
-
* editConfif
|
|
14
|
-
* @param c
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
editConfig(c: IEggsConfig): Promise<string>;
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @param reset
|
|
21
|
-
* @param isCustom
|
|
22
|
-
* @param fileCustom
|
|
23
|
-
* @param verbose
|
|
24
|
-
*/
|
|
25
|
-
helpMe(reset?: boolean, isCustom?: boolean, fileCustom?: string, verbose?: boolean): Promise<void>;
|
|
26
|
-
}
|
package/dist/classes/daddy.js
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/classes/daddy.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
|
-
import chalk from 'chalk';
|
|
9
|
-
import inquirer from 'inquirer';
|
|
10
|
-
import yaml from 'js-yaml';
|
|
11
|
-
import fs from 'node:fs';
|
|
12
|
-
// _dirname
|
|
13
|
-
import path from 'node:path';
|
|
14
|
-
// We need to remove .js extension from import
|
|
15
|
-
import Pacman from '../classes/pacman.js';
|
|
16
|
-
import Settings from '../classes/settings.js';
|
|
17
|
-
import Utils from '../classes/utils.js';
|
|
18
|
-
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
19
|
-
export default class Daddy {
|
|
20
|
-
settings = {};
|
|
21
|
-
/**
|
|
22
|
-
* editConfif
|
|
23
|
-
* @param c
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
async editConfig(c) {
|
|
27
|
-
// Utils.titles('dad')
|
|
28
|
-
console.log(chalk.cyan('Edit and save Live system parameters'));
|
|
29
|
-
console.log();
|
|
30
|
-
let compressionOpt = 0;
|
|
31
|
-
if (c.compression === 'xz') {
|
|
32
|
-
compressionOpt = 1;
|
|
33
|
-
}
|
|
34
|
-
else if (c.compression === 'xz -Xbcj x86') {
|
|
35
|
-
compressionOpt = 2;
|
|
36
|
-
}
|
|
37
|
-
if (c.snapshot_prefix === '') {
|
|
38
|
-
c.snapshot_prefix = Utils.snapshotPrefix(this.settings.distro.distroId, this.settings.distro.codenameId);
|
|
39
|
-
}
|
|
40
|
-
return new Promise((resolve) => {
|
|
41
|
-
const questions = [
|
|
42
|
-
{
|
|
43
|
-
default: c.snapshot_prefix,
|
|
44
|
-
message: 'LiveCD iso prefix: ',
|
|
45
|
-
name: 'snapshot_prefix',
|
|
46
|
-
type: 'input'
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
default: c.snapshot_basename,
|
|
50
|
-
message: 'LiveCD iso basename: ',
|
|
51
|
-
name: 'snapshot_basename',
|
|
52
|
-
type: 'input'
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
default: c.user_opt,
|
|
56
|
-
message: 'LiveCD user:',
|
|
57
|
-
name: 'user_opt',
|
|
58
|
-
type: 'input'
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
default: c.user_opt_passwd,
|
|
62
|
-
message: 'LiveCD user password: ',
|
|
63
|
-
name: 'user_opt_passwd',
|
|
64
|
-
type: 'input'
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
default: c.root_passwd,
|
|
68
|
-
message: 'LiveCD root password: ',
|
|
69
|
-
name: 'root_passwd',
|
|
70
|
-
type: 'input'
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
choices: ['fast', 'max'],
|
|
74
|
-
default: compressionOpt,
|
|
75
|
-
message: 'LiveCD compression: ',
|
|
76
|
-
name: 'compression',
|
|
77
|
-
type: 'list'
|
|
78
|
-
}
|
|
79
|
-
];
|
|
80
|
-
inquirer.prompt(questions).then((options) => {
|
|
81
|
-
resolve(JSON.stringify(options));
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
* @param reset
|
|
88
|
-
* @param isCustom
|
|
89
|
-
* @param fileCustom
|
|
90
|
-
* @param verbose
|
|
91
|
-
*/
|
|
92
|
-
async helpMe(reset = false, isCustom = false, fileCustom = '', verbose = false) {
|
|
93
|
-
if (isCustom) {
|
|
94
|
-
console.log("using custom file:", fileCustom);
|
|
95
|
-
}
|
|
96
|
-
// Controllo configurazione
|
|
97
|
-
if (!Pacman.configurationCheck()) {
|
|
98
|
-
console.log('- creating configuration dir...');
|
|
99
|
-
await Pacman.configurationInstall(verbose);
|
|
100
|
-
}
|
|
101
|
-
// Templates
|
|
102
|
-
if (!Pacman.distroTemplateCheck()) {
|
|
103
|
-
console.log('- distro template install...');
|
|
104
|
-
await Pacman.distroTemplateInstall(verbose);
|
|
105
|
-
}
|
|
106
|
-
// show and edit configuration
|
|
107
|
-
this.settings = new Settings();
|
|
108
|
-
let config = {};
|
|
109
|
-
let jsonConf = '';
|
|
110
|
-
if (await this.settings.load()) {
|
|
111
|
-
config = this.settings.config;
|
|
112
|
-
config.compression = 'fast';
|
|
113
|
-
if (reset || isCustom) {
|
|
114
|
-
if (config.snapshot_prefix === '') {
|
|
115
|
-
config.snapshot_prefix = Utils.snapshotPrefix(this.settings.distro.distroId, this.settings.distro.codenameId);
|
|
116
|
-
}
|
|
117
|
-
jsonConf = JSON.stringify(config);
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
jsonConf = await this.editConfig(config);
|
|
121
|
-
}
|
|
122
|
-
// Custom configuration
|
|
123
|
-
if (isCustom) {
|
|
124
|
-
const conf = fs.readFileSync(fileCustom, 'utf8');
|
|
125
|
-
const confCustom = yaml.load(conf);
|
|
126
|
-
config.snapshot_basename = confCustom.snapshot_basename;
|
|
127
|
-
config.snapshot_prefix = confCustom.snapshot_prefix;
|
|
128
|
-
config.user_opt = confCustom.user_opt;
|
|
129
|
-
config.user_opt_passwd = confCustom.user_opt_passwd;
|
|
130
|
-
config.root_passwd = confCustom.root_passwd;
|
|
131
|
-
config.theme = confCustom.theme;
|
|
132
|
-
jsonConf = JSON.stringify(config);
|
|
133
|
-
}
|
|
134
|
-
// Save new configuration
|
|
135
|
-
const confNew = JSON.parse(jsonConf);
|
|
136
|
-
config.snapshot_basename = confNew.snapshot_basename;
|
|
137
|
-
config.snapshot_prefix = confNew.snapshot_prefix;
|
|
138
|
-
config.user_opt = confNew.user_opt;
|
|
139
|
-
config.user_opt_passwd = confNew.user_opt_passwd;
|
|
140
|
-
config.root_passwd = confNew.root_passwd;
|
|
141
|
-
config.theme = confNew.theme;
|
|
142
|
-
await this.settings.save(config);
|
|
143
|
-
}
|
|
144
|
-
console.log();
|
|
145
|
-
console.log(chalk.cyan('Your configuration was saved on: /etc/penguins-eggs.d'));
|
|
146
|
-
console.log();
|
|
147
|
-
console.log(chalk.cyan(`You can create a clean ISO with: `) + chalk.white(`sudo eggs produce`));
|
|
148
|
-
console.log(chalk.cyan(`or a full personal clone: `) + chalk.white(`sudo eggs produce --clone`));
|
|
149
|
-
console.log();
|
|
150
|
-
console.log(chalk.cyan(`If you don't have enough space to remaster, you can mount`));
|
|
151
|
-
console.log(chalk.cyan(`some remote or local space. Follow the samples:`));
|
|
152
|
-
console.log(chalk.cyan(`- first, create an hidden mountpoint under the nest:`));
|
|
153
|
-
console.log(chalk.white(`sudo mkdir /home/eggs/.mnt -p`));
|
|
154
|
-
console.log(chalk.cyan(`- then, mount remote space:`));
|
|
155
|
-
console.log(chalk.white(`sudo sshfs -o allow_other root@192.168.1.2:/zfs/iso /home/eggs/.mnt`));
|
|
156
|
-
console.log(chalk.cyan('- or, mount a local partition:'));
|
|
157
|
-
console.log(chalk.white(`sudo mount /dev/sdx1 /home/eggs/.mnt`));
|
|
158
|
-
console.log();
|
|
159
|
-
console.log(chalk.cyan('More help? ') + chalk.white('eggs mom'));
|
|
160
|
-
}
|
|
161
|
-
}
|
package/dist/classes/distro.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* penguins-eggs
|
|
3
|
-
* class: distro.ts
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
8
|
-
import { IDistro } from '../interfaces/index.js';
|
|
9
|
-
/**
|
|
10
|
-
* Classe
|
|
11
|
-
*/
|
|
12
|
-
declare class Distro implements IDistro {
|
|
13
|
-
bugReportUrl: string;
|
|
14
|
-
codenameId: string;
|
|
15
|
-
codenameLikeId: string;
|
|
16
|
-
distroId: string;
|
|
17
|
-
distroLike: string;
|
|
18
|
-
familyId: string;
|
|
19
|
-
homeUrl: string;
|
|
20
|
-
isCalamaresAvailable: boolean;
|
|
21
|
-
isolinuxPath: string;
|
|
22
|
-
liveMediumPath: string;
|
|
23
|
-
memdiskPath: string;
|
|
24
|
-
pxelinuxPath: string;
|
|
25
|
-
releaseId: string;
|
|
26
|
-
releaseLike: string;
|
|
27
|
-
squashfs: string;
|
|
28
|
-
supportUrl: string;
|
|
29
|
-
syslinuxPath: string;
|
|
30
|
-
usrLibPath: string;
|
|
31
|
-
/**
|
|
32
|
-
* Costruttore
|
|
33
|
-
*/
|
|
34
|
-
constructor();
|
|
35
|
-
}
|
|
36
|
-
export default Distro;
|
package/dist/classes/distro.js
DELETED
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* penguins-eggs
|
|
3
|
-
* class: distro.ts
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
8
|
-
import yaml from 'js-yaml';
|
|
9
|
-
import fs from 'node:fs';
|
|
10
|
-
import path from 'node:path';
|
|
11
|
-
import shell from 'shelljs';
|
|
12
|
-
import Utils from './utils.js';
|
|
13
|
-
// _dirname
|
|
14
|
-
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
15
|
-
/**
|
|
16
|
-
* Classe
|
|
17
|
-
*/
|
|
18
|
-
class Distro {
|
|
19
|
-
bugReportUrl;
|
|
20
|
-
codenameId;
|
|
21
|
-
codenameLikeId;
|
|
22
|
-
distroId;
|
|
23
|
-
distroLike;
|
|
24
|
-
familyId;
|
|
25
|
-
homeUrl;
|
|
26
|
-
isCalamaresAvailable;
|
|
27
|
-
isolinuxPath;
|
|
28
|
-
liveMediumPath;
|
|
29
|
-
memdiskPath;
|
|
30
|
-
pxelinuxPath;
|
|
31
|
-
releaseId;
|
|
32
|
-
releaseLike;
|
|
33
|
-
squashfs;
|
|
34
|
-
supportUrl;
|
|
35
|
-
syslinuxPath;
|
|
36
|
-
usrLibPath;
|
|
37
|
-
/**
|
|
38
|
-
* Costruttore
|
|
39
|
-
*/
|
|
40
|
-
constructor() {
|
|
41
|
-
this.bugReportUrl = 'https://github.com-pieroproietti/penguins-eggs/issue';
|
|
42
|
-
this.codenameId = '';
|
|
43
|
-
this.codenameLikeId = '';
|
|
44
|
-
this.distroId = '';
|
|
45
|
-
this.distroLike = '';
|
|
46
|
-
this.familyId = 'debian';
|
|
47
|
-
this.homeUrl = 'https://penguins-eggs.net';
|
|
48
|
-
this.isCalamaresAvailable = true;
|
|
49
|
-
this.isolinuxPath = '';
|
|
50
|
-
this.liveMediumPath = '/run/live/medium/';
|
|
51
|
-
this.memdiskPath = '';
|
|
52
|
-
this.pxelinuxPath = '';
|
|
53
|
-
this.releaseId = '';
|
|
54
|
-
this.releaseLike = '';
|
|
55
|
-
this.squashfs = 'live/filesystem.squashfs';
|
|
56
|
-
this.supportUrl = 'https://penguins-eggs.net';
|
|
57
|
-
this.syslinuxPath = '';
|
|
58
|
-
this.usrLibPath = '/usr/lib';
|
|
59
|
-
const os_release = '/etc/os-release';
|
|
60
|
-
if (fs.existsSync(os_release)) {
|
|
61
|
-
let lines = [];
|
|
62
|
-
if (fs.existsSync(os_release)) {
|
|
63
|
-
const data = fs.readFileSync(os_release, 'utf8');
|
|
64
|
-
lines = data.split('\n');
|
|
65
|
-
}
|
|
66
|
-
// per ogni riga
|
|
67
|
-
for (const line of lines) {
|
|
68
|
-
if (line.startsWith('HOME_URL=')) {
|
|
69
|
-
this.homeUrl = line.slice('HOME_URL='.length).replaceAll('"', '');
|
|
70
|
-
}
|
|
71
|
-
else if (line.startsWith('SUPPORT_URL=')) {
|
|
72
|
-
this.supportUrl = line.slice('SUPPORT_URL='.length).replaceAll('"', '');
|
|
73
|
-
}
|
|
74
|
-
else if (line.startsWith('BUG_REPORT_URL=')) {
|
|
75
|
-
this.bugReportUrl = line.slice('BUG_REPORT_URL='.length).replaceAll('"', '');
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* lsb_release -cs per codename (version)
|
|
81
|
-
* lsb_release -is per distribuzione
|
|
82
|
-
* lsb_release -rs per release
|
|
83
|
-
*/
|
|
84
|
-
this.codenameId = shell.exec('lsb_release -cs', { silent: true }).stdout.toString().trim();
|
|
85
|
-
this.releaseId = shell.exec('lsb_release -rs', { silent: true }).stdout.toString().trim();
|
|
86
|
-
this.distroId = shell.exec('lsb_release -is', { silent: true }).stdout.toString().trim();
|
|
87
|
-
/**
|
|
88
|
-
* releaseLike = releaseId
|
|
89
|
-
*/
|
|
90
|
-
this.releaseLike = this.releaseId;
|
|
91
|
-
/**
|
|
92
|
-
* Per casi equivoci conviene normalizzare codenameId
|
|
93
|
-
* -i, --id show distributor ID
|
|
94
|
-
* -r, --release show release number of this distribution
|
|
95
|
-
* -c, --codename show code name of this distribution
|
|
96
|
-
*/
|
|
97
|
-
if (this.distroId === 'Debian' && this.releaseId === 'unstable' && this.codenameId === 'sid') {
|
|
98
|
-
this.codenameId = 'trixie';
|
|
99
|
-
}
|
|
100
|
-
else if (this.distroId === 'Debian' && this.releaseId === 'testing/unstable') {
|
|
101
|
-
this.codenameId = 'trixie';
|
|
102
|
-
this.releaseLike = 'unstable';
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Analize distroId
|
|
106
|
-
*/
|
|
107
|
-
switch (this.distroId) {
|
|
108
|
-
case 'Alpine': {
|
|
109
|
-
this.familyId = 'alpine';
|
|
110
|
-
this.distroLike = 'Alpine';
|
|
111
|
-
this.codenameId = 'rolling'; // questo viene rimosso dal nome
|
|
112
|
-
this.codenameLikeId = 'alpine'; // prende alpine come codenaneLikeId
|
|
113
|
-
this.liveMediumPath = '/mnt/'; // Qua è deciso da noi
|
|
114
|
-
this.squashfs = `live/filesystem.squashfs`;
|
|
115
|
-
this.syslinuxPath = '/usr/share/syslinux/'; // correct
|
|
116
|
-
this.pxelinuxPath = this.syslinuxPath;
|
|
117
|
-
this.usrLibPath = '/usr/lib/';
|
|
118
|
-
this.memdiskPath = this.syslinuxPath;
|
|
119
|
-
this.isolinuxPath = this.syslinuxPath;
|
|
120
|
-
// At the moment
|
|
121
|
-
this.isCalamaresAvailable = false;
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
case 'Fedora': {
|
|
125
|
-
this.familyId = 'fedora';
|
|
126
|
-
this.distroLike = 'Fedora';
|
|
127
|
-
this.codenameId = 'rolling';
|
|
128
|
-
this.codenameLikeId = '40';
|
|
129
|
-
this.liveMediumPath = '/run/install/repo/'; // ? è il mount della root su cd di installatione
|
|
130
|
-
this.squashfs = `live/filesystem.squashfs`;
|
|
131
|
-
this.syslinuxPath = '/usr/share/syslinux/';
|
|
132
|
-
this.pxelinuxPath = this.syslinuxPath;
|
|
133
|
-
this.usrLibPath = '/usr/lib/';
|
|
134
|
-
this.memdiskPath = this.syslinuxPath;
|
|
135
|
-
this.isolinuxPath = this.syslinuxPath;
|
|
136
|
-
// At the moment
|
|
137
|
-
this.isCalamaresAvailable = false;
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
case 'openSUSE': {
|
|
141
|
-
this.familyId = 'suse';
|
|
142
|
-
this.distroLike = 'openSUSE';
|
|
143
|
-
this.codenameId = 'rolling';
|
|
144
|
-
this.codenameLikeId = 'Tumbleweed';
|
|
145
|
-
this.liveMediumPath = '/run/install/repo/'; // ? è il mount della root su cd di installatione
|
|
146
|
-
this.squashfs = `live/filesystem.squashfs`;
|
|
147
|
-
this.syslinuxPath = '/usr/share/syslinux/';
|
|
148
|
-
this.pxelinuxPath = this.syslinuxPath;
|
|
149
|
-
this.usrLibPath = '/usr/lib/';
|
|
150
|
-
this.memdiskPath = this.syslinuxPath;
|
|
151
|
-
this.isolinuxPath = this.syslinuxPath;
|
|
152
|
-
// At the moment
|
|
153
|
-
this.isCalamaresAvailable = false;
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
default: {
|
|
157
|
-
/**
|
|
158
|
-
* Arch/Debian/Devuan/Manjaro and Ubuntu
|
|
159
|
-
*/
|
|
160
|
-
switch (this.codenameId) {
|
|
161
|
-
case 'jessie': {
|
|
162
|
-
// Debian 8 jessie
|
|
163
|
-
this.distroLike = 'Debian';
|
|
164
|
-
this.codenameLikeId = 'jessie';
|
|
165
|
-
this.liveMediumPath = '/lib/live/mount/medium/';
|
|
166
|
-
this.isCalamaresAvailable = false;
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
case 'stretch': {
|
|
170
|
-
// Debian 9 stretch
|
|
171
|
-
this.distroLike = 'Debian';
|
|
172
|
-
this.codenameLikeId = 'stretch';
|
|
173
|
-
this.liveMediumPath = '/lib/live/mount/medium/';
|
|
174
|
-
this.isCalamaresAvailable = false;
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
case 'buster': {
|
|
178
|
-
// Debian 10 buster
|
|
179
|
-
this.distroLike = 'Debian';
|
|
180
|
-
this.codenameLikeId = 'buster';
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
case 'bullseye': {
|
|
184
|
-
// Debian 11 bullseye
|
|
185
|
-
this.distroLike = 'Debian';
|
|
186
|
-
this.codenameLikeId = 'bullseye';
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
case 'bookworm': {
|
|
190
|
-
// Debian 12 bookworm
|
|
191
|
-
this.distroLike = 'Debian';
|
|
192
|
-
this.codenameLikeId = 'bookworm';
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
case 'trixie': {
|
|
196
|
-
// Debian 13 trixie
|
|
197
|
-
this.distroLike = 'Debian';
|
|
198
|
-
this.codenameLikeId = 'trixie';
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
case 'beowulf': {
|
|
202
|
-
// Devuab 3 beowulf
|
|
203
|
-
this.distroLike = 'Devuan';
|
|
204
|
-
this.codenameLikeId = 'beowulf';
|
|
205
|
-
break;
|
|
206
|
-
}
|
|
207
|
-
case 'chimaera': {
|
|
208
|
-
// Devuab 4 chimaera
|
|
209
|
-
this.distroLike = 'Devuan';
|
|
210
|
-
this.codenameLikeId = 'chimaera';
|
|
211
|
-
break;
|
|
212
|
-
}
|
|
213
|
-
case 'daedalus': {
|
|
214
|
-
// Devuan 5 daedalus
|
|
215
|
-
this.distroLike = 'Devuan';
|
|
216
|
-
this.codenameLikeId = 'daedalus';
|
|
217
|
-
break;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Ubuntu LTS + actual
|
|
221
|
-
*/
|
|
222
|
-
case 'bionic': {
|
|
223
|
-
// Ubuntu 18.04 bionic LTS eol aprile 2023
|
|
224
|
-
this.distroLike = 'Ubuntu';
|
|
225
|
-
this.codenameLikeId = 'bionic';
|
|
226
|
-
this.liveMediumPath = '/lib/live/mount/medium/';
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
case 'focal': {
|
|
230
|
-
// Ubuntu 20.04 focal LTS
|
|
231
|
-
this.distroLike = 'Ubuntu';
|
|
232
|
-
this.codenameLikeId = 'focal';
|
|
233
|
-
break;
|
|
234
|
-
}
|
|
235
|
-
case 'jammy': {
|
|
236
|
-
// Ubuntu 22.04 jammy LTS
|
|
237
|
-
this.distroLike = 'Ubuntu';
|
|
238
|
-
this.codenameLikeId = 'jammy';
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
case 'noble': {
|
|
242
|
-
// Ubuntu 24.04 noble LTS
|
|
243
|
-
this.distroLike = 'Ubuntu';
|
|
244
|
-
this.codenameLikeId = 'noble';
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
case 'devel': {
|
|
248
|
-
// Ubuntu rhino
|
|
249
|
-
this.distroLike = 'Ubuntu';
|
|
250
|
-
this.codenameLikeId = 'devel';
|
|
251
|
-
break;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Arch Linux/Garuda
|
|
255
|
-
*/
|
|
256
|
-
case 'Spizaetus':
|
|
257
|
-
case 'n/a':
|
|
258
|
-
case 'rolling': {
|
|
259
|
-
this.familyId = 'archlinux';
|
|
260
|
-
this.distroLike = 'Arch';
|
|
261
|
-
this.codenameId = 'rolling';
|
|
262
|
-
this.codenameLikeId = 'rolling';
|
|
263
|
-
this.liveMediumPath = '/run/archiso/bootmnt/';
|
|
264
|
-
this.squashfs = `arch/x86_64/airootfs.sfs`;
|
|
265
|
-
break;
|
|
266
|
-
}
|
|
267
|
-
default: {
|
|
268
|
-
/**
|
|
269
|
-
* patch per Roy VERIFICARE
|
|
270
|
-
*/
|
|
271
|
-
let found = false;
|
|
272
|
-
let file = path.resolve(__dirname, '../../conf/derivatives.yaml');
|
|
273
|
-
if (fs.existsSync('/etc/penguins-eggs.d/derivatives.yaml')) {
|
|
274
|
-
file = '/etc/penguins-eggs.d/derivatives.yaml';
|
|
275
|
-
}
|
|
276
|
-
const content = fs.readFileSync(file, 'utf8');
|
|
277
|
-
const distros = yaml.load(content);
|
|
278
|
-
for (const distro of distros) {
|
|
279
|
-
if (distro.ids !== undefined) {
|
|
280
|
-
for (let n = 0; n < distro.ids.length; n++) {
|
|
281
|
-
if (this.codenameId === distro.ids[n]) {
|
|
282
|
-
found = true;
|
|
283
|
-
this.distroLike = distro.distroLike;
|
|
284
|
-
this.codenameLikeId = distro.id;
|
|
285
|
-
this.familyId = distro.family;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
if (!found) {
|
|
291
|
-
console.log(`This distro ${this.distroId}/${this.codenameId} is not yet recognized!`);
|
|
292
|
-
console.log('');
|
|
293
|
-
console.log('You can edit /usr/lib/penguins-eggs/conf/derivatives.yaml to add it -');
|
|
294
|
-
console.log('after that - run: sudo eggs dad -d to re-configure eggs.');
|
|
295
|
-
console.log('If you can create your new iso, you can contribute to the project');
|
|
296
|
-
console.log('by suggesting your modification.');
|
|
297
|
-
process.exit(0);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* setting paths: syslinux, isolinux, usrLibPath
|
|
303
|
-
*/
|
|
304
|
-
switch (this.familyId) {
|
|
305
|
-
case 'debian': {
|
|
306
|
-
this.isolinuxPath = '/usr/lib/ISOLINUX/';
|
|
307
|
-
this.syslinuxPath = '/usr/lib/syslinux/modules/bios/';
|
|
308
|
-
this.pxelinuxPath = '/usr/lib/PXELINUX/';
|
|
309
|
-
this.memdiskPath = '/usr/lib/syslinux/';
|
|
310
|
-
this.usrLibPath = '/usr/lib/' + Utils.usrLibPath();
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
313
|
-
case 'archlinux': {
|
|
314
|
-
this.syslinuxPath = '/usr/lib/syslinux/bios/';
|
|
315
|
-
this.pxelinuxPath = this.syslinuxPath;
|
|
316
|
-
this.usrLibPath = '/usr/lib/';
|
|
317
|
-
this.memdiskPath = this.syslinuxPath;
|
|
318
|
-
this.isolinuxPath = this.syslinuxPath;
|
|
319
|
-
break;
|
|
320
|
-
}
|
|
321
|
-
// No default
|
|
322
|
-
} // Fine analisi codenameId
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* if lsb-release exists
|
|
327
|
-
*/
|
|
328
|
-
const lsbConfig = '/etc/lsb-release';
|
|
329
|
-
if (fs.existsSync(lsbConfig)) {
|
|
330
|
-
this.distroId = Utils.searchOnFile(lsbConfig, `DISTRIB_ID`);
|
|
331
|
-
this.codenameId = Utils.searchOnFile(lsbConfig, `DISTRIB_CODENAME`);
|
|
332
|
-
// patch for BigLinux
|
|
333
|
-
if (this.distroId.toLowerCase().includes('biglinux')) {
|
|
334
|
-
this.distroId = 'biglinux';
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* ManjaroLinux and BigLinux
|
|
339
|
-
*/
|
|
340
|
-
if (this.distroId === 'ManjaroLinux' || this.distroId.toLowerCase().includes('biglinux')) {
|
|
341
|
-
this.liveMediumPath = '/run/miso/bootmnt/';
|
|
342
|
-
this.squashfs = 'manjaro/x86_64/livefs.sfs';
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
export default Distro;
|