penguins-eggs 25.12.7 → 25.12.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.oclif.manifest.json +1 -1
- package/README.md +74 -45
- package/README.pdf +13450 -14838
- package/addons/eggs/theme/livecd/simple.grub.main.cfg +3 -3
- package/conf/distros/buster/calamares/calamares-modules/cleanup/cleanup.sh +1 -1
- package/conf/distros/focal/calamares/calamares-modules/cleanup/cleanup.sh +1 -1
- package/conf/distros/noble/calamares/calamares-modules/cleanup/cleanup.sh +1 -1
- package/conf/distros/noble/calamares/libexec/calamares-l10n-helper.sh +2 -1
- package/conf/distros/noble/calamares/settings.yml +1 -0
- package/conf/distros/trixie/calamares/calamares-modules/cleanup/cleanup.sh +1 -1
- package/dist/classes/cli-autologin.d.ts +37 -4
- package/dist/classes/cli-autologin.js +125 -112
- package/dist/classes/daddy.js +4 -1
- package/dist/classes/incubation/fisherman-helper/initcpio.d.ts +3 -2
- package/dist/classes/incubation/fisherman-helper/initcpio.js +25 -20
- package/dist/classes/incubation/incubator.d/manjaro.js +1 -0
- package/dist/classes/ovary.d/edit-live-fs.d.ts +1 -1
- package/dist/classes/ovary.d/edit-live-fs.js +15 -122
- package/dist/classes/ovary.d/fertilization.js +1 -1
- package/dist/classes/ovary.d/luks-home.js +33 -19
- package/dist/classes/ovary.d/luks-root.d.ts +1 -2
- package/dist/classes/ovary.d/luks-root.js +46 -27
- package/dist/classes/ovary.d/luks-shrink.d.ts +14 -0
- package/dist/classes/ovary.d/luks-shrink.js +86 -0
- package/dist/classes/ovary.d/produce.js +63 -21
- package/dist/classes/ovary.d.ts +3 -1
- package/dist/classes/ovary.js +3 -1
- package/dist/classes/utils.js +1 -1
- package/dist/classes/yolk.js +1 -1
- package/dist/commands/produce.js +11 -7
- package/dist/interfaces/calamares/i-calamares-branding.d.ts +56 -38
- package/dist/interfaces/calamares/i-calamares-branding.js +10 -0
- package/dist/krill/classes/prepare.d/users.js +1 -1
- package/dist/krill/classes/sequence.d/fstab.js +1 -1
- package/dist/krill/classes/sequence.d/mkfs.js +1 -1
- package/dist/krill/classes/sequence.d/unpackfs.js +2 -2
- package/dist/krill/classes/sequence.d.ts +1 -5
- package/dist/krill/classes/sequence.js +26 -29
- package/dist/krill/components/finished.js +2 -2
- package/dist/krill/components/install.js +2 -2
- package/dist/krill/components/keyboard.js +2 -2
- package/dist/krill/components/location.js +2 -2
- package/dist/krill/components/network.js +2 -2
- package/dist/krill/components/partitions.js +2 -2
- package/dist/krill/components/summary.js +2 -2
- package/dist/krill/components/users.js +2 -2
- package/dist/krill/components/welcome.js +2 -2
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.js +46 -0
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +8 -8
- package/package.json +2 -2
- package/scripts/restore_homecrypt_krill.sh +93 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# ==============================================================================
|
|
4
|
+
# SCRIPT DI RIPRISTINO DATI UTENTE CRITTOGRAFATI (--HOMECRYPT) PER KRILL
|
|
5
|
+
# LIVE_HOME_DEVICE $1 device LUKS già sbloccato
|
|
6
|
+
# TARGET_ROOT $2 root di destinazione
|
|
7
|
+
# ==============================================================================
|
|
8
|
+
|
|
9
|
+
# --- Variabili di Configurazione ---
|
|
10
|
+
LIVE_HOME_DEVICE="$1"
|
|
11
|
+
TARGET_ROOT="$2"
|
|
12
|
+
|
|
13
|
+
RESTORE_MNTPOINT="/tmp/live_home_restore"
|
|
14
|
+
TARGET_HOME_MNTPOINT="${TARGET_ROOT}/home"
|
|
15
|
+
BACKUP_DIR="${RESTORE_MNTPOINT}/.system-backup"
|
|
16
|
+
|
|
17
|
+
# 1. Verifica Condizione Cruciale: Il volume LUKS è sbloccato?
|
|
18
|
+
if [ ! -b "${LIVE_HOME_DEVICE}" ]; then
|
|
19
|
+
exit 0
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# 2. Montaggio del Volume Decrittato (solo lettura)
|
|
23
|
+
mkdir -p "${RESTORE_MNTPOINT}"
|
|
24
|
+
if ! mount -o ro "${LIVE_HOME_DEVICE}" "${RESTORE_MNTPOINT}"; then
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# 3. Copia Ricorsiva dei Dati Utente
|
|
29
|
+
rsync -aH "${RESTORE_MNTPOINT}/" "${TARGET_HOME_MNTPOINT}/"
|
|
30
|
+
|
|
31
|
+
# 4. Ripristino dei File di Sistema (`.system-backup`)
|
|
32
|
+
if [ -d "${BACKUP_DIR}" ]; then
|
|
33
|
+
|
|
34
|
+
# 4.1. Ripristino /etc/passwd e /etc/shadow
|
|
35
|
+
# Aggiunge utenti con UID >= 1000, evitando duplicati
|
|
36
|
+
while IFS=: read -r username password uid gid gecos home shell; do
|
|
37
|
+
if ! grep -q "^${username}:" ${TARGET_ROOT}/etc/passwd; then
|
|
38
|
+
# La ridirezione >> è ora eseguita dal processo principale
|
|
39
|
+
echo "${username}:${password}:${uid}:${gid}:${gecos}:${home}:${shell}" >> ${TARGET_ROOT}/etc/passwd
|
|
40
|
+
grep "^${username}:" ${BACKUP_DIR}/shadow >> ${TARGET_ROOT}/etc/shadow
|
|
41
|
+
fi
|
|
42
|
+
done < ${BACKUP_DIR}/passwd
|
|
43
|
+
|
|
44
|
+
# 4.2. Ripristino Group/Gshadow (sovrascrittura)
|
|
45
|
+
#echo " - Ripristino file /etc/group e /etc/gshadow."
|
|
46
|
+
cp ${BACKUP_DIR}/group ${TARGET_ROOT}/etc/group
|
|
47
|
+
cp ${BACKUP_DIR}/gshadow ${TARGET_ROOT}/etc/gshadow
|
|
48
|
+
|
|
49
|
+
# 4.3. Ripristino Configurazioni Display Manager
|
|
50
|
+
[ -d ${BACKUP_DIR}/gdm3 ] && rsync -ah ${BACKUP_DIR}/gdm3 ${TARGET_ROOT}/etc/
|
|
51
|
+
[ -d ${BACKUP_DIR}/gdm ] && rsync -ah ${BACKUP_DIR}/gdm ${TARGET_ROOT}/etc/
|
|
52
|
+
[ -d ${BACKUP_DIR}/lightdm ] && rsync -ah ${BACKUP_DIR}/lightdm ${TARGET_ROOT}/etc/
|
|
53
|
+
[ -e ${BACKUP_DIR}/sddm.conf ] && cp -a ${BACKUP_DIR}/sddm.conf ${TARGET_ROOT}/etc/
|
|
54
|
+
[ -d ${BACKUP_DIR}/sddm.conf.d ] && rsync -ah ${BACKUP_DIR}/sddm.conf.d ${TARGET_ROOT}/etc/
|
|
55
|
+
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# 5. CORREZIONE DEI PERMESSI UTENTE (la parte mancante)
|
|
59
|
+
|
|
60
|
+
# Itera su tutte le directory utente all'interno del mountpoint di ripristino
|
|
61
|
+
find "${RESTORE_MNTPOINT}" -maxdepth 1 -mindepth 1 -type d ! -name '.system-backup' | while read dir_path; do
|
|
62
|
+
|
|
63
|
+
username=$(basename "${dir_path}")
|
|
64
|
+
|
|
65
|
+
# Escludi la directory root se dovesse essere presente
|
|
66
|
+
if [ "${username}" != "root" ]; then
|
|
67
|
+
|
|
68
|
+
# Recupera l'UID, GID e la directory home dal file passwd del TARGET
|
|
69
|
+
# Nota: Usiamo grep e awk per leggere l'utente dal file ripristinato
|
|
70
|
+
user_info=$(grep "^${username}:" "${TARGET_ROOT}/etc/passwd")
|
|
71
|
+
|
|
72
|
+
if [ -n "$user_info" ]; then
|
|
73
|
+
# Estrai UID e GID dal record in TARGET/etc/passwd
|
|
74
|
+
uid_target=$(echo "$user_info" | awk -F: '{print $3}')
|
|
75
|
+
gid_target=$(echo "$user_info" | awk -F: '{print $4}')
|
|
76
|
+
|
|
77
|
+
# Esegui chown ricorsivo sulla directory home del target
|
|
78
|
+
if [ -d "${TARGET_HOME_MNTPOINT}/${username}" ]; then
|
|
79
|
+
chown -R "${uid_target}:${gid_target}" "${TARGET_HOME_MNTPOINT}/${username}"
|
|
80
|
+
fi
|
|
81
|
+
fi
|
|
82
|
+
fi
|
|
83
|
+
done
|
|
84
|
+
|
|
85
|
+
# Rimuovi la directory di backup dalla home utente nel sistema installato
|
|
86
|
+
rm -rf ${TARGET_HOME_MNTPOINT}/.system-backup
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
# 6. Pulizia Finale
|
|
90
|
+
umount "${RESTORE_MNTPOINT}"
|
|
91
|
+
rmdir "${RESTORE_MNTPOINT}"
|
|
92
|
+
|
|
93
|
+
exit 0
|