penguins-eggs 25.10.6 → 25.10.23
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 +51 -145
- package/README.md +59 -120
- package/README.pdf +1723 -1731
- package/addons/eggs/theme/livecd/isolinux.main.simple.cfg +2 -3
- package/conf/distros/trixie/calamares/modules/shellprocess@boot_deploy.yml +3 -4
- package/conf/love.yaml +1 -1
- package/dracut/create-symlink +71 -0
- package/dracut/dracut-log.txt +3 -0
- package/dracut/dracut.conf.d/50-live.conf +24 -6
- package/dracut/dracut.conf.d/README.md +10 -0
- package/dracut/export +4 -0
- package/dracut/export-dracut-analysis +51 -0
- package/dracut/export-dracut-log +2 -0
- package/dracut/mkisofs +10 -0
- package/dracut/modules.d/00debug-shell/debug-hook.sh +13 -0
- package/dracut/modules.d/00debug-shell/module-setup.sh +20 -0
- package/dracut/modules.d/90block/README.md +7 -0
- package/dracut/modules.d/90block/block-cmdline.sh +3 -0
- package/dracut/modules.d/90block/module-setup.sh +15 -0
- package/dracut/modules.d/95iso-scan/README.md +3 -0
- package/dracut/modules.d/95iso-scan/iso-scan-fallback.sh +12 -0
- package/dracut/modules.d/95iso-scan/iso-scan.sh +92 -0
- package/dracut/modules.d/95iso-scan/module-setup.sh +18 -0
- package/dracut/modules.d/95luks-loop/README.md +9 -0
- package/dracut/modules.d/95luks-loop/luks-loop.sh +90 -0
- package/dracut/modules.d/95luks-loop/module-setup.sh +17 -0
- package/dracut/renew-initramfs +17 -0
- package/dracut/sbin2bin +10 -0
- package/dracut/update-dracut-conf-d +2 -0
- package/dracut/update-dracut-modules +62 -0
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +7 -661
- package/package.json +10 -9
- package/perrisbrewery/template/dependencies.yaml +6 -5
- package/scripts/_eggs +16 -31
- package/scripts/boot-encrypted-root.sh +177 -0
- package/scripts/eggs.bash +4 -6
- package/scripts/mount-encrypted-home.sh +259 -0
- package/dist/classes/bleach.d.ts +0 -37
- package/dist/classes/bleach.js +0 -148
- package/dist/classes/cli-autologin.d.ts +0 -52
- package/dist/classes/cli-autologin.js +0 -252
- 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 -175
- package/dist/classes/distro.d.ts +0 -32
- package/dist/classes/distro.js +0 -356
- package/dist/classes/diversions.d.ts +0 -53
- package/dist/classes/diversions.js +0 -133
- package/dist/classes/incubation/branding.d.ts +0 -17
- package/dist/classes/incubation/branding.js +0 -85
- package/dist/classes/incubation/customize/customize-partitions.d.ts +0 -4
- package/dist/classes/incubation/customize/customize-partitions.js +0 -29
- package/dist/classes/incubation/fisherman-helper/initcpio.d.ts +0 -1
- package/dist/classes/incubation/fisherman-helper/initcpio.js +0 -69
- 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 -116
- package/dist/classes/incubation/fisherman.d.ts +0 -71
- package/dist/classes/incubation/fisherman.js +0 -281
- package/dist/classes/incubation/incubator.d/alpine.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/alpine.js +0 -78
- package/dist/classes/incubation/incubator.d/archlinux.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/archlinux.js +0 -81
- package/dist/classes/incubation/incubator.d/bionic.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/bionic.js +0 -83
- package/dist/classes/incubation/incubator.d/buster.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/buster.js +0 -101
- package/dist/classes/incubation/incubator.d/fedora.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/fedora.js +0 -81
- package/dist/classes/incubation/incubator.d/focal.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/focal.js +0 -85
- package/dist/classes/incubation/incubator.d/manjaro.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/manjaro.js +0 -82
- package/dist/classes/incubation/incubator.d/noble.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/noble.js +0 -102
- package/dist/classes/incubation/incubator.d/openmamba.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/openmamba.js +0 -81
- package/dist/classes/incubation/incubator.d/opensuse.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/opensuse.js +0 -81
- package/dist/classes/incubation/incubator.d/trixie.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/trixie.js +0 -101
- package/dist/classes/incubation/incubator.d.ts +0 -48
- package/dist/classes/incubation/incubator.js +0 -378
- package/dist/classes/incubation/installer.d.ts +0 -13
- package/dist/classes/incubation/installer.js +0 -52
- package/dist/classes/keyboards.d.ts +0 -50
- package/dist/classes/keyboards.js +0 -287
- package/dist/classes/locales.d.ts +0 -21
- package/dist/classes/locales.js +0 -77
- package/dist/classes/network.d.ts +0 -37
- package/dist/classes/network.js +0 -98
- package/dist/classes/ovary.d/bind-live-fs.d.ts +0 -18
- package/dist/classes/ovary.d/bind-live-fs.js +0 -185
- package/dist/classes/ovary.d/bind-vfs.d.ts +0 -17
- package/dist/classes/ovary.d/bind-vfs.js +0 -37
- package/dist/classes/ovary.d/create-xdg-autostart.d.ts +0 -13
- package/dist/classes/ovary.d/create-xdg-autostart.js +0 -194
- package/dist/classes/ovary.d/edit-live-fs.d.ts +0 -20
- package/dist/classes/ovary.d/edit-live-fs.js +0 -245
- package/dist/classes/ovary.d/fertilization.d.ts +0 -12
- package/dist/classes/ovary.d/fertilization.js +0 -52
- package/dist/classes/ovary.d/finished.d.ts +0 -13
- package/dist/classes/ovary.d/finished.js +0 -44
- package/dist/classes/ovary.d/initrd.d.ts +0 -21
- package/dist/classes/ovary.d/initrd.js +0 -97
- package/dist/classes/ovary.d/kernel-copy.d.ts +0 -12
- package/dist/classes/ovary.d/kernel-copy.js +0 -22
- package/dist/classes/ovary.d/live-create-structure.d.ts +0 -12
- package/dist/classes/ovary.d/live-create-structure.js +0 -73
- package/dist/classes/ovary.d/make-dot-disk.d.ts +0 -12
- package/dist/classes/ovary.d/make-dot-disk.js +0 -62
- package/dist/classes/ovary.d/make-efi.d.ts +0 -14
- package/dist/classes/ovary.d/make-efi.js +0 -274
- package/dist/classes/ovary.d/make-iso.d.ts +0 -13
- package/dist/classes/ovary.d/make-iso.js +0 -45
- package/dist/classes/ovary.d/make-squashfs.d.ts +0 -18
- package/dist/classes/ovary.d/make-squashfs.js +0 -110
- package/dist/classes/ovary.d/merged.d.ts +0 -27
- package/dist/classes/ovary.d/merged.js +0 -78
- package/dist/classes/ovary.d/produce.d.ts +0 -23
- package/dist/classes/ovary.d/produce.js +0 -319
- package/dist/classes/ovary.d/rexec.d.ts +0 -13
- package/dist/classes/ovary.d/rexec.js +0 -34
- package/dist/classes/ovary.d/syslinux.d.ts +0 -12
- package/dist/classes/ovary.d/syslinux.js +0 -82
- package/dist/classes/ovary.d/user-create-live.d.ts +0 -14
- package/dist/classes/ovary.d/user-create-live.js +0 -97
- package/dist/classes/ovary.d/users-remove.d.ts +0 -9
- package/dist/classes/ovary.d/users-remove.js +0 -38
- package/dist/classes/ovary.d/xorriso-command.d.ts +0 -14
- package/dist/classes/ovary.d/xorriso-command.js +0 -123
- package/dist/classes/ovary.d.ts +0 -87
- package/dist/classes/ovary.js +0 -90
- package/dist/classes/pacman.d/alpine.d.ts +0 -56
- package/dist/classes/pacman.d/alpine.js +0 -167
- package/dist/classes/pacman.d/archlinux.d.ts +0 -62
- package/dist/classes/pacman.d/archlinux.js +0 -128
- package/dist/classes/pacman.d/debian.d.ts +0 -65
- package/dist/classes/pacman.d/debian.js +0 -143
- package/dist/classes/pacman.d/fedora.d.ts +0 -53
- package/dist/classes/pacman.d/fedora.js +0 -107
- package/dist/classes/pacman.d/openmamba.d.ts +0 -52
- package/dist/classes/pacman.d/openmamba.js +0 -106
- package/dist/classes/pacman.d/opensuse.d.ts +0 -53
- package/dist/classes/pacman.d/opensuse.js +0 -109
- package/dist/classes/pacman.d.ts +0 -139
- package/dist/classes/pacman.js +0 -683
- package/dist/classes/pve-live.d.ts +0 -17
- package/dist/classes/pve-live.js +0 -52
- package/dist/classes/pxe.d.ts +0 -76
- package/dist/classes/pxe.js +0 -353
- package/dist/classes/settings.d.ts +0 -52
- 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 -50
- package/dist/classes/tailor.js +0 -563
- package/dist/classes/tools.d.ts +0 -26
- package/dist/classes/tools.js +0 -50
- package/dist/classes/users.d.ts +0 -28
- package/dist/classes/users.js +0 -143
- package/dist/classes/utils.d/kernel.d.ts +0 -39
- package/dist/classes/utils.d/kernel.js +0 -206
- package/dist/classes/utils.d.ts +0 -327
- package/dist/classes/utils.js +0 -955
- package/dist/classes/xdg.d.ts +0 -45
- package/dist/classes/xdg.js +0 -337
- 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 -112
- package/dist/commands/config.d.ts +0 -35
- package/dist/commands/config.js +0 -120
- package/dist/commands/cuckoo.d.ts +0 -17
- package/dist/commands/cuckoo.js +0 -61
- package/dist/commands/dad.d.ts +0 -21
- package/dist/commands/dad.js +0 -47
- package/dist/commands/export/iso.d.ts +0 -19
- package/dist/commands/export/iso.js +0 -55
- package/dist/commands/export/pkg.d.ts +0 -29
- package/dist/commands/export/pkg.js +0 -173
- package/dist/commands/export/tarballs.d.ts +0 -27
- package/dist/commands/export/tarballs.js +0 -79
- package/dist/commands/install.d.ts +0 -39
- package/dist/commands/install.js +0 -113
- package/dist/commands/kill.d.ts +0 -24
- package/dist/commands/kill.js +0 -50
- package/dist/commands/love.d.ts +0 -21
- package/dist/commands/love.js +0 -73
- package/dist/commands/mom.d.ts +0 -16
- package/dist/commands/mom.js +0 -30
- package/dist/commands/pods.d.ts +0 -22
- package/dist/commands/pods.js +0 -92
- package/dist/commands/produce.d.ts +0 -35
- package/dist/commands/produce.js +0 -221
- 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 -31
- package/dist/commands/tools/ppa.js +0 -244
- 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 -46
- package/dist/commands/update.js +0 -238
- 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 -84
- package/dist/dhcpd-proxy/classes/packet.d.ts +0 -36
- package/dist/dhcpd-proxy/classes/packet.js +0 -124
- package/dist/dhcpd-proxy/index.d.ts +0 -4
- package/dist/dhcpd-proxy/index.js +0 -4
- package/dist/dhcpd-proxy/interfaces/i-pxe.d.ts +0 -45
- package/dist/dhcpd-proxy/interfaces/i-pxe.js +0 -1
- package/dist/dhcpd-proxy/lib/packet/converters.d.ts +0 -11
- package/dist/dhcpd-proxy/lib/packet/converters.js +0 -395
- package/dist/dhcpd-proxy/lib/packet/message-types.d.ts +0 -10
- package/dist/dhcpd-proxy/lib/packet/message-types.js +0 -12
- package/dist/dhcpd-proxy/lib/packet/options.d.ts +0 -8
- package/dist/dhcpd-proxy/lib/packet/options.js +0 -264
- package/dist/dhcpd-proxy/lib/sprintf.d.ts +0 -6
- package/dist/dhcpd-proxy/lib/sprintf.js +0 -130
- package/dist/dhcpd-proxy/lib/utils.d.ts +0 -126
- package/dist/dhcpd-proxy/lib/utils.js +0 -255
- package/dist/dhcpd-proxy/simple-proxy.d.ts +0 -11
- package/dist/dhcpd-proxy/simple-proxy.js +0 -118
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -8
- package/dist/interfaces/calamares/i-calamares-bootloader.d.ts +0 -23
- package/dist/interfaces/calamares/i-calamares-bootloader.js +0 -7
- package/dist/interfaces/calamares/i-calamares-branding.d.ts +0 -46
- package/dist/interfaces/calamares/i-calamares-branding.js +0 -1
- package/dist/interfaces/calamares/i-calamares-displaymanager.d.ts +0 -34
- package/dist/interfaces/calamares/i-calamares-displaymanager.js +0 -1
- package/dist/interfaces/calamares/i-calamares-finished.d.ts +0 -14
- package/dist/interfaces/calamares/i-calamares-finished.js +0 -1
- package/dist/interfaces/calamares/i-calamares-packages.d.ts +0 -26
- package/dist/interfaces/calamares/i-calamares-packages.js +0 -1
- package/dist/interfaces/calamares/i-calamares-partitions.d.ts +0 -39
- package/dist/interfaces/calamares/i-calamares-partitions.js +0 -1
- package/dist/interfaces/calamares/i-calamares-settings.d.ts +0 -36
- package/dist/interfaces/calamares/i-calamares-settings.js +0 -1
- package/dist/interfaces/i-addons.d.ts +0 -12
- 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-config-tools.d.ts +0 -15
- 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 -23
- 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-luks-passphrase.d.ts +0 -11
- package/dist/interfaces/i-luks-passphrase.js +0 -8
- package/dist/interfaces/i-materia.d.ts +0 -36
- 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-os-release.d.ts +0 -5
- package/dist/interfaces/i-os-release.js +0 -1
- 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 -26
- package/dist/interfaces/index.js +0 -8
- package/dist/krill/classes/cfs.d.ts +0 -17
- package/dist/krill/classes/cfs.js +0 -39
- package/dist/krill/classes/krill_enums.d.ts +0 -37
- package/dist/krill/classes/krill_enums.js +0 -41
- package/dist/krill/classes/prepare.d/confirm.d.ts +0 -5
- package/dist/krill/classes/prepare.d/confirm.js +0 -30
- package/dist/krill/classes/prepare.d/keyboard.d.ts +0 -14
- package/dist/krill/classes/prepare.d/keyboard.js +0 -62
- package/dist/krill/classes/prepare.d/location.d.ts +0 -17
- package/dist/krill/classes/prepare.d/location.js +0 -59
- package/dist/krill/classes/prepare.d/network.d.ts +0 -14
- package/dist/krill/classes/prepare.d/network.js +0 -68
- package/dist/krill/classes/prepare.d/partitions.d.ts +0 -14
- package/dist/krill/classes/prepare.d/partitions.js +0 -86
- package/dist/krill/classes/prepare.d/summary.d.ts +0 -15
- package/dist/krill/classes/prepare.d/summary.js +0 -72
- package/dist/krill/classes/prepare.d/users.d.ts +0 -6
- package/dist/krill/classes/prepare.d/users.js +0 -63
- package/dist/krill/classes/prepare.d/welcome.d.ts +0 -6
- package/dist/krill/classes/prepare.d/welcome.js +0 -30
- package/dist/krill/classes/prepare.d.ts +0 -89
- package/dist/krill/classes/prepare.js +0 -319
- package/dist/krill/classes/sequence.d/add_user.d.ts +0 -20
- package/dist/krill/classes/sequence.d/add_user.js +0 -77
- package/dist/krill/classes/sequence.d/bootloader.d.ts +0 -14
- package/dist/krill/classes/sequence.d/bootloader.js +0 -117
- package/dist/krill/classes/sequence.d/bootloader_config.d.ts +0 -14
- package/dist/krill/classes/sequence.d/bootloader_config.js +0 -192
- package/dist/krill/classes/sequence.d/change_password.d.ts +0 -15
- package/dist/krill/classes/sequence.d/change_password.js +0 -18
- package/dist/krill/classes/sequence.d/del_live_user.d.ts +0 -14
- package/dist/krill/classes/sequence.d/del_live_user.js +0 -39
- package/dist/krill/classes/sequence.d/fstab.d.ts +0 -14
- package/dist/krill/classes/sequence.d/fstab.js +0 -177
- package/dist/krill/classes/sequence.d/grubcfg.d.ts +0 -17
- package/dist/krill/classes/sequence.d/grubcfg.js +0 -35
- package/dist/krill/classes/sequence.d/hostname.d.ts +0 -13
- package/dist/krill/classes/sequence.d/hostname.js +0 -50
- package/dist/krill/classes/sequence.d/initramfs.d.ts +0 -13
- package/dist/krill/classes/sequence.d/initramfs.js +0 -54
- package/dist/krill/classes/sequence.d/initramfs_cfg.d.ts +0 -14
- package/dist/krill/classes/sequence.d/initramfs_cfg.js +0 -35
- package/dist/krill/classes/sequence.d/locale.d.ts +0 -13
- package/dist/krill/classes/sequence.d/locale.js +0 -91
- package/dist/krill/classes/sequence.d/locale_cfg.d.ts +0 -10
- package/dist/krill/classes/sequence.d/locale_cfg.js +0 -58
- package/dist/krill/classes/sequence.d/m_keyboard.d.ts +0 -14
- package/dist/krill/classes/sequence.d/m_keyboard.js +0 -58
- package/dist/krill/classes/sequence.d/machine_id.d.ts +0 -15
- package/dist/krill/classes/sequence.d/machine_id.js +0 -33
- package/dist/krill/classes/sequence.d/mkfs.d.ts +0 -15
- package/dist/krill/classes/sequence.d/mkfs.js +0 -88
- package/dist/krill/classes/sequence.d/mount_fs.d.ts +0 -17
- package/dist/krill/classes/sequence.d/mount_fs.js +0 -68
- package/dist/krill/classes/sequence.d/mount_vfs.d.ts +0 -17
- package/dist/krill/classes/sequence.d/mount_vfs.js +0 -59
- package/dist/krill/classes/sequence.d/network_cfg.d.ts +0 -19
- package/dist/krill/classes/sequence.d/network_cfg.js +0 -73
- package/dist/krill/classes/sequence.d/packages.d.ts +0 -14
- package/dist/krill/classes/sequence.d/packages.js +0 -111
- package/dist/krill/classes/sequence.d/partition.d/bios_luks.d.ts +0 -17
- package/dist/krill/classes/sequence.d/partition.d/bios_luks.js +0 -73
- package/dist/krill/classes/sequence.d/partition.d/bios_standard.d.ts +0 -16
- package/dist/krill/classes/sequence.d/partition.d/bios_standard.js +0 -51
- package/dist/krill/classes/sequence.d/partition.d/uefi_luks.d.ts +0 -17
- package/dist/krill/classes/sequence.d/partition.d/uefi_luks.js +0 -77
- package/dist/krill/classes/sequence.d/partition.d/uefi_standard.d.ts +0 -10
- package/dist/krill/classes/sequence.d/partition.d/uefi_standard.js +0 -33
- package/dist/krill/classes/sequence.d/partition.d.ts +0 -14
- package/dist/krill/classes/sequence.d/partition.js +0 -84
- package/dist/krill/classes/sequence.d/remove_installer_link.d.ts +0 -13
- package/dist/krill/classes/sequence.d/remove_installer_link.js +0 -35
- package/dist/krill/classes/sequence.d/umount.d.ts +0 -14
- package/dist/krill/classes/sequence.d/umount.js +0 -28
- package/dist/krill/classes/sequence.d/unpackfs.d.ts +0 -13
- package/dist/krill/classes/sequence.d/unpackfs.js +0 -20
- package/dist/krill/classes/sequence.d.ts +0 -134
- package/dist/krill/classes/sequence.js +0 -400
- package/dist/krill/components/finished.d.ts +0 -16
- package/dist/krill/components/finished.js +0 -56
- package/dist/krill/components/information.d.ts +0 -8
- package/dist/krill/components/information.js +0 -162
- package/dist/krill/components/install.d.ts +0 -15
- package/dist/krill/components/install.js +0 -60
- package/dist/krill/components/keyboard.d.ts +0 -16
- package/dist/krill/components/keyboard.js +0 -54
- package/dist/krill/components/location.d.ts +0 -16
- package/dist/krill/components/location.js +0 -59
- package/dist/krill/components/network.d.ts +0 -19
- package/dist/krill/components/network.js +0 -65
- package/dist/krill/components/partitions.d.ts +0 -18
- package/dist/krill/components/partitions.js +0 -89
- package/dist/krill/components/steps.d.ts +0 -13
- package/dist/krill/components/steps.js +0 -148
- package/dist/krill/components/summary.d.ts +0 -25
- package/dist/krill/components/summary.js +0 -77
- package/dist/krill/components/title.d.ts +0 -11
- package/dist/krill/components/title.js +0 -35
- package/dist/krill/components/users.d.ts +0 -24
- package/dist/krill/components/users.js +0 -80
- package/dist/krill/components/welcome.d.ts +0 -13
- package/dist/krill/components/welcome.js +0 -63
- package/dist/krill/interfaces/i_krill.d.ts +0 -44
- package/dist/krill/interfaces/i_krill.js +0 -8
- package/dist/krill/interfaces/i_krill_config.d.ts +0 -35
- package/dist/krill/interfaces/i_krill_config.js +0 -8
- package/dist/krill/lib/get_address.d.ts +0 -8
- package/dist/krill/lib/get_address.js +0 -23
- package/dist/krill/lib/get_dns.d.ts +0 -8
- package/dist/krill/lib/get_dns.js +0 -23
- package/dist/krill/lib/get_domain.d.ts +0 -8
- package/dist/krill/lib/get_domain.js +0 -23
- package/dist/krill/lib/get_gateway.d.ts +0 -8
- package/dist/krill/lib/get_gateway.js +0 -23
- package/dist/krill/lib/get_hostname.d.ts +0 -8
- package/dist/krill/lib/get_hostname.js +0 -23
- package/dist/krill/lib/get_luks_passphrase.d.ts +0 -8
- package/dist/krill/lib/get_luks_passphrase.js +0 -32
- package/dist/krill/lib/get_netmask.d.ts +0 -8
- package/dist/krill/lib/get_netmask.js +0 -23
- package/dist/krill/lib/get_password.d.ts +0 -8
- package/dist/krill/lib/get_password.js +0 -36
- package/dist/krill/lib/get_userfullname.d.ts +0 -8
- package/dist/krill/lib/get_userfullname.js +0 -23
- package/dist/krill/lib/get_username.d.ts +0 -8
- package/dist/krill/lib/get_username.js +0 -23
- package/dist/krill/lib/select_address_type.d.ts +0 -8
- package/dist/krill/lib/select_address_type.js +0 -24
- package/dist/krill/lib/select_filesystem_type.d.ts +0 -8
- package/dist/krill/lib/select_filesystem_type.js +0 -40
- package/dist/krill/lib/select_installation_device.d.ts +0 -8
- package/dist/krill/lib/select_installation_device.js +0 -40
- package/dist/krill/lib/select_installation_mode.d.ts +0 -9
- package/dist/krill/lib/select_installation_mode.js +0 -25
- package/dist/krill/lib/select_interface.d.ts +0 -8
- package/dist/krill/lib/select_interface.js +0 -24
- package/dist/krill/lib/select_keyboard_layout.d.ts +0 -11
- package/dist/krill/lib/select_keyboard_layout.js +0 -36
- package/dist/krill/lib/select_keyboard_model.d.ts +0 -11
- package/dist/krill/lib/select_keyboard_model.js +0 -34
- package/dist/krill/lib/select_keyboard_option.d.ts +0 -11
- package/dist/krill/lib/select_keyboard_option.js +0 -34
- package/dist/krill/lib/select_keyboard_variant.d.ts +0 -11
- package/dist/krill/lib/select_keyboard_variant.js +0 -35
- package/dist/krill/lib/select_languages.d.ts +0 -8
- package/dist/krill/lib/select_languages.js +0 -28
- package/dist/krill/lib/select_regions.d.ts +0 -8
- package/dist/krill/lib/select_regions.js +0 -24
- package/dist/krill/lib/select_replaced_partition.d.ts +0 -8
- package/dist/krill/lib/select_replaced_partition.js +0 -31
- package/dist/krill/lib/select_user_swap_choice.d.ts +0 -9
- package/dist/krill/lib/select_user_swap_choice.js +0 -35
- package/dist/krill/lib/select_zones.d.ts +0 -8
- package/dist/krill/lib/select_zones.js +0 -518
- package/dist/lib/kill_me_softly.d.ts +0 -11
- package/dist/lib/kill_me_softly.js +0 -61
- package/dist/lib/utils.d.ts +0 -19
- package/dist/lib/utils.js +0 -65
package/package.json
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"name": "penguins-eggs",
|
|
3
3
|
"shortName": "eggs",
|
|
4
4
|
"description": "A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others",
|
|
5
|
-
"version": "25.10.
|
|
5
|
+
"version": "25.10.23",
|
|
6
6
|
"author": "Piero Proietti",
|
|
7
7
|
"bin": {
|
|
8
8
|
"eggs": "./bin/run.js"
|
|
9
9
|
},
|
|
10
10
|
"bugs": "https://github.com/pieroproietti/penguins-eggs/issues",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@oclif/core": "^4.
|
|
13
|
-
"@oclif/plugin-autocomplete": "^3.2.
|
|
12
|
+
"@oclif/core": "^4.6.0",
|
|
13
|
+
"@oclif/plugin-autocomplete": "^3.2.37",
|
|
14
14
|
"@oclif/plugin-help": "^6.2.33",
|
|
15
|
-
"@oclif/plugin-version": "^2.2.
|
|
15
|
+
"@oclif/plugin-version": "^2.2.34",
|
|
16
16
|
"@types/express": "^5.0.3",
|
|
17
17
|
"ansis": "^4.2.0",
|
|
18
18
|
"axios": "^1.12.2",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"ink": "^5",
|
|
24
24
|
"ink-progress-bar": "^3.0.0",
|
|
25
25
|
"ink-spinner": "^5.0.0",
|
|
26
|
-
"inquirer": "^12.
|
|
26
|
+
"inquirer": "^12.10.0",
|
|
27
27
|
"js-yaml": "^4.1.0",
|
|
28
28
|
"mustache": "^4.2.0",
|
|
29
29
|
"netmask": "^2.0.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@oclif/prettier-config": "^0.2.1",
|
|
39
39
|
"@oclif/test": "^4.1.14",
|
|
40
|
-
"@types/chai": "^5.2.
|
|
40
|
+
"@types/chai": "^5.2.3",
|
|
41
41
|
"@types/debug": "^4.1.12",
|
|
42
42
|
"@types/glob": "^9.0.0",
|
|
43
43
|
"@types/inquirer": "^9.0.8",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"@types/shelljs": "^0.8.17",
|
|
52
52
|
"@types/ws": "^8.18.1",
|
|
53
53
|
"chai": "^6.2.0",
|
|
54
|
-
"eslint": "^9.
|
|
55
|
-
"eslint-config-oclif": "^6.0.
|
|
54
|
+
"eslint": "^9.38.0",
|
|
55
|
+
"eslint-config-oclif": "^6.0.110",
|
|
56
56
|
"eslint-config-prettier": "^10.1.8",
|
|
57
57
|
"glob": "^11.0.3",
|
|
58
58
|
"mocha": "^11.7.4",
|
|
59
|
-
"oclif": "^4.22.
|
|
59
|
+
"oclif": "^4.22.32",
|
|
60
60
|
"perrisbrewery": "^25.9.16",
|
|
61
61
|
"prettier": "^3.6.2",
|
|
62
62
|
"shx": "^0.4.0",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"/dist",
|
|
77
77
|
"/dracut",
|
|
78
78
|
"/eui",
|
|
79
|
+
"/initramfs-tools",
|
|
79
80
|
"/manpages",
|
|
80
81
|
"/mkinitcpio",
|
|
81
82
|
"/mkinitfs",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
common:
|
|
6
6
|
- coreutils
|
|
7
7
|
- cryptsetup
|
|
8
|
+
- cryptsetup-bin
|
|
8
9
|
- cryptsetup-initramfs
|
|
9
10
|
- curl # wardrobe
|
|
10
11
|
- dbus-bin | uuidgen-runtime # uuid-runtime per devuan
|
|
@@ -13,11 +14,11 @@ common:
|
|
|
13
14
|
- git # wardrobe
|
|
14
15
|
- gpg # eggs
|
|
15
16
|
- jq # mom
|
|
16
|
-
- live-boot
|
|
17
|
-
- live-boot-doc
|
|
18
|
-
- live-boot-initramfs-tools
|
|
19
|
-
- live-config-systemd | live-config-sysvinit
|
|
20
|
-
- live-tools
|
|
17
|
+
- live-boot | dracut
|
|
18
|
+
- live-boot-doc | dracut
|
|
19
|
+
- live-boot-initramfs-tools | dracut
|
|
20
|
+
- live-config-systemd | live-config-sysvinit | dracut
|
|
21
|
+
- live-tools | dracut-live
|
|
21
22
|
- lvm2 # pvdisplay in krill
|
|
22
23
|
- nodejs (>= 18)
|
|
23
24
|
- parted
|
package/scripts/_eggs
CHANGED
|
@@ -59,7 +59,7 @@ _eggs_tools() {
|
|
|
59
59
|
cmds)
|
|
60
60
|
_values "completions" \
|
|
61
61
|
"clean[clean system log, apt, etc]" \
|
|
62
|
-
"
|
|
62
|
+
"repo[add/remove penguins-eggs-repo]" \
|
|
63
63
|
"skel[update skel from home configuration]" \
|
|
64
64
|
"stat[get statistics from sourceforge]" \
|
|
65
65
|
"yolk[configure eggs to install without internet]" \
|
|
@@ -75,12 +75,12 @@ _values "completions" \
|
|
|
75
75
|
--help"[Show help for command]" \
|
|
76
76
|
"*: :_files"
|
|
77
77
|
;;
|
|
78
|
-
"
|
|
78
|
+
"repo")
|
|
79
79
|
_arguments -S \
|
|
80
|
-
"(-a --add)"{-a,--add}"[add penguins-eggs
|
|
80
|
+
"(-a --add)"{-a,--add}"[add penguins-eggs-repo]" \
|
|
81
81
|
"(-h --help)"{-h,--help}"[Show CLI help.]" \
|
|
82
82
|
"(-n --nointeractive)"{-n,--nointeractive}"[no user interaction]" \
|
|
83
|
-
"(-r --remove)"{-r,--remove}"[remove penguins-eggs
|
|
83
|
+
"(-r --remove)"{-r,--remove}"[remove penguins-eggs-repo]" \
|
|
84
84
|
"(-v --verbose)"{-v,--verbose}"[verbose]" \
|
|
85
85
|
--help"[Show help for command]" \
|
|
86
86
|
"*: :_files"
|
|
@@ -198,11 +198,9 @@ _eggs() {
|
|
|
198
198
|
"pods[eggs pods: build ISOs from containers]" \
|
|
199
199
|
"produce[produce a live image from your system whithout your data]" \
|
|
200
200
|
"status[informations about eggs status]" \
|
|
201
|
-
"syncfrom[restore users and user data from a LUKS volumes]" \
|
|
202
|
-
"syncto[Save users and users' data ENCRYPTED]" \
|
|
203
201
|
"update[update the Penguins' eggs tool]" \
|
|
204
|
-
"help[Display help for eggs.]" \
|
|
205
202
|
"autocomplete[Display autocomplete installation instructions.]" \
|
|
203
|
+
"help[Display help for eggs.]" \
|
|
206
204
|
"version[]" \
|
|
207
205
|
|
|
208
206
|
;;
|
|
@@ -320,6 +318,9 @@ _arguments -S \
|
|
|
320
318
|
"(-h --help)"{-h,--help}"[Show CLI help.]" \
|
|
321
319
|
"(-v --verbose)"{-v,--verbose}"[]" \
|
|
322
320
|
"(-n --nointeractive)"{-n,--nointeractive}"[no user interaction]" \
|
|
321
|
+
"(-c --clone)"{-c,--clone}"[clone (uncrypted)]" \
|
|
322
|
+
"(-k --homecrypt)"{-k,--homecrypt}"[clone crypted home]" \
|
|
323
|
+
"(-f --fullcrypt)"{-f,--fullcrypt}"[clone crypted full]" \
|
|
323
324
|
--help"[Show help for command]" \
|
|
324
325
|
"*: :_files" ;;
|
|
325
326
|
mom)
|
|
@@ -336,11 +337,12 @@ produce)
|
|
|
336
337
|
_arguments -S \
|
|
337
338
|
"*"--addons"[addons to be used: adapt, pve, rsupport]:file:_files" \
|
|
338
339
|
--basename"[basename]:file:_files" \
|
|
339
|
-
"(-c --clone)"{-c,--clone}"[clone]" \
|
|
340
|
-
"(-
|
|
340
|
+
"(-c --clone)"{-c,--clone}"[clone (uncrypted)]" \
|
|
341
|
+
"(-k --homecrypt)"{-k,--homecrypt}"[clone crypted home]" \
|
|
342
|
+
"(-f --fullcrypt)"{-f,--fullcrypt}"[clone crypted full]" \
|
|
341
343
|
"*"--excludes"[use: static, homes, home]:file:_files" \
|
|
342
344
|
"(-h --help)"{-h,--help}"[Show CLI help.]" \
|
|
343
|
-
"(-
|
|
345
|
+
"(-K --kernel)"{-K,--kernel}"[kernel version]:file:_files" \
|
|
344
346
|
"*"--links"[desktop links]:file:_files" \
|
|
345
347
|
"(-m --max)"{-m,--max}"[max compression: xz -Xbcj ...]" \
|
|
346
348
|
"(-N --noicon)"{-N,--noicon}"[no icon eggs on desktop]" \
|
|
@@ -351,7 +353,7 @@ _arguments -S \
|
|
|
351
353
|
"(-s --script)"{-s,--script}"[script mode. Generate scripts to manage iso build]" \
|
|
352
354
|
"(-S --standard)"{-S,--standard}"[standard compression: xz -b 1M]" \
|
|
353
355
|
--theme"[theme for livecd, calamares branding and partitions]:file:_files" \
|
|
354
|
-
"(-
|
|
356
|
+
"(-i --includeRoot)"{-i,--includeRoot}"[folder /root is included on live]" \
|
|
355
357
|
"(-v --verbose)"{-v,--verbose}"[verbose]" \
|
|
356
358
|
"(-y --yolk)"{-y,--yolk}"[force yolk renew]" \
|
|
357
359
|
--help"[Show help for command]" \
|
|
@@ -362,27 +364,15 @@ _arguments -S \
|
|
|
362
364
|
"(-v --verbose)"{-v,--verbose}"[]" \
|
|
363
365
|
--help"[Show help for command]" \
|
|
364
366
|
"*: :_files" ;;
|
|
365
|
-
|
|
366
|
-
_arguments -S \
|
|
367
|
-
--delete"[rsync --delete delete extraneous files from dest dirs]:file:_files" \
|
|
368
|
-
"(-f --file)"{-f,--file}"[file containing luks-volume encrypted]:file:_files" \
|
|
369
|
-
"(-h --help)"{-h,--help}"[Show CLI help.]" \
|
|
370
|
-
"(-r --rootdir)"{-r,--rootdir}"[rootdir of the installed system, when used from live]:file:_files" \
|
|
371
|
-
"(-v --verbose)"{-v,--verbose}"[verbose]" \
|
|
372
|
-
--help"[Show help for command]" \
|
|
373
|
-
"*: :_files" ;;
|
|
374
|
-
syncto)
|
|
367
|
+
update)
|
|
375
368
|
_arguments -S \
|
|
376
|
-
"(-e --excludes)"{-e,--excludes}"[use: exclude.list.d/home.list]" \
|
|
377
|
-
"(-f --file)"{-f,--file}"[file luks-volume encrypted]:file:_files" \
|
|
378
369
|
"(-h --help)"{-h,--help}"[Show CLI help.]" \
|
|
379
370
|
"(-v --verbose)"{-v,--verbose}"[verbose]" \
|
|
380
371
|
--help"[Show help for command]" \
|
|
381
372
|
"*: :_files" ;;
|
|
382
|
-
|
|
373
|
+
autocomplete)
|
|
383
374
|
_arguments -S \
|
|
384
|
-
"(-
|
|
385
|
-
"(-v --verbose)"{-v,--verbose}"[verbose]" \
|
|
375
|
+
"(-r --refresh-cache)"{-r,--refresh-cache}"[Refresh cache (ignores displaying instructions)]" \
|
|
386
376
|
--help"[Show help for command]" \
|
|
387
377
|
"*: :_files" ;;
|
|
388
378
|
help)
|
|
@@ -390,11 +380,6 @@ _arguments -S \
|
|
|
390
380
|
"(-n --nested-commands)"{-n,--nested-commands}"[Include all nested commands in the output.]" \
|
|
391
381
|
--help"[Show help for command]" \
|
|
392
382
|
"*: :_files" ;;
|
|
393
|
-
autocomplete)
|
|
394
|
-
_arguments -S \
|
|
395
|
-
"(-r --refresh-cache)"{-r,--refresh-cache}"[Refresh cache (ignores displaying instructions)]" \
|
|
396
|
-
--help"[Show help for command]" \
|
|
397
|
-
"*: :_files" ;;
|
|
398
383
|
version)
|
|
399
384
|
_arguments -S \
|
|
400
385
|
--json"[Format output as json.]" \
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# /scripts/live-premount/boot-encrypted-root.sh
|
|
3
|
+
# v2.3 - Minimal RAM Copy + Supporto Plymouth + 3 Tentativi
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
# --- Logging Setup ---
|
|
8
|
+
LOGFILE="/tmp/eggs-premount-boot.log"; FIFO="/tmp/eggs-boot.fifo"; rm -f "$LOGFILE" "$FIFO"; mkfifo "$FIFO" || exit 1; tee -a "$LOGFILE" < "$FIFO" & TEE_PID=$!; exec > "$FIFO" 2>&1; trap 'echo "EGGS-BOOT: Cleanup trap"; rm -f "$FIFO"; kill "$TEE_PID" 2>/dev/null || true; exit' EXIT INT TERM
|
|
9
|
+
# --- Logging End ---
|
|
10
|
+
|
|
11
|
+
echo "EGGS-BOOT: =========================================="
|
|
12
|
+
echo "EGGS-BOOT: Script Avvio Root Criptato v2.3 (3 Tentativi)"
|
|
13
|
+
echo "EGGS-BOOT: =========================================="
|
|
14
|
+
|
|
15
|
+
# Moduli necessari
|
|
16
|
+
echo "EGGS-BOOT: Caricamento moduli..."
|
|
17
|
+
modprobe loop 2>/dev/null || true
|
|
18
|
+
modprobe dm_mod 2>/dev/null || true
|
|
19
|
+
modprobe dm_crypt 2>/dev/null || true
|
|
20
|
+
modprobe overlay 2>/dev/null || true
|
|
21
|
+
modprobe ext4 2>/dev/null || true
|
|
22
|
+
modprobe squashfs 2>/dev/null || true
|
|
23
|
+
sleep 2
|
|
24
|
+
|
|
25
|
+
# 1. Trova live media originale
|
|
26
|
+
echo "EGGS-BOOT: Ricerca live media originale..."
|
|
27
|
+
mkdir -p /mnt/live-media /mnt/ext4
|
|
28
|
+
ORIG_MEDIA_MNT="/mnt/live-media"
|
|
29
|
+
LIVE_DEV=""
|
|
30
|
+
# ... [Codice ricerca live media] ...
|
|
31
|
+
MAX_WAIT_DEV=20; COUNT_DEV=0
|
|
32
|
+
while [ -z "$LIVE_DEV" ] && [ $COUNT_DEV -lt $MAX_WAIT_DEV ]; do ls /dev > /dev/null; for dev in /dev/sr* /dev/sd* /dev/vd* /dev/nvme*n*; do if [ ! -b "$dev" ]; then continue; fi; if mount -o ro "$dev" "$ORIG_MEDIA_MNT" 2>/dev/null; then if [ -f "${ORIG_MEDIA_MNT}/live/root.img" ]; then echo "EGGS-BOOT: Found Original Live media on $dev"; LIVE_DEV=$dev; break 2; else umount "$ORIG_MEDIA_MNT" 2>/dev/null || true; fi; fi; done; sleep 1; COUNT_DEV=$((COUNT_DEV+1)); done
|
|
33
|
+
if [ -z "$LIVE_DEV" ]; then echo "EGGS-BOOT: ERRORE: Live media originale non trovato!"; ls /dev; exit 1; fi
|
|
34
|
+
|
|
35
|
+
ROOT_IMG_RO="${ORIG_MEDIA_MNT}/live/root.img"
|
|
36
|
+
RAM_MEDIA_MNT="/run/live/medium" # Destinazione finale in RAM
|
|
37
|
+
|
|
38
|
+
# 2a. Associa loop device (per definire $LOOP_DEV)
|
|
39
|
+
echo "EGGS-BOOT: Associazione loop device per $ROOT_IMG_RO..."
|
|
40
|
+
LOOP_DEV_OUTPUT=$(/sbin/losetup -f --show "$ROOT_IMG_RO" 2>/dev/null); LOSETUP_EXIT_STATUS=$?
|
|
41
|
+
if [ $LOSETUP_EXIT_STATUS -ne 0 ] || [ -z "$LOOP_DEV_OUTPUT" ] || ! [ -b "$LOOP_DEV_OUTPUT" ]; then echo "EGGS-BOOT: ERRORE: Associazione loop fallita!"; exit 1; fi
|
|
42
|
+
LOOP_DEV="$LOOP_DEV_OUTPUT"
|
|
43
|
+
echo "EGGS-BOOT: Loop device associato: $LOOP_DEV"
|
|
44
|
+
|
|
45
|
+
# 2b. Sblocca LUKS (con supporto Plymouth e 3 tentativi)
|
|
46
|
+
echo "EGGS-BOOT: Sblocco LUKS $LOOP_DEV (readonly)..."
|
|
47
|
+
|
|
48
|
+
# Disabilita 'set -e' temporaneamente per gestire i fallimenti della password
|
|
49
|
+
set +e
|
|
50
|
+
MAX_ATTEMPTS=3
|
|
51
|
+
ATTEMPT=1
|
|
52
|
+
UNLOCKED=0
|
|
53
|
+
|
|
54
|
+
while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do
|
|
55
|
+
log "EGGS-BOOT: Tentativo sblocco $ATTEMPT di $MAX_ATTEMPTS"
|
|
56
|
+
|
|
57
|
+
# Controlla se Plymouth è attivo
|
|
58
|
+
if plymouth --ping 2>/dev/null; then
|
|
59
|
+
log "EGGS-BOOT: Plymouth attivo. Chiedo password via Plymouth..."
|
|
60
|
+
|
|
61
|
+
# Chiedi la password a Plymouth e passala a cryptsetup via stdin (--key-file -)
|
|
62
|
+
if plymouth ask-for-password --prompt="Enter passphrase ($ATTEMPT/$MAX_ATTEMPTS)" | cryptsetup open --readonly --key-file - "$LOOP_DEV" live-root; then
|
|
63
|
+
log "EGGS-BOOT: Sblocco LUKS via Plymouth riuscito."
|
|
64
|
+
UNLOCKED=1
|
|
65
|
+
break
|
|
66
|
+
else
|
|
67
|
+
log "EGGS-BOOT: ERRORE: Sblocco LUKS via Plymouth fallito (Tentativo $ATTEMPT)."
|
|
68
|
+
if [ $ATTEMPT -lt $MAX_ATTEMPTS ]; then
|
|
69
|
+
plymouth display-message --text="Incorrect passphrase. Try again..."
|
|
70
|
+
sleep 2 # Dà tempo di leggere il messaggio
|
|
71
|
+
fi
|
|
72
|
+
fi
|
|
73
|
+
else
|
|
74
|
+
# Fallback: Plymouth non attivo
|
|
75
|
+
log "EGGS-BOOT: Plymouth non attivo. Chiedo password via console..."
|
|
76
|
+
echo "Please enter passphrase for $LOOP_DEV ($ATTEMPT/$MAX_ATTEMPTS):"
|
|
77
|
+
|
|
78
|
+
if cryptsetup open --readonly "$LOOP_DEV" live-root; then
|
|
79
|
+
log "EGGS-BOOT: Sblocco LUKS (console) riuscito."
|
|
80
|
+
UNLOCKED=1
|
|
81
|
+
break
|
|
82
|
+
else
|
|
83
|
+
log "EGGS-BOOT: ERRORE: Sblocco LUKS (console) fallito (Tentativo $ATTEMPT)."
|
|
84
|
+
if [ $ATTEMPT -lt $MAX_ATTEMPTS ]; then
|
|
85
|
+
echo "Incorrect passphrase. Please try again."
|
|
86
|
+
fi
|
|
87
|
+
fi
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
ATTEMPT=$((ATTEMPT + 1))
|
|
91
|
+
sleep 1
|
|
92
|
+
done
|
|
93
|
+
|
|
94
|
+
# Riabilita 'set -e'
|
|
95
|
+
set -e
|
|
96
|
+
|
|
97
|
+
# Controlla se tutti i tentativi sono falliti
|
|
98
|
+
if [ $UNLOCKED -eq 0 ]; then
|
|
99
|
+
log "EGGS-BOOT: ERRORE: Numero massimo tentativi raggiunto."
|
|
100
|
+
if plymouth --ping 2>/dev/null; then
|
|
101
|
+
plymouth display-message --text="LUKS Unlock Failed: Max attempts reached"
|
|
102
|
+
sleep 5
|
|
103
|
+
fi
|
|
104
|
+
/sbin/losetup -d "$LOOP_DEV" || true
|
|
105
|
+
exit 1
|
|
106
|
+
fi
|
|
107
|
+
|
|
108
|
+
echo "EGGS-BOOT: LUKS sbloccato ($LOOP_DEV -> live-root) [readonly]. Attesa mapper..."
|
|
109
|
+
|
|
110
|
+
# ... (Resto dello script v2.1: 2c, 2d, 3, 4, 5, 6, 7 - come prima) ...
|
|
111
|
+
# 2c. Attesa mapper
|
|
112
|
+
MAX_WAIT_MAP=10; COUNT_MAP=0; while [ ! -b /dev/mapper/live-root ] && [ $COUNT_MAP -lt $MAX_WAIT_MAP ]; do sleep 1; COUNT_MAP=$((COUNT_MAP+1)); done
|
|
113
|
+
if [ ! -b /dev/mapper/live-root ]; then echo "EGGS-BOOT: ERRORE: Mapper non apparso."; cryptsetup close live-root || true; /sbin/losetup -d "$LOOP_DEV" || true; exit 1; fi
|
|
114
|
+
|
|
115
|
+
# 2d. Montaggio ext4
|
|
116
|
+
echo "EGGS-BOOT: Montaggio ext4..."
|
|
117
|
+
mount -t ext4 -o ro /dev/mapper/live-root /mnt/ext4
|
|
118
|
+
|
|
119
|
+
SQFS_SRC="/mnt/ext4/filesystem.squashfs"
|
|
120
|
+
if [ ! -f "$SQFS_SRC" ]; then echo "EGGS-BOOT: ERRORE: $SQFS_SRC non trovato!"; exit 1; fi
|
|
121
|
+
|
|
122
|
+
# 3. Prepara Destinazione RAM (ORA calcoliamo la dimensione GIUSTA)
|
|
123
|
+
echo "EGGS-BOOT: Preparazione RAM disk ${RAM_MEDIA_MNT}..."
|
|
124
|
+
SQFS_SIZE_BYTES=$(stat -c%s "$SQFS_SRC")
|
|
125
|
+
NEEDED_SIZE_MB=$(( $SQFS_SIZE_BYTES / 1024 / 1024 + 500 )) # Aggiunge 500MB buffer
|
|
126
|
+
echo "EGGS-BOOT: Spazio stimato necessario in /run: ${NEEDED_SIZE_MB} MB"
|
|
127
|
+
echo "EGGS-BOOT: Aumento dimensione /run (tmpfs)..."
|
|
128
|
+
if ! mount -o remount,size=${NEEDED_SIZE_MB}M /run; then
|
|
129
|
+
echo "EGGS-BOOT: WARN: Remount /run fallito, spazio potrebbe essere insufficiente."
|
|
130
|
+
df -h /run
|
|
131
|
+
fi
|
|
132
|
+
mkdir -p "${RAM_MEDIA_MNT}/live"
|
|
133
|
+
|
|
134
|
+
# 4. Copia SOLO filesystem.squashfs in RAM
|
|
135
|
+
SQFS_DEST="${RAM_MEDIA_MNT}/live/filesystem.squashfs"
|
|
136
|
+
echo "EGGS-BOOT: Copia $SQFS_SRC -> $SQFS_DEST..."
|
|
137
|
+
if command -v rsync >/dev/null; then
|
|
138
|
+
rsync -a --info=progress2 "$SQFS_SRC" "$SQFS_DEST"
|
|
139
|
+
else
|
|
140
|
+
cp "$SQFS_SRC" "$SQFS_DEST"
|
|
141
|
+
fi
|
|
142
|
+
SQFS_SIZE=$(du -h "$SQFS_DEST" | cut -f1)
|
|
143
|
+
echo "EGGS-BOOT: filesystem.squashfs ($SQFS_SIZE) copiato in RAM."
|
|
144
|
+
|
|
145
|
+
# 5. Copia i metadati essenziali del medium in RAM
|
|
146
|
+
echo "EGGS-BOOT: Copia metadati (.disk, kernel, initrd) da ${ORIG_MEDIA_MNT}..."
|
|
147
|
+
|
|
148
|
+
# Copia .disk (essenziale per live-boot)
|
|
149
|
+
if [ -d "${ORIG_MEDIA_MNT}/.disk" ]; then
|
|
150
|
+
cp -a "${ORIG_MEDIA_MNT}/.disk" "${RAM_MEDIA_MNT}/"
|
|
151
|
+
echo "EGGS-BOOT: .disk copiato."
|
|
152
|
+
else
|
|
153
|
+
echo "EGGS-BOOT: WARN: Directory .disk non trovata sul media originale."
|
|
154
|
+
fi
|
|
155
|
+
|
|
156
|
+
# Copia kernel e initrd (utili per l'installer)
|
|
157
|
+
echo "EGGS-BOOT: Copia vmlinuz* e initrd*..."
|
|
158
|
+
cp -a "${ORIG_MEDIA_MNT}/live/vmlinuz"* "${RAM_MEDIA_MNT}/live/" 2>/dev/null || true
|
|
159
|
+
cp -a "${ORIG_MEDIA_MNT}/live/initrd"* "${RAM_MEDIA_MNT}/live/" 2>/dev/null || true
|
|
160
|
+
echo "EGGS-BOOT: Copia kernel/initrd tentata (eventuali errori ignorati)."
|
|
161
|
+
|
|
162
|
+
# 6. Pulizia Mount/Device Intermedi
|
|
163
|
+
echo "EGGS-BOOT: Pulizia mount/device intermedi..."
|
|
164
|
+
umount /mnt/ext4 || echo "EGGS-BOOT: WARN: umount /mnt/ext4 failed ($?)"
|
|
165
|
+
cryptsetup close live-root || echo "EGGS-BOOT: WARN: cryptsetup close live-root failed ($?)"
|
|
166
|
+
/sbin/losetup -d "$LOOP_DEV" || echo "EGGS-BOOT: WARN: losetup -d $LOOP_DEV failed ($?)"
|
|
167
|
+
umount "$ORIG_MEDIA_MNT" || echo "EGGS-BOOT: WARN: umount ${ORIG_MEDIA_MNT} failed ($?)"
|
|
168
|
+
echo "EGGS-BOOT: Pulizia completata."
|
|
169
|
+
|
|
170
|
+
# 7. Passa il Testimone a live-boot
|
|
171
|
+
echo "EGGS-BOOT: =========================================="
|
|
172
|
+
echo "EGGS-BOOT: Medium live MINIMALE ricostruito in RAM su ${RAM_MEDIA_MNT}"
|
|
173
|
+
ls -l "$RAM_MEDIA_MNT"
|
|
174
|
+
ls -l "${RAM_MEDIA_MNT}/live"
|
|
175
|
+
echo "EGGS-BOOT: Lascio che live-boot continui (con 'live-media=/run/live/medium')..."
|
|
176
|
+
echo "EGGS-BOOT: =========================================="
|
|
177
|
+
exit 0
|
package/scripts/eggs.bash
CHANGED
|
@@ -23,15 +23,13 @@ export:tarballs --clean --help --verbose
|
|
|
23
23
|
install --btrfs --chroot --crypted --domain --halt --help --ip --nointeractive --none --pve --random --replace --small --suspend --testing --unattended --verbose
|
|
24
24
|
krill --btrfs --chroot --crypted --domain --halt --help --ip --nointeractive --none --pve --random --replace --small --suspend --testing --unattended --verbose
|
|
25
25
|
kill --help --isos --nointeractive --verbose
|
|
26
|
-
love --help --verbose --nointeractive
|
|
26
|
+
love --help --verbose --nointeractive --clone --homecrypt --fullcrypt
|
|
27
27
|
mom --help
|
|
28
28
|
pods --help
|
|
29
|
-
produce --addons --basename --clone --
|
|
29
|
+
produce --addons --basename --clone --homecrypt --fullcrypt --excludes --help --kernel --links --max --noicon --nointeractive --pendrive --prefix --release --script --standard --theme --includeRoot --verbose --yolk
|
|
30
30
|
status --help --verbose
|
|
31
|
-
syncfrom --delete --file --help --rootdir --verbose
|
|
32
|
-
syncto --excludes --file --help --verbose
|
|
33
31
|
tools:clean --help --nointeractive --verbose
|
|
34
|
-
tools:
|
|
32
|
+
tools:repo --add --help --nointeractive --remove --verbose
|
|
35
33
|
tools:skel --help --user --verbose
|
|
36
34
|
tools:stat --help --month --year
|
|
37
35
|
tools:yolk --help --verbose
|
|
@@ -40,8 +38,8 @@ wardrobe:get --help --verbose
|
|
|
40
38
|
wardrobe:list --distro --help --verbose
|
|
41
39
|
wardrobe:show --help --json --verbose --wardrobe
|
|
42
40
|
wardrobe:wear --help --no_accessories --no_firmwares --verbose --wardrobe
|
|
43
|
-
help --nested-commands
|
|
44
41
|
autocomplete --refresh-cache
|
|
42
|
+
help --nested-commands
|
|
45
43
|
version --json --verbose
|
|
46
44
|
"
|
|
47
45
|
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Script per sbloccare e montare home.img LUKS cifrato
|
|
3
|
+
# v1.1 - Aggiunto supporto Plymouth
|
|
4
|
+
# Con logging robusto e gestione errori
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
# Configurazione
|
|
9
|
+
HOME_IMG="__HOME_IMG_PATH__"
|
|
10
|
+
LUKS_NAME="live-home"
|
|
11
|
+
MOUNT_POINT="/home"
|
|
12
|
+
LOG_FILE="/var/log/mount-encrypted-home.log"
|
|
13
|
+
|
|
14
|
+
# Funzione di logging
|
|
15
|
+
log() {
|
|
16
|
+
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" | tee -a "$LOG_FILE"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
log_error() {
|
|
20
|
+
echo "[$(date '+%Y-%m-%d %H:%M:%S')] ERROR: $1" | tee -a "$LOG_FILE" >&2
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
# Cleanup in caso di errore
|
|
24
|
+
cleanup() {
|
|
25
|
+
log "Cleanup in progress..."
|
|
26
|
+
if mountpoint -q "$MOUNT_POINT" 2>/dev/null; then
|
|
27
|
+
umount "$MOUNT_POINT" 2>/dev/null || true
|
|
28
|
+
fi
|
|
29
|
+
if [ -e "/dev/mapper/$LUKS_NAME" ]; then
|
|
30
|
+
cryptsetup close "$LUKS_NAME" 2>/dev/null || true
|
|
31
|
+
fi
|
|
32
|
+
# Se abbiamo copiato in RAM, rimuoviamo la copia
|
|
33
|
+
if [ "$HOME_IMG" = "/var/tmp/home.img" ]; then
|
|
34
|
+
rm -f /var/tmp/home.img 2>/dev/null || true
|
|
35
|
+
log "Removed temporary home.img from /var/tmp"
|
|
36
|
+
fi
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
trap cleanup EXIT
|
|
40
|
+
|
|
41
|
+
log "=== Starting encrypted home mount process (v1.1) ==="
|
|
42
|
+
|
|
43
|
+
# Verifica memoria disponibile
|
|
44
|
+
AVAILABLE_MEM=$(free -m | awk '/^Mem:/{print $7}')
|
|
45
|
+
log "Available memory: ${AVAILABLE_MEM}MB"
|
|
46
|
+
|
|
47
|
+
if [ "$AVAILABLE_MEM" -lt 1024 ]; then
|
|
48
|
+
log_error "Low memory warning: only ${AVAILABLE_MEM}MB available"
|
|
49
|
+
log "This might cause issues with LUKS operations"
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Attendi che il media sia disponibile (max 30 secondi)
|
|
53
|
+
log "Waiting for live media to be available..."
|
|
54
|
+
ORIG_HOME_IMG="$HOME_IMG" # Salva il path originale
|
|
55
|
+
COUNTER=0
|
|
56
|
+
while [ ! -f "$ORIG_HOME_IMG" ] && [ $COUNTER -lt 30 ]; do
|
|
57
|
+
sleep 1
|
|
58
|
+
COUNTER=$((COUNTER + 1))
|
|
59
|
+
done
|
|
60
|
+
|
|
61
|
+
if [ ! -f "$ORIG_HOME_IMG" ]; then
|
|
62
|
+
log_error "home.img not found at $ORIG_HOME_IMG after 30 seconds"
|
|
63
|
+
log "Available mounts:"
|
|
64
|
+
mount | grep live | tee -a "$LOG_FILE"
|
|
65
|
+
exit 0
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
log "Found home.img at $ORIG_HOME_IMG"
|
|
69
|
+
|
|
70
|
+
# Copia in RAM se è su media read-only
|
|
71
|
+
# Nota: /var/tmp è su overlay (tmpfs), quindi è in RAM.
|
|
72
|
+
TEMP_HOME_IMG="/var/tmp/home.img"
|
|
73
|
+
log "Copying home.img to RAM..."
|
|
74
|
+
cp "$ORIG_HOME_IMG" "$TEMP_HOME_IMG"
|
|
75
|
+
HOME_IMG="$TEMP_HOME_IMG" # Da ora in poi usiamo la copia in RAM
|
|
76
|
+
log "home.img copied to $HOME_IMG"
|
|
77
|
+
|
|
78
|
+
# Verifica dimensione file
|
|
79
|
+
IMG_SIZE=$(stat -c %s "$HOME_IMG")
|
|
80
|
+
log "home.img size: $((IMG_SIZE / 1024 / 1024))MB"
|
|
81
|
+
|
|
82
|
+
# Verifica se è un volume LUKS
|
|
83
|
+
if ! cryptsetup isLuks "$HOME_IMG" 2>&1 | tee -a "$LOG_FILE"; then
|
|
84
|
+
log_error "$HOME_IMG is not a valid LUKS volume"
|
|
85
|
+
exit 1
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
log "Verified: home.img is a valid LUKS volume"
|
|
89
|
+
|
|
90
|
+
# Aspetta che il TTY sia completamente inizializzato
|
|
91
|
+
sleep 2
|
|
92
|
+
|
|
93
|
+
# Pulisci eventuale device mapper precedente
|
|
94
|
+
if [ -e "/dev/mapper/$LUKS_NAME" ]; then
|
|
95
|
+
log "LUKS device already exists, closing it first..."
|
|
96
|
+
cryptsetup close "$LUKS_NAME" 2>&1 | tee -a "$LOG_FILE" || true
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# --- LOGICA RICHIESTA PASSWORD (CON PLYMOUTH) ---
|
|
100
|
+
MAX_ATTEMPTS=3
|
|
101
|
+
ATTEMPT=1
|
|
102
|
+
UNLOCKED=0 # Flag per sapere se abbiamo sbloccato
|
|
103
|
+
|
|
104
|
+
while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do
|
|
105
|
+
log "Unlock attempt $ATTEMPT of $MAX_ATTEMPTS"
|
|
106
|
+
|
|
107
|
+
# Controlla se Plymouth è attivo
|
|
108
|
+
if plymouth --ping 2>/dev/null; then
|
|
109
|
+
log "Plymouth active. Asking for password via Plymouth..."
|
|
110
|
+
|
|
111
|
+
# Chiede a Plymouth, passa la password a cryptsetup via stdin
|
|
112
|
+
if plymouth ask-for-password --prompt="Enter passphrase for /home ($ATTEMPT/$MAX_ATTEMPTS)" | cryptsetup open "$HOME_IMG" "$LUKS_NAME" --key-file - 2>&1 | tee -a "$LOG_FILE"; then
|
|
113
|
+
log "LUKS volume unlocked successfully via Plymouth"
|
|
114
|
+
UNLOCKED=1
|
|
115
|
+
break
|
|
116
|
+
else
|
|
117
|
+
log_error "Failed to unlock LUKS volume via Plymouth (attempt $ATTEMPT)"
|
|
118
|
+
if [ $ATTEMPT -lt $MAX_ATTEMPTS ]; then
|
|
119
|
+
plymouth display-message --text="Incorrect passphrase. Try again..."
|
|
120
|
+
sleep 2 # Dà tempo di leggere il messaggio
|
|
121
|
+
fi
|
|
122
|
+
fi
|
|
123
|
+
else
|
|
124
|
+
# Fallback: Plymouth non attivo (o fallito)
|
|
125
|
+
log "Plymouth not active. Asking for password via console..."
|
|
126
|
+
|
|
127
|
+
# Stampa il prompt (già presente nel tuo script originale)
|
|
128
|
+
echo ""
|
|
129
|
+
echo "╔════════════════════════════════════════╗"
|
|
130
|
+
echo "║ Encrypted Home Directory Detected ║"
|
|
131
|
+
echo "╚════════════════════════════════════════╝"
|
|
132
|
+
echo ""
|
|
133
|
+
echo "Please enter your passphrase to unlock your home directory ($ATTEMPT/$MAX_ATTEMPTS)"
|
|
134
|
+
echo "(Press Ctrl+C to skip and continue with temporary home)"
|
|
135
|
+
echo ""
|
|
136
|
+
|
|
137
|
+
if cryptsetup open "$HOME_IMG" "$LUKS_NAME" 2>&1 | tee -a "$LOG_FILE"; then
|
|
138
|
+
log "LUKS volume unlocked successfully via console"
|
|
139
|
+
UNLOCKED=1
|
|
140
|
+
break
|
|
141
|
+
else
|
|
142
|
+
log_error "Failed to unlock LUKS volume (attempt $ATTEMPT)"
|
|
143
|
+
if [ $ATTEMPT -lt $MAX_ATTEMPTS ]; then
|
|
144
|
+
echo "Incorrect passphrase. Please try again."
|
|
145
|
+
fi
|
|
146
|
+
fi
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
ATTEMPT=$((ATTEMPT + 1))
|
|
150
|
+
done
|
|
151
|
+
# --- FINE LOGICA RICHIESTA PASSWORD ---
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
# Controlla se lo sblocco è fallito dopo tutti i tentativi
|
|
155
|
+
if [ $UNLOCKED -eq 0 ]; then
|
|
156
|
+
log_error "Maximum attempts reached. Continuing without encrypted home."
|
|
157
|
+
echo ""
|
|
158
|
+
echo "╔════════════════════════════════════════╗"
|
|
159
|
+
echo "║ Failed to unlock encrypted home ║"
|
|
160
|
+
echo "║ System will continue with default ║"
|
|
161
|
+
echo "╚════════════════════════════════════════╝"
|
|
162
|
+
echo ""
|
|
163
|
+
|
|
164
|
+
if plymouth --ping 2>/dev/null; then
|
|
165
|
+
plymouth display-message --text="Failed to unlock. Continuing with temporary home..."
|
|
166
|
+
sleep 3
|
|
167
|
+
plymouth quit
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
sleep 3
|
|
171
|
+
exit 0 # Esce senza errore, per permettere al sistema di continuare
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
# Verifica che il device mapper esista
|
|
175
|
+
if [ ! -e "/dev/mapper/$LUKS_NAME" ]; then
|
|
176
|
+
log_error "Device /dev/mapper/$LUKS_NAME not found after unlock"
|
|
177
|
+
exit 1
|
|
178
|
+
fi
|
|
179
|
+
|
|
180
|
+
log "LUKS device available at /dev/mapper/$LUKS_NAME"
|
|
181
|
+
|
|
182
|
+
# Crea mount point
|
|
183
|
+
mkdir -p "$MOUNT_POINT"
|
|
184
|
+
|
|
185
|
+
# Monta il filesystem
|
|
186
|
+
log "Mounting decrypted volume to $MOUNT_POINT"
|
|
187
|
+
if mount "/dev/mapper/$LUKS_NAME" "$MOUNT_POINT" 2>&1 | tee -a "$LOG_FILE"; then
|
|
188
|
+
log "Home directory mounted successfully"
|
|
189
|
+
else
|
|
190
|
+
log_error "Failed to mount decrypted volume"
|
|
191
|
+
# cryptsetup close è gestito dalla trap 'cleanup'
|
|
192
|
+
exit 1
|
|
193
|
+
fi
|
|
194
|
+
|
|
195
|
+
# Rimuovi la copia in RAM, non serve più
|
|
196
|
+
log "Cleaning up temporary copy: $HOME_IMG"
|
|
197
|
+
rm -f "$HOME_IMG" 2>/dev/null || true
|
|
198
|
+
|
|
199
|
+
# Ripristina gli utenti se esistono
|
|
200
|
+
if [ -d "$MOUNT_POINT/.system-backup" ]; then
|
|
201
|
+
log "Restoring user accounts..."
|
|
202
|
+
|
|
203
|
+
# Rimuovi utente live temporaneo
|
|
204
|
+
if id live >/dev/null 2>&1; then
|
|
205
|
+
log "Removing temporary 'live' user"
|
|
206
|
+
userdel -r live 2>&1 | tee -a "$LOG_FILE" || true
|
|
207
|
+
fi
|
|
208
|
+
|
|
209
|
+
# Ripristina gli utenti (NOTA: hai duplicato questo blocco nel tuo script originale, l'ho corretto)
|
|
210
|
+
if [ -f "$MOUNT_POINT/.system-backup/passwd" ]; then
|
|
211
|
+
cat "$MOUNT_POINT/.system-backup/passwd" >> /etc/passwd
|
|
212
|
+
log "Restored $(wc -l < "$MOUNT_POINT/.system-backup/passwd") user entries"
|
|
213
|
+
fi
|
|
214
|
+
|
|
215
|
+
if [ -f "$MOUNT_POINT/.system-backup/shadow" ]; then
|
|
216
|
+
cat "$MOUNT_POINT/.system-backup/shadow" >> /etc/shadow
|
|
217
|
+
fi
|
|
218
|
+
|
|
219
|
+
# Ripristina i gruppi (sostituisci completamente)
|
|
220
|
+
if [ -f "$MOUNT_POINT/.system-backup/group" ]; then
|
|
221
|
+
cp "$MOUNT_POINT/.system-backup/group" /etc/group
|
|
222
|
+
log "Restored group memberships"
|
|
223
|
+
fi
|
|
224
|
+
|
|
225
|
+
if [ -f "$MOUNT_POINT/.system-backup/gshadow" ]; then
|
|
226
|
+
cp "$MOUNT_POINT/.system-backup/gshadow" /etc/gshadow
|
|
227
|
+
fi
|
|
228
|
+
|
|
229
|
+
log "User accounts restored successfully"
|
|
230
|
+
|
|
231
|
+
# Riavvia display manager per ricaricare gli utenti
|
|
232
|
+
log "Restarting display manager..."
|
|
233
|
+
if systemctl is-active --quiet gdm; then
|
|
234
|
+
systemctl restart gdm 2>&1 | tee -a "$LOG_FILE"
|
|
235
|
+
log "GDM restarted"
|
|
236
|
+
elif systemctl is-active --quiet lightdm; then
|
|
237
|
+
systemctl restart lightdm 2>&1 | tee -a "$LOG_FILE"
|
|
238
|
+
log "LightDM restarted"
|
|
239
|
+
elif systemctl is-active --quiet sddm; then
|
|
240
|
+
systemctl restart sddm 2>&1 | tee -a "$LOG_FILE"
|
|
241
|
+
log "SDDM restarted"
|
|
242
|
+
else
|
|
243
|
+
log "No active display manager found to restart"
|
|
244
|
+
fi
|
|
245
|
+
else
|
|
246
|
+
log "No .system-backup directory found. Assuming /home is just data."
|
|
247
|
+
fi
|
|
248
|
+
|
|
249
|
+
log "=== Encrypted home mount completed successfully ==="
|
|
250
|
+
|
|
251
|
+
# Notifica a Plymouth (se attivo) che abbiamo finito
|
|
252
|
+
if plymouth --ping 2>/dev/null; then
|
|
253
|
+
plymouth quit
|
|
254
|
+
fi
|
|
255
|
+
|
|
256
|
+
# Non fare cleanup al successo
|
|
257
|
+
trap - EXIT
|
|
258
|
+
|
|
259
|
+
exit 0
|