penguins-eggs 25.12.7 → 25.12.16
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 +47 -760
- package/README.pdf +13450 -14838
- package/addons/eggs/adapt/applications/eggs-adapt.desktop +0 -0
- package/addons/eggs/pve/applications/eggs-pve.desktop +0 -0
- package/addons/eggs/rsupport/applications/eggs-rsupport.desktop +0 -0
- package/addons/eggs/theme/applications/install-system.desktop +0 -0
- package/addons/eggs/theme/livecd/simple.grub.main.cfg +3 -3
- package/assets/calamares/install-system.sh +0 -0
- package/assets/penguins-eggs.desktop +0 -0
- package/assets/penguins-krill.desktop +0 -0
- package/assets/penguins-links-add.desktop +0 -0
- package/assets/penguins-live-installer.desktop +0 -0
- package/bin/dev.js +0 -0
- package/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/machineid-openrc.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/cleanup/cleanup.sh +1 -1
- package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/fedora/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
- package/conf/distros/focal/calamares/calamares-modules/cleanup/cleanup.sh +1 -1
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/focal/calamares/libexec/calamares-aptsources.sh +0 -0
- package/conf/distros/focal/calamares/libexec/calamares-l10n-helper.sh +0 -0
- package/conf/distros/focal/calamares/libexec/calamares-logs-helper.sh +0 -0
- package/conf/distros/focal/calamares/libexec/calamares-nomodeset.sh +0 -0
- package/conf/distros/noble/calamares/calamares-modules/cleanup/cleanup.sh +1 -1
- package/conf/distros/noble/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-aptsources.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-l10n-helper.sh +2 -1
- package/conf/distros/noble/calamares/libexec/calamares-logs-helper.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-nomodeset.sh +0 -0
- package/conf/distros/noble/calamares/settings.yml +1 -0
- package/conf/distros/opensuse/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
- package/conf/distros/opensuse/calamares/settings.yml +0 -0
- package/conf/distros/opensuse/calamares/zstd2lzo.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/cleanup/cleanup.sh +1 -1
- package/conf/distros/trixie/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/init/unattended.sh +0 -0
- package/dist/bin/dev.js +0 -0
- package/dist/bin/run.js +0 -0
- 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-support-systemd.d.ts +12 -0
- package/dist/classes/ovary.d/luks-home-support-systemd.js +70 -0
- package/dist/classes/ovary.d/luks-home-support.d.ts +1 -0
- package/dist/classes/ovary.d/luks-home-support.js +101 -24
- 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/prepare.js +6 -2
- 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/remove-homecrypt-hack.d.ts +13 -0
- package/dist/krill/classes/sequence.d/remove-homecrypt-hack.js +65 -0
- package/dist/krill/classes/sequence.d/unpackfs.js +2 -2
- package/dist/krill/classes/sequence.d.ts +3 -5
- package/dist/krill/classes/sequence.js +31 -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/dracut/modules.d/00debug-shell/debug-hook.sh +0 -0
- package/dracut/modules.d/00debug-shell/module-setup.sh +0 -0
- package/dracut/modules.d/90block/block-cmdline.sh +0 -0
- package/dracut/modules.d/90block/module-setup.sh +0 -0
- package/dracut/modules.d/95iso-scan/iso-scan-fallback.sh +0 -0
- package/dracut/modules.d/95iso-scan/iso-scan.sh +0 -0
- package/dracut/modules.d/95iso-scan/module-setup.sh +0 -0
- package/dracut/modules.d/95luks-loop/luks-loop.sh +0 -0
- package/dracut/modules.d/95luks-loop/module-setup.sh +0 -0
- package/eui/eui-autostart-cinnamon.desktop +0 -0
- package/eui/eui-autostart-xfce.desktop +0 -0
- package/eui/eui-create-image.sh +0 -0
- package/eui/eui-start.sh +0 -0
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +8 -8
- package/package.json +130 -124
- package/perrisbrewery/scripts/postinst +0 -0
- package/perrisbrewery/scripts/postrm +0 -0
- package/perrisbrewery/scripts/preinst +0 -0
- package/perrisbrewery/scripts/prerm +0 -0
- package/scripts/99clean +0 -0
- package/scripts/adapt.sh +0 -0
- package/scripts/boot-encrypted-root.sh +0 -0
- package/scripts/bros/waydroid-helper.sh +0 -0
- package/scripts/lsb_release +0 -0
- package/scripts/mom.sh +0 -0
- package/scripts/mount-encrypted-home.sh +0 -0
- package/scripts/pve-live.service +0 -0
- package/scripts/pve-live.sh +0 -0
- package/scripts/restore_homecrypt_krill.sh +93 -0
- package/scripts/resy +0 -0
package/package.json
CHANGED
|
@@ -1,127 +1,133 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
],
|
|
85
|
-
"homepage": "https://penguins-eggs.net",
|
|
86
|
-
"keywords": [
|
|
87
|
-
"oclif",
|
|
88
|
-
"remaster",
|
|
89
|
-
"system"
|
|
90
|
-
],
|
|
91
|
-
"license": "MIT",
|
|
92
|
-
"main": "dist/index.js",
|
|
93
|
-
"type": "module",
|
|
94
|
-
"oclif": {
|
|
95
|
-
"bin": "eggs",
|
|
96
|
-
"dirname": "penguins-eggs",
|
|
97
|
-
"commands": "./dist/commands",
|
|
98
|
-
"plugins": [
|
|
99
|
-
"@oclif/plugin-help",
|
|
100
|
-
"@oclif/plugin-autocomplete",
|
|
101
|
-
"@oclif/plugin-version"
|
|
2
|
+
"name": "penguins-eggs",
|
|
3
|
+
"shortName": "eggs",
|
|
4
|
+
"description": "A remaster system tool, compatible with Almalinux, Alpine, Arch, Debian, Devuan, Fedora, Manjaro, Opensuse, Ubuntu and derivatives",
|
|
5
|
+
"version": "25.12.16",
|
|
6
|
+
"author": "Piero Proietti",
|
|
7
|
+
"bin": {
|
|
8
|
+
"eggs": "./bin/run.js"
|
|
9
|
+
},
|
|
10
|
+
"bugs": "https://github.com/pieroproietti/penguins-eggs/issues",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@oclif/core": "^4.8.0",
|
|
13
|
+
"@oclif/plugin-autocomplete": "^3.2.39",
|
|
14
|
+
"@oclif/plugin-help": "^6.2.36",
|
|
15
|
+
"@oclif/plugin-version": "^2.2.36",
|
|
16
|
+
"@types/express": "^5.0.6",
|
|
17
|
+
"ansis": "^4.2.0",
|
|
18
|
+
"axios": "^1.13.2",
|
|
19
|
+
"bcryptjs": "^3.0.3",
|
|
20
|
+
"chalk": "^5.6.2",
|
|
21
|
+
"cli-cursor": "^5.0.0",
|
|
22
|
+
"debug": "^4.4.3",
|
|
23
|
+
"express": "^5.2.1",
|
|
24
|
+
"ink": "^5",
|
|
25
|
+
"ink-progress-bar": "^3.0.0",
|
|
26
|
+
"ink-spinner": "^5.0.0",
|
|
27
|
+
"inquirer": "^12.11.0",
|
|
28
|
+
"js-yaml": "^4.1.1",
|
|
29
|
+
"mustache": "^4.2.0",
|
|
30
|
+
"netmask": "^2.0.2",
|
|
31
|
+
"react": "^18.3.1",
|
|
32
|
+
"read": "^4.1.0",
|
|
33
|
+
"systeminformation": "^5.27.11",
|
|
34
|
+
"tftp": "^0.1.2",
|
|
35
|
+
"ws": "^8.18.3"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@oclif/prettier-config": "^0.2.1",
|
|
39
|
+
"@oclif/test": "^4.1.15",
|
|
40
|
+
"@types/bcryptjs": "^3.0.0",
|
|
41
|
+
"@types/chai": "^5.2.3",
|
|
42
|
+
"@types/debug": "^4.1.12",
|
|
43
|
+
"@types/glob": "^9.0.0",
|
|
44
|
+
"@types/inquirer": "^9.0.9",
|
|
45
|
+
"@types/js-yaml": "^4.0.9",
|
|
46
|
+
"@types/mocha": "^10.0.8",
|
|
47
|
+
"@types/mustache": "^4.2.6",
|
|
48
|
+
"@types/netmask": "^2.0.6",
|
|
49
|
+
"@types/node": "^22.15.30",
|
|
50
|
+
"@types/react": "^18.3.18",
|
|
51
|
+
"@types/read": "^0.0.32",
|
|
52
|
+
"@types/ws": "^8.18.1",
|
|
53
|
+
"chai": "^6.2.1",
|
|
54
|
+
"eslint": "^9.39.1",
|
|
55
|
+
"eslint-config-oclif": "^6.0.126",
|
|
56
|
+
"eslint-config-prettier": "^10.1.8",
|
|
57
|
+
"glob": "^13.0.0",
|
|
58
|
+
"mocha": "^11.7.5",
|
|
59
|
+
"oclif": "^4.22.57",
|
|
60
|
+
"perrisbrewery": "^25.9.16",
|
|
61
|
+
"prettier": "^3.7.4",
|
|
62
|
+
"shx": "^0.4.0",
|
|
63
|
+
"ts-node": "10.9.2",
|
|
64
|
+
"ts-prune": "^0.10.3",
|
|
65
|
+
"typescript": "^5.9.3"
|
|
66
|
+
},
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=22.0.0"
|
|
69
|
+
},
|
|
70
|
+
"files": [
|
|
71
|
+
".oclif.manifest.json",
|
|
72
|
+
"/addons",
|
|
73
|
+
"/assets",
|
|
74
|
+
"/bin",
|
|
75
|
+
"/conf",
|
|
76
|
+
"/dist",
|
|
77
|
+
"/dracut",
|
|
78
|
+
"/eui",
|
|
79
|
+
"/manpages",
|
|
80
|
+
"/mkinitcpio",
|
|
81
|
+
"/mkinitfs",
|
|
82
|
+
"/perrisbrewery",
|
|
83
|
+
"/scripts"
|
|
102
84
|
],
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
"
|
|
107
|
-
|
|
85
|
+
"homepage": "https://penguins-eggs.net",
|
|
86
|
+
"keywords": [
|
|
87
|
+
"oclif",
|
|
88
|
+
"remaster",
|
|
89
|
+
"system"
|
|
90
|
+
],
|
|
91
|
+
"license": "MIT",
|
|
92
|
+
"main": "dist/index.js",
|
|
93
|
+
"type": "module",
|
|
94
|
+
"oclif": {
|
|
95
|
+
"bin": "eggs",
|
|
96
|
+
"dirname": "penguins-eggs",
|
|
97
|
+
"commands": "./dist/commands",
|
|
98
|
+
"plugins": [
|
|
99
|
+
"@oclif/plugin-help",
|
|
100
|
+
"@oclif/plugin-autocomplete",
|
|
101
|
+
"@oclif/plugin-version"
|
|
102
|
+
],
|
|
103
|
+
"topicSeparator": " ",
|
|
104
|
+
"topics": {
|
|
105
|
+
"hello": {
|
|
106
|
+
"description": "Say hello to the world and others"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"repository": "pieroproietti/penguins-eggs",
|
|
111
|
+
"scripts": {
|
|
112
|
+
"appimage": "pnpm build && ./appimage.sh",
|
|
113
|
+
"build": "pnpm clean && shx rm -rf dist && tsc -p . && oclif manifest",
|
|
114
|
+
"clean": "rm -rf build dist *.AppImage AppDir",
|
|
115
|
+
"deb": "pnpm build && pb deb --release $(cat ./release)",
|
|
116
|
+
"format": "prettier --write \"+(src|test)/**/*.+(ts|js|json)\"",
|
|
117
|
+
"lint": "eslint . --ext .ts",
|
|
118
|
+
"manifest": "oclif manifest",
|
|
119
|
+
"postbuild": "shx cp -r bin dist/",
|
|
120
|
+
"posttest": "pnpm run lint",
|
|
121
|
+
"tarballs": "shx rm -rf dist && tsc -p . && oclif manifest && oclif pack tarballs -t linux-x64 --no-xz -r . && pb tarballs --release $(cat ./release)",
|
|
122
|
+
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
123
|
+
"unused": "ts-prune",
|
|
124
|
+
"version": "oclif readme && git add README.md"
|
|
125
|
+
},
|
|
126
|
+
"types": "dist/index.d.ts",
|
|
127
|
+
"pnpm": {
|
|
128
|
+
"overrides": {
|
|
129
|
+
"react": "^18.3.1",
|
|
130
|
+
"@types/react": "^18.3.18"
|
|
131
|
+
}
|
|
108
132
|
}
|
|
109
|
-
|
|
110
|
-
"repository": "pieroproietti/penguins-eggs",
|
|
111
|
-
"types": "dist/index.d.ts",
|
|
112
|
-
"scripts": {
|
|
113
|
-
"appimage": "pnpm build && ./appimage.sh",
|
|
114
|
-
"build": "pnpm clean && shx rm -rf dist && tsc -p . && oclif manifest",
|
|
115
|
-
"clean": "rm -rf build dist *.AppImage AppDir",
|
|
116
|
-
"deb": "pnpm build && pb deb --release $(cat ./release)",
|
|
117
|
-
"format": "prettier --write \"+(src|test)/**/*.+(ts|js|json)\"",
|
|
118
|
-
"lint": "eslint . --ext .ts",
|
|
119
|
-
"manifest": "oclif manifest",
|
|
120
|
-
"postbuild": "shx cp -r bin dist/",
|
|
121
|
-
"posttest": "pnpm run lint",
|
|
122
|
-
"tarballs": "shx rm -rf dist && tsc -p . && oclif manifest && oclif pack tarballs -t linux-x64 --no-xz -r . && pb tarballs --release $(cat ./release)",
|
|
123
|
-
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
124
|
-
"unused": "ts-prune",
|
|
125
|
-
"version": "oclif readme && git add README.md"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
133
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/scripts/99clean
CHANGED
|
File without changes
|
package/scripts/adapt.sh
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/scripts/lsb_release
CHANGED
|
File without changes
|
package/scripts/mom.sh
CHANGED
|
File without changes
|
|
File without changes
|
package/scripts/pve-live.service
CHANGED
|
File without changes
|
package/scripts/pve-live.sh
CHANGED
|
File without changes
|
|
@@ -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
|
package/scripts/resy
CHANGED
|
File without changes
|