penguins-eggs 10.1.0 → 10.1.1
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 -32
- package/README.md +109 -78
- package/conf/derivatives.yaml +3 -0
- package/conf/distros/buster/calamares/modules/users.yml +1 -0
- package/conf/distros/noble/calamares/modules/users.yml +1 -0
- package/dist/classes/bleach.d.ts +32 -0
- package/dist/classes/bleach.js +135 -0
- package/dist/classes/cli-autologin.d.ts +52 -0
- package/dist/classes/cli-autologin.js +247 -0
- package/dist/classes/compressors.d.ts +54 -0
- package/dist/classes/compressors.js +109 -0
- package/dist/classes/daddy.d.ts +26 -0
- package/dist/classes/daddy.js +167 -0
- package/dist/classes/distro.d.ts +56 -0
- package/dist/classes/distro.js +413 -0
- package/dist/classes/diversions.d.ts +52 -0
- package/dist/classes/diversions.js +126 -0
- package/dist/classes/incubation/branding.d.ts +17 -0
- package/dist/classes/incubation/branding.js +85 -0
- package/dist/classes/incubation/fisherman-helper/displaymanager.d.ts +11 -0
- package/dist/classes/incubation/fisherman-helper/displaymanager.js +40 -0
- package/dist/classes/incubation/fisherman-helper/packages.d.ts +20 -0
- package/dist/classes/incubation/fisherman-helper/packages.js +72 -0
- package/dist/classes/incubation/fisherman-helper/settings.d.ts +15 -0
- package/dist/classes/incubation/fisherman-helper/settings.js +83 -0
- package/dist/classes/incubation/fisherman.d.ts +70 -0
- package/dist/classes/incubation/fisherman.js +263 -0
- package/dist/classes/incubation/incubator.d/alpine.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/alpine.js +78 -0
- package/dist/classes/incubation/incubator.d/bionic.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/bionic.js +83 -0
- package/dist/classes/incubation/incubator.d/buster.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/buster.js +85 -0
- package/dist/classes/incubation/incubator.d/jessie.d.ts +31 -0
- package/dist/classes/incubation/incubator.d/jessie.js +44 -0
- package/dist/classes/incubation/incubator.d/noble.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/noble.js +85 -0
- package/dist/classes/incubation/incubator.d/openmamba.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/openmamba.js +81 -0
- package/dist/classes/incubation/incubator.d/opensuse.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/opensuse.js +81 -0
- package/dist/classes/incubation/incubator.d/rolling.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/rolling.js +80 -0
- package/dist/classes/incubation/incubator.d.ts +44 -0
- package/dist/classes/incubation/incubator.js +382 -0
- package/dist/classes/incubation/installer.d.ts +13 -0
- package/dist/classes/incubation/installer.js +52 -0
- package/dist/classes/keyboards.d.ts +50 -0
- package/dist/classes/keyboards.js +287 -0
- package/dist/classes/locales.d.ts +21 -0
- package/dist/classes/locales.js +77 -0
- package/dist/classes/network.d.ts +37 -0
- package/dist/classes/network.js +98 -0
- package/dist/classes/ovary.d/bind-live-fs.d.ts +18 -0
- package/dist/classes/ovary.d/bind-live-fs.js +177 -0
- package/dist/classes/ovary.d/bind-vfs.d.ts +17 -0
- package/dist/classes/ovary.d/bind-vfs.js +37 -0
- package/dist/classes/ovary.d/create-xdg-autostart.d.ts +13 -0
- package/dist/classes/ovary.d/create-xdg-autostart.js +194 -0
- package/dist/classes/ovary.d/edit-live-fs.d.ts +20 -0
- package/dist/classes/ovary.d/edit-live-fs.js +245 -0
- package/dist/classes/ovary.d/fertilization.d.ts +12 -0
- package/dist/classes/ovary.d/fertilization.js +51 -0
- package/dist/classes/ovary.d/finished.d.ts +13 -0
- package/dist/classes/ovary.d/finished.js +41 -0
- package/dist/classes/ovary.d/initrd.d.ts +21 -0
- package/dist/classes/ovary.d/initrd.js +68 -0
- package/dist/classes/ovary.d/kernel-copy.d.ts +12 -0
- package/dist/classes/ovary.d/kernel-copy.js +22 -0
- package/dist/classes/ovary.d/live-create-structure.d.ts +12 -0
- package/dist/classes/ovary.d/live-create-structure.js +90 -0
- package/dist/classes/ovary.d/make-dot-disk.d.ts +12 -0
- package/dist/classes/ovary.d/make-dot-disk.js +40 -0
- package/dist/classes/ovary.d/make-efi.d.ts +12 -0
- package/dist/classes/ovary.d/make-efi.js +271 -0
- package/dist/classes/ovary.d/make-iso.d.ts +13 -0
- package/dist/classes/ovary.d/make-iso.js +45 -0
- package/dist/classes/ovary.d/make-squashfs.d.ts +18 -0
- package/dist/classes/ovary.d/make-squashfs.js +110 -0
- package/dist/classes/ovary.d/merged.d.ts +27 -0
- package/dist/classes/ovary.d/merged.js +77 -0
- package/dist/classes/ovary.d/produce.d.ts +23 -0
- package/dist/classes/ovary.d/produce.js +293 -0
- package/dist/classes/ovary.d/rexec.d.ts +13 -0
- package/dist/classes/ovary.d/rexec.js +34 -0
- package/dist/classes/ovary.d/syslinux.d.ts +12 -0
- package/dist/classes/ovary.d/syslinux.js +79 -0
- package/dist/classes/ovary.d/user-create-live.d.ts +14 -0
- package/dist/classes/ovary.d/user-create-live.js +93 -0
- package/dist/classes/ovary.d/users-remove.d.ts +9 -0
- package/dist/classes/ovary.d/users-remove.js +38 -0
- package/dist/classes/ovary.d/xorriso-commend.d.ts +14 -0
- package/dist/classes/ovary.d/xorriso-commend.js +119 -0
- package/dist/classes/ovary.d.ts +82 -0
- package/dist/classes/ovary.js +86 -0
- package/dist/classes/pacman.d/aldos.d.ts +52 -0
- package/dist/classes/pacman.d/aldos.js +100 -0
- package/dist/classes/pacman.d/alpine.d.ts +56 -0
- package/dist/classes/pacman.d/alpine.js +162 -0
- package/dist/classes/pacman.d/archlinux.d.ts +62 -0
- package/dist/classes/pacman.d/archlinux.js +136 -0
- package/dist/classes/pacman.d/debian.d.ts +65 -0
- package/dist/classes/pacman.d/debian.js +143 -0
- package/dist/classes/pacman.d/fedora.d.ts +53 -0
- package/dist/classes/pacman.d/fedora.js +101 -0
- package/dist/classes/pacman.d/openmamba.d.ts +52 -0
- package/dist/classes/pacman.d/openmamba.js +100 -0
- package/dist/classes/pacman.d/opensuse.d.ts +53 -0
- package/dist/classes/pacman.d/opensuse.js +102 -0
- package/dist/classes/pacman.d/voidlinux.d.ts +52 -0
- package/dist/classes/pacman.d/voidlinux.js +90 -0
- package/dist/classes/pacman.d.ts +139 -0
- package/dist/classes/pacman.js +776 -0
- package/dist/classes/pve-live.d.ts +17 -0
- package/dist/classes/pve-live.js +52 -0
- package/dist/classes/pxe.d.ts +74 -0
- package/dist/classes/pxe.js +410 -0
- package/dist/classes/settings.d.ts +52 -0
- package/dist/classes/settings.js +185 -0
- package/dist/classes/sources_list.d.ts +28 -0
- package/dist/classes/sources_list.js +89 -0
- package/dist/classes/systemctl.d.ts +47 -0
- package/dist/classes/systemctl.js +86 -0
- package/dist/classes/tailor.d.ts +50 -0
- package/dist/classes/tailor.js +527 -0
- package/dist/classes/tools.d.ts +26 -0
- package/dist/classes/tools.js +50 -0
- package/dist/classes/users.d.ts +28 -0
- package/dist/classes/users.js +143 -0
- package/dist/classes/utils.d/architecture.d.ts +41 -0
- package/dist/classes/utils.d/architecture.js +87 -0
- package/dist/classes/utils.d/console-output.d.ts +26 -0
- package/dist/classes/utils.d/console-output.js +46 -0
- package/dist/classes/utils.d/filesystem.d.ts +53 -0
- package/dist/classes/utils.d/filesystem.js +152 -0
- package/dist/classes/utils.d/formatters.d.ts +32 -0
- package/dist/classes/utils.d/formatters.js +64 -0
- package/dist/classes/utils.d/kernel.d.ts +83 -0
- package/dist/classes/utils.d/kernel.js +288 -0
- package/dist/classes/utils.d/network.d.ts +43 -0
- package/dist/classes/utils.d/network.js +133 -0
- package/dist/classes/utils.d/package-info.d.ts +55 -0
- package/dist/classes/utils.d/package-info.js +137 -0
- package/dist/classes/utils.d/snapshot.d.ts +44 -0
- package/dist/classes/utils.d/snapshot.js +102 -0
- package/dist/classes/utils.d/system.d.ts +63 -0
- package/dist/classes/utils.d/system.js +200 -0
- package/dist/classes/utils.d/user-interaction.d.ts +39 -0
- package/dist/classes/utils.d/user-interaction.js +104 -0
- package/dist/classes/utils.d.ts +95 -0
- package/dist/classes/utils.js +111 -0
- package/dist/classes/xdg.d.ts +45 -0
- package/dist/classes/xdg.js +337 -0
- package/dist/classes/yolk.d.ts +33 -0
- package/dist/classes/yolk.js +114 -0
- package/dist/commands/adapt.d.ts +17 -0
- package/dist/commands/adapt.js +33 -0
- package/dist/commands/analyze.d.ts +26 -0
- package/dist/commands/analyze.js +95 -0
- package/dist/commands/calamares.d.ts +29 -0
- package/dist/commands/calamares.js +112 -0
- package/dist/commands/config.d.ts +35 -0
- package/dist/commands/config.js +120 -0
- package/dist/commands/cuckoo.d.ts +16 -0
- package/dist/commands/cuckoo.js +62 -0
- package/dist/commands/dad.d.ts +21 -0
- package/dist/commands/dad.js +47 -0
- package/dist/commands/export/iso.d.ts +19 -0
- package/dist/commands/export/iso.js +55 -0
- package/dist/commands/export/pkg.d.ts +29 -0
- package/dist/commands/export/pkg.js +163 -0
- package/dist/commands/export/tarballs.d.ts +27 -0
- package/dist/commands/export/tarballs.js +79 -0
- package/dist/commands/install.d.ts +38 -0
- package/dist/commands/install.js +91 -0
- package/dist/commands/kill.d.ts +24 -0
- package/dist/commands/kill.js +50 -0
- package/dist/commands/love.d.ts +21 -0
- package/dist/commands/love.js +73 -0
- package/dist/commands/mom.d.ts +16 -0
- package/dist/commands/mom.js +30 -0
- package/dist/commands/pods.d.ts +22 -0
- package/dist/commands/pods.js +92 -0
- package/dist/commands/produce.d.ts +35 -0
- package/dist/commands/produce.js +221 -0
- package/dist/commands/status.d.ts +23 -0
- package/dist/commands/status.js +31 -0
- package/dist/commands/syncfrom.d.ts +45 -0
- package/dist/commands/syncfrom.js +152 -0
- package/dist/commands/syncto.d.ts +40 -0
- package/dist/commands/syncto.js +175 -0
- package/dist/commands/tools/clean.d.ts +18 -0
- package/dist/commands/tools/clean.js +37 -0
- package/dist/commands/tools/ppa.d.ts +26 -0
- package/dist/commands/tools/ppa.js +138 -0
- package/dist/commands/tools/skel.d.ts +18 -0
- package/dist/commands/tools/skel.js +44 -0
- package/dist/commands/tools/stat.d.ts +31 -0
- package/dist/commands/tools/stat.js +70 -0
- package/dist/commands/tools/yolk.d.ts +24 -0
- package/dist/commands/tools/yolk.js +45 -0
- package/dist/commands/update.d.ts +51 -0
- package/dist/commands/update.js +219 -0
- package/dist/commands/wardrobe/get.d.ts +23 -0
- package/dist/commands/wardrobe/get.js +52 -0
- package/dist/commands/wardrobe/list.d.ts +24 -0
- package/dist/commands/wardrobe/list.js +125 -0
- package/dist/commands/wardrobe/show.d.ts +25 -0
- package/dist/commands/wardrobe/show.js +97 -0
- package/dist/commands/wardrobe/wear.d.ts +26 -0
- package/dist/commands/wardrobe/wear.js +84 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/index_old.d.ts +8 -0
- package/dist/index_old.js +8 -0
- package/dist/interfaces/i-addons.d.ts +12 -0
- package/dist/interfaces/i-addons.js +8 -0
- package/dist/interfaces/i-analyze.d.ts +17 -0
- package/dist/interfaces/i-analyze.js +17 -0
- package/dist/interfaces/i-app.d.ts +14 -0
- package/dist/interfaces/i-app.js +8 -0
- package/dist/interfaces/i-branding.d.ts +36 -0
- package/dist/interfaces/i-branding.js +8 -0
- package/dist/interfaces/i-calamares-displaymanager.d.ts +17 -0
- package/dist/interfaces/i-calamares-displaymanager.js +1 -0
- package/dist/interfaces/i-calamares-finished.d.ts +12 -0
- package/dist/interfaces/i-calamares-finished.js +1 -0
- package/dist/interfaces/i-calamares-packages.d.ts +28 -0
- package/dist/interfaces/i-calamares-packages.js +1 -0
- package/dist/interfaces/i-calamares-partition.d.ts +40 -0
- package/dist/interfaces/i-calamares-partition.js +1 -0
- package/dist/interfaces/i-config-tools.d.ts +15 -0
- package/dist/interfaces/i-config-tools.js +8 -0
- package/dist/interfaces/i-devices.d.ts +20 -0
- package/dist/interfaces/i-devices.js +8 -0
- package/dist/interfaces/i-distro.d.ts +23 -0
- package/dist/interfaces/i-distro.js +8 -0
- package/dist/interfaces/i-drive-list.d.ts +33 -0
- package/dist/interfaces/i-drive-list.js +8 -0
- package/dist/interfaces/i-eggs-config.d.ts +32 -0
- package/dist/interfaces/i-eggs-config.js +8 -0
- package/dist/interfaces/i-excludes.d.ts +14 -0
- package/dist/interfaces/i-excludes.js +8 -0
- package/dist/interfaces/i-exec.d.ts +11 -0
- package/dist/interfaces/i-exec.js +8 -0
- package/dist/interfaces/i-initrd.d.ts +13 -0
- package/dist/interfaces/i-initrd.js +8 -0
- package/dist/interfaces/i-install.d.ts +16 -0
- package/dist/interfaces/i-install.js +8 -0
- package/dist/interfaces/i-installer.d.ts +17 -0
- package/dist/interfaces/i-installer.js +8 -0
- package/dist/interfaces/i-luks-passphrase.d.ts +11 -0
- package/dist/interfaces/i-luks-passphrase.js +8 -0
- package/dist/interfaces/i-materia.d.ts +36 -0
- package/dist/interfaces/i-materia.js +8 -0
- package/dist/interfaces/i-net.d.ts +16 -0
- package/dist/interfaces/i-net.js +8 -0
- package/dist/interfaces/i-os-release.d.ts +5 -0
- package/dist/interfaces/i-os-release.js +1 -0
- package/dist/interfaces/i-packages.d.ts +16 -0
- package/dist/interfaces/i-packages.js +8 -0
- package/dist/interfaces/i-partitions.d.ts +16 -0
- package/dist/interfaces/i-partitions.js +8 -0
- package/dist/interfaces/i-pxe.d.ts +45 -0
- package/dist/interfaces/i-pxe.js +1 -0
- package/dist/interfaces/i-remix.d.ts +21 -0
- package/dist/interfaces/i-remix.js +8 -0
- package/dist/interfaces/i-settings.d.ts +33 -0
- package/dist/interfaces/i-settings.js +8 -0
- package/dist/interfaces/i-user.d.ts +14 -0
- package/dist/interfaces/i-user.js +8 -0
- package/dist/interfaces/i-workdir.d.ts +14 -0
- package/dist/interfaces/i-workdir.js +8 -0
- package/dist/interfaces/i-xkb-model.d.ts +24 -0
- package/dist/interfaces/i-xkb-model.js +8 -0
- package/dist/interfaces/index.d.ts +26 -0
- package/dist/interfaces/index.js +8 -0
- package/dist/krill/classes/cfs.d.ts +17 -0
- package/dist/krill/classes/cfs.js +39 -0
- package/dist/krill/classes/krill_enums.d.ts +37 -0
- package/dist/krill/classes/krill_enums.js +41 -0
- package/dist/krill/classes/prepare.d/confirm.d.ts +5 -0
- package/dist/krill/classes/prepare.d/confirm.js +30 -0
- package/dist/krill/classes/prepare.d/keyboard.d.ts +14 -0
- package/dist/krill/classes/prepare.d/keyboard.js +62 -0
- package/dist/krill/classes/prepare.d/location.d.ts +17 -0
- package/dist/krill/classes/prepare.d/location.js +59 -0
- package/dist/krill/classes/prepare.d/network.d.ts +14 -0
- package/dist/krill/classes/prepare.d/network.js +68 -0
- package/dist/krill/classes/prepare.d/partitions.d.ts +14 -0
- package/dist/krill/classes/prepare.d/partitions.js +86 -0
- package/dist/krill/classes/prepare.d/summary.d.ts +15 -0
- package/dist/krill/classes/prepare.d/summary.js +69 -0
- package/dist/krill/classes/prepare.d/users.d.ts +6 -0
- package/dist/krill/classes/prepare.d/users.js +63 -0
- package/dist/krill/classes/prepare.d/welcome.d.ts +6 -0
- package/dist/krill/classes/prepare.d/welcome.js +30 -0
- package/dist/krill/classes/prepare.d.ts +89 -0
- package/dist/krill/classes/prepare.js +314 -0
- package/dist/krill/classes/sequence.d/add_user.d.ts +20 -0
- package/dist/krill/classes/sequence.d/add_user.js +66 -0
- package/dist/krill/classes/sequence.d/bootloader.d.ts +14 -0
- package/dist/krill/classes/sequence.d/bootloader.js +95 -0
- package/dist/krill/classes/sequence.d/bootloader_config.d.ts +14 -0
- package/dist/krill/classes/sequence.d/bootloader_config.js +165 -0
- package/dist/krill/classes/sequence.d/change_password.d.ts +15 -0
- package/dist/krill/classes/sequence.d/change_password.js +18 -0
- package/dist/krill/classes/sequence.d/del_live_user.d.ts +14 -0
- package/dist/krill/classes/sequence.d/del_live_user.js +39 -0
- package/dist/krill/classes/sequence.d/fstab.d.ts +14 -0
- package/dist/krill/classes/sequence.d/fstab.js +189 -0
- package/dist/krill/classes/sequence.d/grubcfg.d.ts +17 -0
- package/dist/krill/classes/sequence.d/grubcfg.js +33 -0
- package/dist/krill/classes/sequence.d/hostname.d.ts +13 -0
- package/dist/krill/classes/sequence.d/hostname.js +50 -0
- package/dist/krill/classes/sequence.d/initramfs.d.ts +13 -0
- package/dist/krill/classes/sequence.d/initramfs.js +54 -0
- package/dist/krill/classes/sequence.d/initramfs_cfg.d.ts +14 -0
- package/dist/krill/classes/sequence.d/initramfs_cfg.js +35 -0
- package/dist/krill/classes/sequence.d/locale.d.ts +13 -0
- package/dist/krill/classes/sequence.d/locale.js +91 -0
- package/dist/krill/classes/sequence.d/locale_cfg.d.ts +10 -0
- package/dist/krill/classes/sequence.d/locale_cfg.js +58 -0
- package/dist/krill/classes/sequence.d/m_keyboard.d.ts +14 -0
- package/dist/krill/classes/sequence.d/m_keyboard.js +58 -0
- package/dist/krill/classes/sequence.d/machine_id.d.ts +15 -0
- package/dist/krill/classes/sequence.d/machine_id.js +33 -0
- package/dist/krill/classes/sequence.d/mkfs.d.ts +15 -0
- package/dist/krill/classes/sequence.d/mkfs.js +72 -0
- package/dist/krill/classes/sequence.d/mount_fs.d.ts +17 -0
- package/dist/krill/classes/sequence.d/mount_fs.js +68 -0
- package/dist/krill/classes/sequence.d/mount_vfs.d.ts +17 -0
- package/dist/krill/classes/sequence.d/mount_vfs.js +40 -0
- package/dist/krill/classes/sequence.d/network_cfg.d.ts +19 -0
- package/dist/krill/classes/sequence.d/network_cfg.js +73 -0
- package/dist/krill/classes/sequence.d/packages.d.ts +14 -0
- package/dist/krill/classes/sequence.d/packages.js +111 -0
- package/dist/krill/classes/sequence.d/partition.d/bios_luks.d.ts +17 -0
- package/dist/krill/classes/sequence.d/partition.d/bios_luks.js +73 -0
- package/dist/krill/classes/sequence.d/partition.d/bios_standard.d.ts +17 -0
- package/dist/krill/classes/sequence.d/partition.d/bios_standard.js +36 -0
- package/dist/krill/classes/sequence.d/partition.d/uefi_luks.d.ts +17 -0
- package/dist/krill/classes/sequence.d/partition.d/uefi_luks.js +78 -0
- package/dist/krill/classes/sequence.d/partition.d/uefi_standard.d.ts +10 -0
- package/dist/krill/classes/sequence.d/partition.d/uefi_standard.js +32 -0
- package/dist/krill/classes/sequence.d/partition.d.ts +14 -0
- package/dist/krill/classes/sequence.d/partition.js +84 -0
- package/dist/krill/classes/sequence.d/remove_installer_link.d.ts +13 -0
- package/dist/krill/classes/sequence.d/remove_installer_link.js +35 -0
- package/dist/krill/classes/sequence.d/umount.d.ts +14 -0
- package/dist/krill/classes/sequence.d/umount.js +28 -0
- package/dist/krill/classes/sequence.d/unpackfs.d.ts +13 -0
- package/dist/krill/classes/sequence.d/unpackfs.js +20 -0
- package/dist/krill/classes/sequence.d.ts +133 -0
- package/dist/krill/classes/sequence.js +396 -0
- package/dist/krill/components/finished.d.ts +16 -0
- package/dist/krill/components/finished.js +56 -0
- package/dist/krill/components/information.d.ts +8 -0
- package/dist/krill/components/information.js +162 -0
- package/dist/krill/components/install.d.ts +15 -0
- package/dist/krill/components/install.js +60 -0
- package/dist/krill/components/keyboard.d.ts +16 -0
- package/dist/krill/components/keyboard.js +54 -0
- package/dist/krill/components/location.d.ts +16 -0
- package/dist/krill/components/location.js +59 -0
- package/dist/krill/components/network.d.ts +19 -0
- package/dist/krill/components/network.js +65 -0
- package/dist/krill/components/partitions.d.ts +18 -0
- package/dist/krill/components/partitions.js +89 -0
- package/dist/krill/components/steps.d.ts +13 -0
- package/dist/krill/components/steps.js +148 -0
- package/dist/krill/components/summary.d.ts +25 -0
- package/dist/krill/components/summary.js +77 -0
- package/dist/krill/components/title.d.ts +11 -0
- package/dist/krill/components/title.js +35 -0
- package/dist/krill/components/users.d.ts +24 -0
- package/dist/krill/components/users.js +80 -0
- package/dist/krill/components/welcome.d.ts +13 -0
- package/dist/krill/components/welcome.js +63 -0
- package/dist/krill/interfaces/i_krill.d.ts +44 -0
- package/dist/krill/interfaces/i_krill.js +8 -0
- package/dist/krill/interfaces/i_krill_config.d.ts +35 -0
- package/dist/krill/interfaces/i_krill_config.js +8 -0
- package/dist/krill/lib/get_address.d.ts +8 -0
- package/dist/krill/lib/get_address.js +23 -0
- package/dist/krill/lib/get_dns.d.ts +8 -0
- package/dist/krill/lib/get_dns.js +23 -0
- package/dist/krill/lib/get_domain.d.ts +8 -0
- package/dist/krill/lib/get_domain.js +23 -0
- package/dist/krill/lib/get_gateway.d.ts +8 -0
- package/dist/krill/lib/get_gateway.js +23 -0
- package/dist/krill/lib/get_hostname.d.ts +8 -0
- package/dist/krill/lib/get_hostname.js +23 -0
- package/dist/krill/lib/get_luks_passphrase.d.ts +8 -0
- package/dist/krill/lib/get_luks_passphrase.js +40 -0
- package/dist/krill/lib/get_netmask.d.ts +8 -0
- package/dist/krill/lib/get_netmask.js +23 -0
- package/dist/krill/lib/get_password.d.ts +8 -0
- package/dist/krill/lib/get_password.js +36 -0
- package/dist/krill/lib/get_userfullname.d.ts +8 -0
- package/dist/krill/lib/get_userfullname.js +23 -0
- package/dist/krill/lib/get_username.d.ts +8 -0
- package/dist/krill/lib/get_username.js +23 -0
- package/dist/krill/lib/select_address_type.d.ts +8 -0
- package/dist/krill/lib/select_address_type.js +24 -0
- package/dist/krill/lib/select_filesystem_type.d.ts +8 -0
- package/dist/krill/lib/select_filesystem_type.js +39 -0
- package/dist/krill/lib/select_installation_device.d.ts +8 -0
- package/dist/krill/lib/select_installation_device.js +40 -0
- package/dist/krill/lib/select_installation_mode.d.ts +9 -0
- package/dist/krill/lib/select_installation_mode.js +25 -0
- package/dist/krill/lib/select_interface.d.ts +8 -0
- package/dist/krill/lib/select_interface.js +24 -0
- package/dist/krill/lib/select_keyboard_layout.d.ts +11 -0
- package/dist/krill/lib/select_keyboard_layout.js +36 -0
- package/dist/krill/lib/select_keyboard_model.d.ts +11 -0
- package/dist/krill/lib/select_keyboard_model.js +34 -0
- package/dist/krill/lib/select_keyboard_option.d.ts +11 -0
- package/dist/krill/lib/select_keyboard_option.js +34 -0
- package/dist/krill/lib/select_keyboard_variant.d.ts +11 -0
- package/dist/krill/lib/select_keyboard_variant.js +35 -0
- package/dist/krill/lib/select_languages.d.ts +8 -0
- package/dist/krill/lib/select_languages.js +28 -0
- package/dist/krill/lib/select_regions.d.ts +8 -0
- package/dist/krill/lib/select_regions.js +24 -0
- package/dist/krill/lib/select_replaced_partition.d.ts +8 -0
- package/dist/krill/lib/select_replaced_partition.js +31 -0
- package/dist/krill/lib/select_user_swap_choice.d.ts +9 -0
- package/dist/krill/lib/select_user_swap_choice.js +35 -0
- package/dist/krill/lib/select_zones.d.ts +8 -0
- package/dist/krill/lib/select_zones.js +518 -0
- package/dist/lib/kill_me_softly.d.ts +11 -0
- package/dist/lib/kill_me_softly.js +61 -0
- package/dist/lib/utils.d.ts +42 -0
- package/dist/lib/utils.js +87 -0
- package/dist/penguins-eggs_10.1.1-0_amd64.deb +0 -0
- package/dist/penguins-eggs_10.1.1-0_amd64.deb.sha256 +1 -0
- package/package.json +25 -23
- package/scripts/_eggs +6 -12
- package/scripts/eggs.bash +1 -2
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/syncfrom.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 { Command, Flags } from '@oclif/core';
|
|
9
|
+
import fs from 'node:fs';
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
import Distro from '../classes/distro.js';
|
|
12
|
+
import Utils from '../classes/utils.js';
|
|
13
|
+
import { exec } from '../lib/utils.js';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export default class Syncfrom extends Command {
|
|
18
|
+
static description = 'restore users and user data from a LUKS volumes';
|
|
19
|
+
static examples = ['sudo eggs syncfrom', 'sudo eggs syncfrom --file /path/to/luks-volume'];
|
|
20
|
+
static flags = {
|
|
21
|
+
delete: Flags.string({ description: 'rsync --delete delete extraneous files from dest dirs' }),
|
|
22
|
+
file: Flags.string({ char: 'f', description: 'file containing luks-volume encrypted' }),
|
|
23
|
+
help: Flags.help({ char: 'h' }),
|
|
24
|
+
rootdir: Flags.string({ char: 'r', description: 'rootdir of the installed system, when used from live' }),
|
|
25
|
+
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
26
|
+
};
|
|
27
|
+
echo = {};
|
|
28
|
+
luksName = 'luks-volume';
|
|
29
|
+
luksDevice = `/dev/mapper/${this.luksName}`;
|
|
30
|
+
luksFile = '';
|
|
31
|
+
luksMountpoint = `/tmp/mnt/${this.luksName}`;
|
|
32
|
+
remix = {};
|
|
33
|
+
rootDir = '/';
|
|
34
|
+
verbose = false;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
async luksClose() {
|
|
39
|
+
if (Utils.isMountpoint(this.luksMountpoint)) {
|
|
40
|
+
await exec(`umount ${this.luksMountpoint}`, this.echo);
|
|
41
|
+
}
|
|
42
|
+
if (fs.existsSync(this.luksDevice)) {
|
|
43
|
+
Utils.warning(`LUKS close volume: ${this.luksName}`);
|
|
44
|
+
await exec(`cryptsetup luksClose ${this.luksName}`, this.echo);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
async luksOpen() {
|
|
51
|
+
if (fs.existsSync(this.luksDevice)) {
|
|
52
|
+
Utils.warning(`LUKS volume: ${this.luksName} already open`);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
Utils.warning(`LUKS open volume: ${this.luksName}`);
|
|
56
|
+
await exec(`cryptsetup luksOpen --type luks2 ${this.luksFile} ${this.luksName}`, Utils.setEcho(true));
|
|
57
|
+
}
|
|
58
|
+
if (!fs.existsSync(this.luksMountpoint)) {
|
|
59
|
+
await exec(`mkdir -p ${this.luksMountpoint}`, this.echo);
|
|
60
|
+
}
|
|
61
|
+
if (Utils.isMountpoint(this.luksMountpoint)) {
|
|
62
|
+
Utils.warning(`mount volume: ${this.luksDevice} already mounted on ${this.luksMountpoint}`);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
Utils.warning(`mount volume: ${this.luksDevice} on ${this.luksMountpoint}`);
|
|
66
|
+
await exec(`mount ${this.luksDevice} ${this.luksMountpoint}`, this.echo);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async run() {
|
|
70
|
+
const { flags } = await this.parse(Syncfrom);
|
|
71
|
+
if (flags.verbose) {
|
|
72
|
+
this.verbose = true;
|
|
73
|
+
}
|
|
74
|
+
this.echo = Utils.setEcho(this.verbose);
|
|
75
|
+
let fileVolume = '';
|
|
76
|
+
if (flags.file) {
|
|
77
|
+
fileVolume = flags.file;
|
|
78
|
+
}
|
|
79
|
+
let destDelete = false;
|
|
80
|
+
if (flags.delete) {
|
|
81
|
+
destDelete = true;
|
|
82
|
+
}
|
|
83
|
+
if (Utils.isLive()) {
|
|
84
|
+
if (flags.rootdir) {
|
|
85
|
+
this.rootDir = flags.rootdir;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
Utils.pressKeyToExit('Argument --rootdir is mandatory, when running live! Process will terminate');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (Utils.isRoot()) {
|
|
92
|
+
if (fileVolume === '') {
|
|
93
|
+
const distro = new Distro();
|
|
94
|
+
fileVolume = `${distro.liveMediumPath}live/${this.luksName}`;
|
|
95
|
+
}
|
|
96
|
+
if (Utils.isLive()) {
|
|
97
|
+
/**
|
|
98
|
+
* WORKING FROM LIVE
|
|
99
|
+
*/
|
|
100
|
+
this.luksName = path.basename(fileVolume);
|
|
101
|
+
this.luksFile = fileVolume;
|
|
102
|
+
this.luksDevice = `/dev/mapper/${this.luksName}`;
|
|
103
|
+
this.luksMountpoint = `/tmp/${this.luksName}`;
|
|
104
|
+
await this.restorePrivateData();
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
/**
|
|
108
|
+
* WORKING FROM INSTALLED
|
|
109
|
+
*/
|
|
110
|
+
if (fs.existsSync(fileVolume)) {
|
|
111
|
+
this.luksName = path.basename(fileVolume);
|
|
112
|
+
this.luksFile = fileVolume;
|
|
113
|
+
this.luksDevice = `/dev/mapper/${this.luksName}`;
|
|
114
|
+
this.luksMountpoint = `/tmp/${this.luksName}`;
|
|
115
|
+
await this.restorePrivateData();
|
|
116
|
+
if (await Utils.customConfirm('Your system was updated! Press a key to reboot')) {
|
|
117
|
+
await exec('reboot');
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
Utils.pressKeyToExit(`Can't find ${this.luksFile}`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
Utils.useRoot(this.id);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @param verbose
|
|
132
|
+
*/
|
|
133
|
+
async restorePrivateData(destDelete = false) {
|
|
134
|
+
if (!fs.existsSync(this.luksMountpoint)) {
|
|
135
|
+
await exec(`mkdir ${this.luksMountpoint}`, this.echo);
|
|
136
|
+
}
|
|
137
|
+
await this.luksOpen();
|
|
138
|
+
if (Utils.isLive() && this.rootDir !== '/') {
|
|
139
|
+
Utils.warning('Restoring crypted data');
|
|
140
|
+
// Rimozione dei file esistenti
|
|
141
|
+
await exec(`rm -rf ${this.rootDir}/etc/lightdm/lightdm.conf`, this.echo);
|
|
142
|
+
await exec(`rm -rf ${this.rootDir}/etc/passwd`, this.echo);
|
|
143
|
+
await exec(`rm -rf ${this.rootDir}/etc/group`, this.echo);
|
|
144
|
+
await exec(`rm -rf ${this.rootDir}/etc/shadow`, this.echo);
|
|
145
|
+
await exec(`rm -rf ${this.rootDir}/home/*`, this.echo);
|
|
146
|
+
// unsquashfs
|
|
147
|
+
const cmd = `unsquashfs -d ${this.rootDir} -f ${this.luksMountpoint}/private.squashfs`;
|
|
148
|
+
await exec(cmd, Utils.setEcho(true));
|
|
149
|
+
}
|
|
150
|
+
await this.luksClose();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/syncto.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 { Command } from '@oclif/core';
|
|
9
|
+
import Settings from '../classes/settings.js';
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export default class Syncto extends Command {
|
|
14
|
+
static description: string;
|
|
15
|
+
static examples: string[];
|
|
16
|
+
static flags: {
|
|
17
|
+
excludes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
20
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
};
|
|
22
|
+
echo: {};
|
|
23
|
+
exclude: boolean;
|
|
24
|
+
excludeHome: string;
|
|
25
|
+
luksName: string;
|
|
26
|
+
luksDevice: string;
|
|
27
|
+
luksFile: string;
|
|
28
|
+
luksMountpoint: string;
|
|
29
|
+
privateSquashfs: string;
|
|
30
|
+
settings: Settings;
|
|
31
|
+
verbose: boolean;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
luksCreate(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
run(): Promise<void>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/syncto.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
|
+
// https://gist.github.com/ansemjo/6f1cf9d9b8f7ce8f70813f52c63b74a6
|
|
9
|
+
import { Command, Flags } from '@oclif/core';
|
|
10
|
+
import fs from 'node:fs';
|
|
11
|
+
import Compressors from '../classes/compressors.js';
|
|
12
|
+
import Settings from '../classes/settings.js';
|
|
13
|
+
import Utils from '../classes/utils.js';
|
|
14
|
+
import { exec } from '../lib/utils.js';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export default class Syncto extends Command {
|
|
19
|
+
static description = "Save users and users' data ENCRYPTED";
|
|
20
|
+
static examples = ['sudo eggs syncto', 'sudo eggs syncto --file /path/to/luks-volume', 'sudo eggs syncto --excludes'];
|
|
21
|
+
static flags = {
|
|
22
|
+
excludes: Flags.boolean({ char: 'e', description: 'use: exclude.list.d/home.list' }),
|
|
23
|
+
file: Flags.string({ char: 'f', description: 'file luks-volume encrypted' }),
|
|
24
|
+
help: Flags.help({ char: 'h' }),
|
|
25
|
+
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
26
|
+
};
|
|
27
|
+
echo = {};
|
|
28
|
+
exclude = false;
|
|
29
|
+
excludeHome = '/etc/penguins-eggs.d/exclude.list.d/home.list';
|
|
30
|
+
luksName = 'luks-volume';
|
|
31
|
+
luksDevice = `/dev/mapper/${this.luksName}`;
|
|
32
|
+
luksFile = `/tmp/${this.luksName}`;
|
|
33
|
+
luksMountpoint = `/tmp/mnt/${this.luksName}`;
|
|
34
|
+
privateSquashfs = `private.squashfs`;
|
|
35
|
+
settings = {};
|
|
36
|
+
verbose = false;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
async luksCreate() {
|
|
41
|
+
await exec(`rm -rf ${this.luksFile}`);
|
|
42
|
+
// ==========================================================================
|
|
43
|
+
// Create squashfs
|
|
44
|
+
// ==========================================================================
|
|
45
|
+
Utils.warning(`Creating private.squashfs`);
|
|
46
|
+
const compressors = new Compressors();
|
|
47
|
+
await compressors.populate();
|
|
48
|
+
// comp
|
|
49
|
+
let comp = '';
|
|
50
|
+
this.settings = new Settings();
|
|
51
|
+
if (await this.settings.load()) {
|
|
52
|
+
let compression = compressors.fast();
|
|
53
|
+
if (this.settings.config.compression == `max`) {
|
|
54
|
+
compression = compressors.max();
|
|
55
|
+
}
|
|
56
|
+
else if (this.settings.config.compression == `standard`) {
|
|
57
|
+
compression = compressors.standard();
|
|
58
|
+
}
|
|
59
|
+
comp = `-comp ${compression}`;
|
|
60
|
+
}
|
|
61
|
+
// exclude /home/eggs
|
|
62
|
+
let exclude_nest = '';
|
|
63
|
+
if (fs.existsSync(this.settings.work_dir.workdir)) {
|
|
64
|
+
exclude_nest = `-e ${this.settings.config.snapshot_dir}`;
|
|
65
|
+
}
|
|
66
|
+
// exclude file
|
|
67
|
+
let exclude_home = '';
|
|
68
|
+
if (this.exclude) {
|
|
69
|
+
exclude_home = `-ef ${this.excludeHome}`;
|
|
70
|
+
}
|
|
71
|
+
// creato dummyfs per /etc/
|
|
72
|
+
await exec(`mkdir -p /tmp/dummyfs/etc`, this.echo);
|
|
73
|
+
await exec(`cp -a /etc/passwd /tmp/dummyfs/etc`, this.echo);
|
|
74
|
+
await exec(`cp -a /etc/group /tmp/dummyfs/etc`, this.echo);
|
|
75
|
+
await exec(`cp -a /etc/shadow /tmp/dummyfs/etc`, this.echo);
|
|
76
|
+
await exec(`mkdir -p /tmp/dummyfs/etc/lightdm`, this.echo); // lightdm
|
|
77
|
+
await exec(`cp -a /etc/lightdm/lightdm.conf /tmp/dummyfs/etc/lightdm/`, this.echo); // lightdm
|
|
78
|
+
let mkPrivateSquashfs = `mksquashfs \
|
|
79
|
+
/tmp/dummyfs/etc \
|
|
80
|
+
/home \
|
|
81
|
+
/tmp/${this.privateSquashfs} \
|
|
82
|
+
${comp} \
|
|
83
|
+
${exclude_nest} \
|
|
84
|
+
${exclude_home} \
|
|
85
|
+
-keep-as-directory \
|
|
86
|
+
-noappend`;
|
|
87
|
+
mkPrivateSquashfs = mkPrivateSquashfs.replaceAll(/\s\s+/g, ` `);
|
|
88
|
+
await exec(mkPrivateSquashfs, Utils.setEcho(true));
|
|
89
|
+
// remove dummyfs
|
|
90
|
+
await exec(`rm /tmp/dummyfs/ -rf`, this.echo);
|
|
91
|
+
// ==========================================================================
|
|
92
|
+
// Create LUKS volume
|
|
93
|
+
// ==========================================================================
|
|
94
|
+
Utils.titles('Creating LUKS Volume');
|
|
95
|
+
// calcolo size
|
|
96
|
+
const sizeString = (await exec(`unsquashfs -s /tmp/${this.privateSquashfs} | grep "Filesystem size" | sed -e 's/.*size //' -e 's/ .*//'`, { capture: true, echo: false })).data;
|
|
97
|
+
let size = Number.parseInt(sizeString) + 2048;
|
|
98
|
+
console.log('size private.squashfs:', bytesToGB(size), size);
|
|
99
|
+
const luksBlockSize = 512;
|
|
100
|
+
const luksBlocks = Math.ceil(size / luksBlockSize);
|
|
101
|
+
size = luksBlockSize * luksBlocks;
|
|
102
|
+
// Aggiungo un 20% in più per ottenere luksSize
|
|
103
|
+
const luksSize = Math.ceil(size * 1.2);
|
|
104
|
+
console.log('luksSize:', bytesToGB(luksSize), luksSize);
|
|
105
|
+
// truncate * 2048 è cruciale
|
|
106
|
+
const truncateAt = luksSize * 2048;
|
|
107
|
+
Utils.warning(`Preparing file ${this.luksFile} for ${this.luksDevice}, size ${truncateAt}`);
|
|
108
|
+
await exec(`truncate --size ${luksSize} ${this.luksFile}`, this.echo);
|
|
109
|
+
Utils.warning(`Creating LUKS Volume on ${this.luksFile}`);
|
|
110
|
+
await exec(`cryptsetup --batch-mode luksFormat ${this.luksFile}`, Utils.setEcho(true));
|
|
111
|
+
console.log('');
|
|
112
|
+
// open LUKS volume temp
|
|
113
|
+
Utils.warning(`Opening LUKS Volume on ${this.luksFile}`);
|
|
114
|
+
const { code } = await exec(`cryptsetup luksOpen ${this.luksFile} ${this.luksName}`, Utils.setEcho(true));
|
|
115
|
+
if (code != 0) {
|
|
116
|
+
Utils.error(`cryptsetup luksOpen ${this.luksFile} ${this.luksName} failed`);
|
|
117
|
+
process.exit(code);
|
|
118
|
+
}
|
|
119
|
+
await exec('udevadm settle', this.echo);
|
|
120
|
+
// formatta ext4 il volume
|
|
121
|
+
await exec(`mkfs.ext4 ${this.luksDevice}`, this.echo);
|
|
122
|
+
console.log('');
|
|
123
|
+
// mount LUKS volume
|
|
124
|
+
if (!fs.existsSync(`this.luksMountpoint)`)) {
|
|
125
|
+
Utils.warning(`creating mountpoint ${this.luksMountpoint}`);
|
|
126
|
+
await exec(`mkdir -p ${this.luksMountpoint}`, this.echo);
|
|
127
|
+
}
|
|
128
|
+
if (!Utils.isMountpoint(`${this.luksMountpoint}`)) {
|
|
129
|
+
Utils.warning(`mounting volume: ${this.luksDevice} on ${this.luksMountpoint}`);
|
|
130
|
+
const { code } = await exec(`mount ${this.luksDevice} ${this.luksMountpoint}`, Utils.setEcho(true));
|
|
131
|
+
if (code != 0) {
|
|
132
|
+
Utils.error(`mount ${this.luksDevice} ${this.luksMountpoint} failed`);
|
|
133
|
+
process.exit(code);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// copy private.squashfs
|
|
137
|
+
Utils.warning(`moving /tmp/${this.privateSquashfs} to ${this.luksMountpoint}`);
|
|
138
|
+
await exec(`mv /tmp/${this.privateSquashfs} ${this.luksMountpoint}`, this.echo);
|
|
139
|
+
Utils.warning(`Umounting ${this.luksMountpoint}`);
|
|
140
|
+
await exec(`umount ${this.luksMountpoint}`, this.echo);
|
|
141
|
+
Utils.warning(`Vlosing ${this.luksMountpoint}`);
|
|
142
|
+
await exec(`cryptsetup luksClose ${this.luksName}`, this.echo);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
*
|
|
146
|
+
*/
|
|
147
|
+
async run() {
|
|
148
|
+
Utils.titles(this.id + ' ' + this.argv);
|
|
149
|
+
const { flags } = await this.parse(Syncto);
|
|
150
|
+
if (flags.verbose) {
|
|
151
|
+
this.verbose = true;
|
|
152
|
+
}
|
|
153
|
+
this.echo = Utils.setEcho(this.verbose);
|
|
154
|
+
let fileLuks = '';
|
|
155
|
+
if (flags.file) {
|
|
156
|
+
fileLuks = flags.file;
|
|
157
|
+
}
|
|
158
|
+
if (flags.excludes) {
|
|
159
|
+
this.exclude = true;
|
|
160
|
+
}
|
|
161
|
+
if (Utils.isRoot()) {
|
|
162
|
+
await this.luksCreate();
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
Utils.useRoot(this.id);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Convert bytes to gigabytes
|
|
171
|
+
*/
|
|
172
|
+
function bytesToGB(bytes) {
|
|
173
|
+
const gigabytes = bytes / 1_073_741_824;
|
|
174
|
+
return gigabytes.toFixed(2) + ' GB';
|
|
175
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/tools/clean.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 { Command } from '@oclif/core';
|
|
9
|
+
export default class Clean extends Command {
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
12
|
+
static flags: {
|
|
13
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
14
|
+
nointeractive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/tools/clean.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 { Command, Flags } from '@oclif/core';
|
|
9
|
+
import Bleach from '../../classes/bleach.js';
|
|
10
|
+
import Utils from '../../classes/utils.js';
|
|
11
|
+
export default class Clean extends Command {
|
|
12
|
+
static description = 'clean system log, apt, etc';
|
|
13
|
+
static examples = ['sudo eggs tools clean'];
|
|
14
|
+
static flags = {
|
|
15
|
+
help: Flags.help({ char: 'h' }),
|
|
16
|
+
nointeractive: Flags.boolean({ char: 'n', description: 'no user interaction' }),
|
|
17
|
+
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
const { flags } = await this.parse(Clean);
|
|
21
|
+
Utils.titles(this.id + ' ' + this.argv);
|
|
22
|
+
let verbose = false;
|
|
23
|
+
if (flags.verbose) {
|
|
24
|
+
verbose = true;
|
|
25
|
+
}
|
|
26
|
+
const { nointeractive } = flags;
|
|
27
|
+
if (Utils.isRoot()) {
|
|
28
|
+
if (nointeractive || (await Utils.customConfirm('Select yes to continue...'))) {
|
|
29
|
+
const bleach = new Bleach();
|
|
30
|
+
bleach.clean(verbose);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
Utils.useRoot(this.id);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/tools/ppa.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 { Command } from '@oclif/core';
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
export default class Ppa extends Command {
|
|
13
|
+
static description: string;
|
|
14
|
+
static examples: string[];
|
|
15
|
+
static flags: {
|
|
16
|
+
add: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
18
|
+
nointeractive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
remove: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
run(): Promise<void>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/tools/ppa.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 { Command, Flags } from '@oclif/core';
|
|
9
|
+
import fs from 'node:fs';
|
|
10
|
+
import Distro from '../../classes/distro.js';
|
|
11
|
+
import Utils from '../../classes/utils.js';
|
|
12
|
+
import { exec } from '../../lib/utils.js';
|
|
13
|
+
const fkey = '/etc/apt/trusted.gpg.d/penguins-eggs-key.gpg';
|
|
14
|
+
const flist = '/etc/apt/sources.list.d/penguins-eggs-ppa.list';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export default class Ppa extends Command {
|
|
19
|
+
static description = 'add/remove repo';
|
|
20
|
+
static examples = ['sudo eggs tools ppa --add', 'sudo eggs tools ppa --remove'];
|
|
21
|
+
static flags = {
|
|
22
|
+
add: Flags.boolean({ char: 'a', description: 'add penguins-eggs PPA repository' }),
|
|
23
|
+
help: Flags.help({ char: 'h' }),
|
|
24
|
+
nointeractive: Flags.boolean({ char: 'n', description: 'no user interaction' }),
|
|
25
|
+
remove: Flags.boolean({ char: 'r', description: 'remove penguins-eggs PPA repository' }),
|
|
26
|
+
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
async run() {
|
|
32
|
+
const { flags } = await this.parse(Ppa);
|
|
33
|
+
Utils.titles(this.id + ' ' + this.argv);
|
|
34
|
+
let verbose = false;
|
|
35
|
+
if (flags.verbose) {
|
|
36
|
+
verbose = true;
|
|
37
|
+
}
|
|
38
|
+
const { nointeractive } = flags;
|
|
39
|
+
if (Utils.isRoot()) {
|
|
40
|
+
const distro = new Distro();
|
|
41
|
+
/**
|
|
42
|
+
* Debian
|
|
43
|
+
*/
|
|
44
|
+
if (distro.familyId === 'debian') {
|
|
45
|
+
if (flags.add) {
|
|
46
|
+
Utils.warning(`Are you sure to add ${flist} to your repositories?`);
|
|
47
|
+
if (nointeractive || (await Utils.customConfirm('Select yes to continue...'))) {
|
|
48
|
+
await debianAdd();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else if (flags.remove) {
|
|
52
|
+
Utils.warning(`Are you sure to remove ${flist} to your repositories?`);
|
|
53
|
+
if (nointeractive || (await Utils.customConfirm('Select yes to continue...'))) {
|
|
54
|
+
await debianRemove();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* archlinux
|
|
59
|
+
*/
|
|
60
|
+
}
|
|
61
|
+
if (distro.familyId === 'archlinux') {
|
|
62
|
+
if (flags.add) {
|
|
63
|
+
if (distro.distroId !== 'Manjarolinux') {
|
|
64
|
+
Utils.warning(`Are you sure to add chaotic-aur to your repositories?`);
|
|
65
|
+
if (await Utils.customConfirm('Select yes to continue...')) {
|
|
66
|
+
await archAdd();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else if (flags.remove) {
|
|
71
|
+
await archRemove();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
/**
|
|
76
|
+
* Others
|
|
77
|
+
*/
|
|
78
|
+
Utils.warning(`Distro> ${distro.distroId}/${distro.codenameId}, cannot use this command here!`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* archAdd
|
|
85
|
+
*/
|
|
86
|
+
async function archAdd() {
|
|
87
|
+
const path = '/var/cache/pacman/pkg/';
|
|
88
|
+
const keyring = 'chaotic-keyring.pkg.tar.zst';
|
|
89
|
+
const mirrorlist = 'chaotic-mirrorlist.pkg.tar.zst';
|
|
90
|
+
const echo = Utils.setEcho(true);
|
|
91
|
+
if (fs.existsSync(path + keyring) && fs.existsSync(path + mirrorlist)) {
|
|
92
|
+
console.log('repository chaotic-aur, already present!');
|
|
93
|
+
await archRemove();
|
|
94
|
+
process.exit();
|
|
95
|
+
}
|
|
96
|
+
await exec('pacman-key --recv-key FBA220DFC880C036 --keyserver keyserver.ubuntu.com', echo);
|
|
97
|
+
await exec('pacman-key --lsign-key FBA220DFC880C036', echo);
|
|
98
|
+
await exec("pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'", echo);
|
|
99
|
+
// Append to /etc/pacman.conf
|
|
100
|
+
const chaoticAppend = '\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist\n\n';
|
|
101
|
+
fs.appendFileSync('/etc/pacman.conf', chaoticAppend);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* archRemove
|
|
105
|
+
*/
|
|
106
|
+
async function archRemove() {
|
|
107
|
+
const path = '/var/cache/pacman/pkg/';
|
|
108
|
+
const keyring = 'chaotic-keyring.pkg.tar.zst';
|
|
109
|
+
const mirrorlist = 'chaotic-mirrorlist.pkg.tar.zst';
|
|
110
|
+
const echo = Utils.setEcho(true);
|
|
111
|
+
if (fs.existsSync(path + keyring) && fs.existsSync(path + mirrorlist)) {
|
|
112
|
+
console.log('to remove chaotic-aur:\n');
|
|
113
|
+
console.log(`sudo rm ${path}${keyring}`);
|
|
114
|
+
console.log(`sudo rm ${path}${mirrorlist}`);
|
|
115
|
+
console.log(`sudo nano /etc/pacman.conf`);
|
|
116
|
+
console.log(`remove at the end:`);
|
|
117
|
+
console.log(`[chaotic-aur]`);
|
|
118
|
+
console.log(`Include = /etc/pacman.d/chaotic-mirrorlist`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* debianAdd
|
|
123
|
+
*/
|
|
124
|
+
async function debianAdd() {
|
|
125
|
+
await exec(`curl -sS https://pieroproietti.github.io/penguins-eggs-ppa/KEY.gpg| gpg --dearmor | sudo tee ${fkey} > /dev/null`);
|
|
126
|
+
const content = `deb [signed-by=${fkey}] https://pieroproietti.github.io/penguins-eggs-ppa ./\n`;
|
|
127
|
+
fs.writeFileSync(flist, content);
|
|
128
|
+
await exec('apt-get update');
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* debianRemove
|
|
132
|
+
*/
|
|
133
|
+
async function debianRemove() {
|
|
134
|
+
await exec('rm -f /etc/apt/trusted.gpg.d/penguins-eggs*');
|
|
135
|
+
await exec('rm -f /etc/apt/sources.list.d/penguins-eggs*');
|
|
136
|
+
await exec('rm -f /usr/share/keyrings/penguins-eggs*');
|
|
137
|
+
await exec('apt-get update');
|
|
138
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/tools/skel.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 { Command } from '@oclif/core';
|
|
9
|
+
export default class Skel extends Command {
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
12
|
+
static flags: {
|
|
13
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
14
|
+
user: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/tools/skel.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 { Command, Flags } from '@oclif/core';
|
|
9
|
+
import fs from 'node:fs';
|
|
10
|
+
import Utils from '../../classes/utils.js';
|
|
11
|
+
import Xdg from '../../classes/xdg.js';
|
|
12
|
+
export default class Skel extends Command {
|
|
13
|
+
static description = 'update skel from home configuration';
|
|
14
|
+
static examples = ['sudo eggs tools skel', 'sudo eggs tools skel --user user-to-be-copied'];
|
|
15
|
+
static flags = {
|
|
16
|
+
help: Flags.help({ char: 'h' }),
|
|
17
|
+
user: Flags.string({ char: 'u', description: 'user to be used' }),
|
|
18
|
+
verbose: Flags.boolean({ char: 'v' })
|
|
19
|
+
};
|
|
20
|
+
async run() {
|
|
21
|
+
Utils.titles(this.id + ' ' + this.argv);
|
|
22
|
+
const { flags } = await this.parse(Skel);
|
|
23
|
+
let verbose = false;
|
|
24
|
+
if (flags.verbose) {
|
|
25
|
+
verbose = true;
|
|
26
|
+
}
|
|
27
|
+
let user = '';
|
|
28
|
+
user = flags.user ? flags.user : await Utils.getPrimaryUser();
|
|
29
|
+
Utils.warning(`user: ${user}`);
|
|
30
|
+
const homeSource = `/home/${user}`;
|
|
31
|
+
if (!fs.existsSync(homeSource)) {
|
|
32
|
+
Utils.error(`User ${user} not exist or not exist a proper home`);
|
|
33
|
+
Utils.warning('terminate');
|
|
34
|
+
process.exit(0);
|
|
35
|
+
}
|
|
36
|
+
if (Utils.isRoot()) {
|
|
37
|
+
Utils.titles('skel');
|
|
38
|
+
Xdg.skel(user, verbose);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
Utils.useRoot(this.id);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/tools/stat.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 { Command } from '@oclif/core';
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
export default class ToolsStat extends Command {
|
|
13
|
+
static description: string;
|
|
14
|
+
static examples: string[];
|
|
15
|
+
static flags: {
|
|
16
|
+
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
17
|
+
month: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
year: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
run(): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param start
|
|
27
|
+
* @param end
|
|
28
|
+
* @param type
|
|
29
|
+
*/
|
|
30
|
+
show(start: string, end: string, type: string): Promise<void>;
|
|
31
|
+
}
|