penguins-eggs 25.10.24 → 25.10.26
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 +28 -28
- 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/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 +0 -0
- 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 +0 -0
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/noble/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- 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 +0 -0
- 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/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 +0 -0
- 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/classes/ovary.d/luks-home.js +11 -4
- package/dist/classes/ovary.d/luks-interactive-crypto-config.d.ts +47 -0
- package/dist/classes/ovary.d/luks-interactive-crypto-config.js +135 -0
- package/dist/classes/ovary.d/luks-root-initrd.d.ts +1 -1
- package/dist/classes/ovary.d/luks-root-initrd.js +1 -1
- package/dist/classes/ovary.d/luks-root.js +35 -1
- package/dist/classes/ovary.d/produce.js +6 -0
- package/dist/classes/ovary.d.ts +3 -0
- package/dist/classes/ovary.js +3 -0
- package/dracut/create-symlink +0 -0
- package/dracut/export +0 -0
- package/dracut/export-dracut-analysis +0 -0
- package/dracut/export-dracut-log +0 -0
- package/dracut/mkisofs +0 -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/dracut/renew-initramfs +0 -0
- package/dracut/sbin2bin +0 -0
- package/dracut/update-dracut-conf-d +0 -0
- package/dracut/update-dracut-modules +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/package.json +124 -130
- 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 +138 -95
- 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 +130 -65
- package/scripts/pve-live.service +0 -0
- package/scripts/pve-live.sh +0 -0
- package/scripts/resy +0 -0
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
2
|
+
# This Bash script is used to unlock and mount a LUKS-encrypted home.img
|
|
3
|
+
# file for use as a /home directory, typically in a “live”
|
|
4
|
+
# operating system environment (booted from USB or DVD).
|
|
5
|
+
# v1.4 - Fixed 3-attempt loop by checking PIPESTATUS instead of pipe exit code.
|
|
6
|
+
# - Replaced non-breaking spaces with regular spaces.
|
|
5
7
|
|
|
8
|
+
# enable echo
|
|
6
9
|
set -e
|
|
7
10
|
|
|
8
|
-
#
|
|
11
|
+
# configuration
|
|
9
12
|
HOME_IMG="__HOME_IMG_PATH__"
|
|
10
13
|
LUKS_NAME="live-home"
|
|
11
14
|
MOUNT_POINT="/home"
|
|
15
|
+
|
|
16
|
+
# define path OverlayFS
|
|
17
|
+
# we will use /run che è un tmpfs (in RAM)
|
|
18
|
+
LOWER_DIR="/run/live-home-lower"
|
|
19
|
+
UPPER_DIR="/run/live-home-upper"
|
|
20
|
+
WORK_DIR="/run/live-home-work"
|
|
21
|
+
|
|
12
22
|
LOG_FILE="/var/log/mount-encrypted-home.log"
|
|
13
23
|
|
|
14
|
-
#
|
|
24
|
+
# logging
|
|
15
25
|
log() {
|
|
16
26
|
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" | tee -a "$LOG_FILE"
|
|
17
27
|
}
|
|
@@ -26,21 +36,20 @@ cleanup() {
|
|
|
26
36
|
if mountpoint -q "$MOUNT_POINT" 2>/dev/null; then
|
|
27
37
|
umount "$MOUNT_POINT" 2>/dev/null || true
|
|
28
38
|
fi
|
|
39
|
+
if mountpoint -q "$LOWER_DIR" 2>/dev/null; then
|
|
40
|
+
umount "$LOWER_DIR" 2>/dev/null || true
|
|
41
|
+
fi
|
|
29
42
|
if [ -e "/dev/mapper/$LUKS_NAME" ]; then
|
|
30
43
|
cryptsetup close "$LUKS_NAME" 2>/dev/null || true
|
|
31
44
|
fi
|
|
32
|
-
|
|
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
|
|
45
|
+
rmdir "$LOWER_DIR" "$UPPER_DIR" "$WORK_DIR" 2>/dev/null || true
|
|
37
46
|
}
|
|
38
47
|
|
|
39
48
|
trap cleanup EXIT
|
|
40
49
|
|
|
41
|
-
log "=== Starting encrypted home mount process (v1.
|
|
50
|
+
log "=== Starting encrypted home mount process (v1.4) ==="
|
|
42
51
|
|
|
43
|
-
#
|
|
52
|
+
# Check available memory
|
|
44
53
|
AVAILABLE_MEM=$(free -m | awk '/^Mem:/{print $7}')
|
|
45
54
|
log "Available memory: ${AVAILABLE_MEM}MB"
|
|
46
55
|
|
|
@@ -49,37 +58,28 @@ if [ "$AVAILABLE_MEM" -lt 1024 ]; then
|
|
|
49
58
|
log "This might cause issues with LUKS operations"
|
|
50
59
|
fi
|
|
51
60
|
|
|
52
|
-
#
|
|
61
|
+
# Wait for the media to become available (max 30 seconds)
|
|
53
62
|
log "Waiting for live media to be available..."
|
|
54
|
-
ORIG_HOME_IMG="$HOME_IMG" # Salva il path originale
|
|
55
63
|
COUNTER=0
|
|
56
|
-
while [ ! -f "$
|
|
64
|
+
while [ ! -f "$HOME_IMG" ] && [ $COUNTER -lt 30 ]; do
|
|
57
65
|
sleep 1
|
|
58
66
|
COUNTER=$((COUNTER + 1))
|
|
59
67
|
done
|
|
60
68
|
|
|
61
|
-
if [ ! -f "$
|
|
62
|
-
log_error "home.img not found at $
|
|
69
|
+
if [ ! -f "$HOME_IMG" ]; then
|
|
70
|
+
log_error "home.img not found at $HOME_IMG after 30 seconds"
|
|
63
71
|
log "Available mounts:"
|
|
64
72
|
mount | grep live | tee -a "$LOG_FILE"
|
|
65
73
|
exit 0
|
|
66
74
|
fi
|
|
67
75
|
|
|
68
|
-
log "Found home.img at $
|
|
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"
|
|
76
|
+
log "Found home.img at $HOME_IMG"
|
|
77
77
|
|
|
78
|
-
#
|
|
78
|
+
# Check file size
|
|
79
79
|
IMG_SIZE=$(stat -c %s "$HOME_IMG")
|
|
80
80
|
log "home.img size: $((IMG_SIZE / 1024 / 1024))MB"
|
|
81
81
|
|
|
82
|
-
#
|
|
82
|
+
# Check if it is a LUKS volume
|
|
83
83
|
if ! cryptsetup isLuks "$HOME_IMG" 2>&1 | tee -a "$LOG_FILE"; then
|
|
84
84
|
log_error "$HOME_IMG is not a valid LUKS volume"
|
|
85
85
|
exit 1
|
|
@@ -87,16 +87,19 @@ fi
|
|
|
87
87
|
|
|
88
88
|
log "Verified: home.img is a valid LUKS volume"
|
|
89
89
|
|
|
90
|
-
#
|
|
90
|
+
# Wait until the TTY is fully initialized
|
|
91
91
|
sleep 2
|
|
92
92
|
|
|
93
|
-
#
|
|
93
|
+
# Clean up any previous device mappers
|
|
94
94
|
if [ -e "/dev/mapper/$LUKS_NAME" ]; then
|
|
95
95
|
log "LUKS device already exists, closing it first..."
|
|
96
96
|
cryptsetup close "$LUKS_NAME" 2>&1 | tee -a "$LOG_FILE" || true
|
|
97
97
|
fi
|
|
98
98
|
|
|
99
|
-
#
|
|
99
|
+
# PASSWORD REQUEST
|
|
100
|
+
# disable 'set -e' to let 3 tempts
|
|
101
|
+
set +e
|
|
102
|
+
|
|
100
103
|
MAX_ATTEMPTS=3
|
|
101
104
|
ATTEMPT=1
|
|
102
105
|
UNLOCKED=0 # Flag per sapere se abbiamo sbloccato
|
|
@@ -104,37 +107,45 @@ UNLOCKED=0 # Flag per sapere se abbiamo sbloccato
|
|
|
104
107
|
while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do
|
|
105
108
|
log "Unlock attempt $ATTEMPT of $MAX_ATTEMPTS"
|
|
106
109
|
|
|
107
|
-
#
|
|
110
|
+
# Check if Plymouth is active
|
|
108
111
|
if plymouth --ping 2>/dev/null; then
|
|
109
112
|
log "Plymouth active. Asking for password via Plymouth..."
|
|
110
113
|
|
|
111
|
-
#
|
|
112
|
-
|
|
114
|
+
# Execute the command and check PIPESTATUS.
|
|
115
|
+
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"
|
|
116
|
+
|
|
117
|
+
# Check the status of cryptsetup (index 1), not tee (index 2)
|
|
118
|
+
# PIPESTATUS[0] = plymouth, [1] = cryptsetup, [2] = tee
|
|
119
|
+
if [ ${PIPESTATUS[1]} -eq 0 ]; then
|
|
113
120
|
log "LUKS volume unlocked successfully via Plymouth"
|
|
114
121
|
UNLOCKED=1
|
|
115
122
|
break
|
|
116
123
|
else
|
|
117
124
|
log_error "Failed to unlock LUKS volume via Plymouth (attempt $ATTEMPT)"
|
|
118
125
|
if [ $ATTEMPT -lt $MAX_ATTEMPTS ]; then
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
plymouth display-message --text="Incorrect passphrase. Try again..."
|
|
127
|
+
sleep 2 # Gives time to read the message
|
|
121
128
|
fi
|
|
122
129
|
fi
|
|
123
130
|
else
|
|
124
|
-
# Fallback: Plymouth
|
|
131
|
+
# Fallback: Plymouth not active. asking for password via console
|
|
125
132
|
log "Plymouth not active. Asking for password via console..."
|
|
126
133
|
|
|
127
|
-
# Stampa il prompt (già presente nel tuo script originale)
|
|
128
134
|
echo ""
|
|
129
135
|
echo "╔════════════════════════════════════════╗"
|
|
130
136
|
echo "║ Encrypted Home Directory Detected ║"
|
|
131
137
|
echo "╚════════════════════════════════════════╝"
|
|
132
138
|
echo ""
|
|
133
|
-
echo "Please enter your passphrase to unlock your
|
|
139
|
+
echo "Please enter your passphrase to unlock your data ($ATTEMPT/$MAX_ATTEMPTS)"
|
|
134
140
|
echo "(Press Ctrl+C to skip and continue with temporary home)"
|
|
135
141
|
echo ""
|
|
136
142
|
|
|
137
|
-
|
|
143
|
+
# Run the command and check PIPESTATUS
|
|
144
|
+
cryptsetup open "$HOME_IMG" "$LUKS_NAME" 2>&1 | tee -a "$LOG_FILE"
|
|
145
|
+
|
|
146
|
+
# Check the status of cryptsetup (index 0), not tee (index 1).
|
|
147
|
+
# PIPESTATUS[0] = cryptsetup, [1] = tee
|
|
148
|
+
if [ ${PIPESTATUS[0]} -eq 0 ]; then
|
|
138
149
|
log "LUKS volume unlocked successfully via console"
|
|
139
150
|
UNLOCKED=1
|
|
140
151
|
break
|
|
@@ -148,10 +159,12 @@ while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do
|
|
|
148
159
|
|
|
149
160
|
ATTEMPT=$((ATTEMPT + 1))
|
|
150
161
|
done
|
|
151
|
-
# --- FINE LOGICA RICHIESTA PASSWORD ---
|
|
152
162
|
|
|
153
163
|
|
|
154
|
-
#
|
|
164
|
+
# Check if unlocking failed after all attempts
|
|
165
|
+
# Enable echo
|
|
166
|
+
set -e
|
|
167
|
+
|
|
155
168
|
if [ $UNLOCKED -eq 0 ]; then
|
|
156
169
|
log_error "Maximum attempts reached. Continuing without encrypted home."
|
|
157
170
|
echo ""
|
|
@@ -168,10 +181,11 @@ if [ $UNLOCKED -eq 0 ]; then
|
|
|
168
181
|
fi
|
|
169
182
|
|
|
170
183
|
sleep 3
|
|
171
|
-
exit 0 #
|
|
184
|
+
exit 0 # Exits without error, allowing the system to continue
|
|
172
185
|
fi
|
|
173
186
|
|
|
174
|
-
|
|
187
|
+
|
|
188
|
+
# Verify that the device mapper exists
|
|
175
189
|
if [ ! -e "/dev/mapper/$LUKS_NAME" ]; then
|
|
176
190
|
log_error "Device /dev/mapper/$LUKS_NAME not found after unlock"
|
|
177
191
|
exit 1
|
|
@@ -179,34 +193,49 @@ fi
|
|
|
179
193
|
|
|
180
194
|
log "LUKS device available at /dev/mapper/$LUKS_NAME"
|
|
181
195
|
|
|
182
|
-
#
|
|
183
|
-
|
|
196
|
+
# Implementing OverlayFS
|
|
197
|
+
# 1. Create all necessary mount points and directories
|
|
198
|
+
log "Creating overlay directories..."
|
|
199
|
+
mkdir -p "$LOWER_DIR" "$UPPER_DIR" "$WORK_DIR" "$MOUNT_POINT"
|
|
184
200
|
|
|
185
|
-
#
|
|
186
|
-
log "Mounting decrypted volume to $
|
|
187
|
-
if mount "/dev/mapper/$LUKS_NAME" "$
|
|
188
|
-
|
|
189
|
-
else
|
|
190
|
-
log_error "Failed to mount decrypted volume"
|
|
191
|
-
# cryptsetup close è gestito dalla trap 'cleanup'
|
|
201
|
+
# 2. Mount the decrypted volume as read-only as 'lowerdir'
|
|
202
|
+
log "Mounting decrypted volume to $LOWER_DIR (read-only base)"
|
|
203
|
+
if ! mount -o ro "/dev/mapper/$LUKS_NAME" "$LOWER_DIR" 2>&1 | tee -a "$LOG_FILE"; then
|
|
204
|
+
log_error "Failed to mount decrypted volume (read-only) to $LOWER_DIR"
|
|
192
205
|
exit 1
|
|
193
206
|
fi
|
|
207
|
+
log "Read-only base mounted successfully."
|
|
208
|
+
|
|
209
|
+
# 3. create overlay read-write for /home
|
|
210
|
+
log "Mounting overlay filesystem to $MOUNT_POINT"
|
|
211
|
+
OVERLAY_OPTS="lowerdir=$LOWER_DIR,upperdir=$UPPER_DIR,workdir=$WORK_DIR"
|
|
212
|
+
# Add “index=off” and “metacopy=off” for compatibility
|
|
213
|
+
OVERLAY_OPTS="$OVERLAY_OPTS,index=off,metacopy=off"
|
|
214
|
+
|
|
215
|
+
if ! mount -t overlay -o "$OVERLAY_OPTS" overlay "$MOUNT_POINT" 2>&1 | tee -a "$LOG_FILE"; then
|
|
216
|
+
log_error "Failed to mount overlay filesystem to $MOUNT_POINT"
|
|
217
|
+
# Try without extra options if it fails
|
|
218
|
+
OVERLAY_OPTS="lowerdir=$LOWER_DIR,upperdir=$UPPER_DIR,workdir=$WORK_DIR"
|
|
219
|
+
log "Retrying overlay mount with basic options..."
|
|
220
|
+
if ! mount -t overlay -o "$OVERLAY_OPTS" overlay "$MOUNT_POINT" 2>&1 | tee -a "$LOG_FILE"; then
|
|
221
|
+
log_error "Failed to mount overlay filesystem to $MOUNT_POINT (retry failed)"
|
|
222
|
+
exit 1
|
|
223
|
+
fi
|
|
224
|
+
fi
|
|
225
|
+
log "Writable overlay for /home mounted successfully."
|
|
194
226
|
|
|
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
227
|
|
|
199
|
-
#
|
|
228
|
+
# Restore users if they exists
|
|
200
229
|
if [ -d "$MOUNT_POINT/.system-backup" ]; then
|
|
201
230
|
log "Restoring user accounts..."
|
|
202
231
|
|
|
203
|
-
#
|
|
232
|
+
# Remove temporary live user
|
|
204
233
|
if id live >/dev/null 2>&1; then
|
|
205
234
|
log "Removing temporary 'live' user"
|
|
206
235
|
userdel -r live 2>&1 | tee -a "$LOG_FILE" || true
|
|
207
236
|
fi
|
|
208
237
|
|
|
209
|
-
#
|
|
238
|
+
# Restore users
|
|
210
239
|
if [ -f "$MOUNT_POINT/.system-backup/passwd" ]; then
|
|
211
240
|
cat "$MOUNT_POINT/.system-backup/passwd" >> /etc/passwd
|
|
212
241
|
log "Restored $(wc -l < "$MOUNT_POINT/.system-backup/passwd") user entries"
|
|
@@ -216,7 +245,7 @@ if [ -d "$MOUNT_POINT/.system-backup" ]; then
|
|
|
216
245
|
cat "$MOUNT_POINT/.system-backup/shadow" >> /etc/shadow
|
|
217
246
|
fi
|
|
218
247
|
|
|
219
|
-
#
|
|
248
|
+
# Restore groups (replace completely)
|
|
220
249
|
if [ -f "$MOUNT_POINT/.system-backup/group" ]; then
|
|
221
250
|
cp "$MOUNT_POINT/.system-backup/group" /etc/group
|
|
222
251
|
log "Restored group memberships"
|
|
@@ -226,9 +255,45 @@ if [ -d "$MOUNT_POINT/.system-backup" ]; then
|
|
|
226
255
|
cp "$MOUNT_POINT/.system-backup/gshadow" /etc/gshadow
|
|
227
256
|
fi
|
|
228
257
|
|
|
229
|
-
|
|
258
|
+
# Restore Display Manager configs for autologin
|
|
259
|
+
log "Restoring display manager configurations (for autologin)..."
|
|
260
|
+
|
|
261
|
+
# GDM (gdm3)
|
|
262
|
+
if [ -d "$MOUNT_POINT/.system-backup/gdm3" ]; then
|
|
263
|
+
log "Restoring GDM3 config..."
|
|
264
|
+
# Remove the default live configuration before copying
|
|
265
|
+
rm -rf /etc/gdm3 2>/dev/null
|
|
266
|
+
cp -a "$MOUNT_POINT/.system-backup/gdm3" /etc/
|
|
267
|
+
fi
|
|
268
|
+
|
|
269
|
+
# GDM (gdm)
|
|
270
|
+
if [ -d "$MOUNT_POINT/.system-backup/gdm" ]; then
|
|
271
|
+
log "Restoring GDM config..."
|
|
272
|
+
rm -rf /etc/gdm 2>/dev/null
|
|
273
|
+
cp -a "$MOUNT_POINT/.system-backup/gdm" /etc/
|
|
274
|
+
fi
|
|
275
|
+
|
|
276
|
+
# LightDM
|
|
277
|
+
if [ -d "$MOUNT_POINT/.system-backup/lightdm" ]; then
|
|
278
|
+
log "Restoring LightDM config..."
|
|
279
|
+
rm -rf /etc/lightdm 2>/dev/null
|
|
280
|
+
cp -a "$MOUNT_POINT/.system-backup/lightdm" /etc/
|
|
281
|
+
fi
|
|
282
|
+
|
|
283
|
+
# SDDM
|
|
284
|
+
if [ -f "$MOUNT_POINT/.system-backup/sddm.conf" ]; then
|
|
285
|
+
log "Restoring SDDM config (sddm.conf)..."
|
|
286
|
+
cp -a "$MOUNT_POINT/.system-backup/sddm.conf" /etc/
|
|
287
|
+
fi
|
|
288
|
+
if [ -d "$MOUNT_POINT/.system-backup/sddm.conf.d" ]; then
|
|
289
|
+
log "Restoring SDDM config (sddm.conf.d)..."
|
|
290
|
+
rm -rf /etc/sddm.conf.d 2>/dev/null
|
|
291
|
+
cp -a "$MOUNT_POINT/.system-backup/sddm.conf.d" /etc/
|
|
292
|
+
fi
|
|
293
|
+
|
|
294
|
+
log "User accounts and DM configs restored successfully"
|
|
230
295
|
|
|
231
|
-
#
|
|
296
|
+
# Restart the display manager to reload users
|
|
232
297
|
log "Restarting display manager..."
|
|
233
298
|
if systemctl is-active --quiet gdm; then
|
|
234
299
|
systemctl restart gdm 2>&1 | tee -a "$LOG_FILE"
|
|
@@ -248,12 +313,12 @@ fi
|
|
|
248
313
|
|
|
249
314
|
log "=== Encrypted home mount completed successfully ==="
|
|
250
315
|
|
|
251
|
-
#
|
|
316
|
+
# Notify Plymouth (if active) that we are done
|
|
252
317
|
if plymouth --ping 2>/dev/null; then
|
|
253
318
|
plymouth quit
|
|
254
319
|
fi
|
|
255
320
|
|
|
256
|
-
#
|
|
321
|
+
# Don't clean up success
|
|
257
322
|
trap - EXIT
|
|
258
323
|
|
|
259
|
-
exit 0
|
|
324
|
+
exit 0
|
package/scripts/pve-live.service
CHANGED
|
File without changes
|
package/scripts/pve-live.sh
CHANGED
|
File without changes
|
package/scripts/resy
CHANGED
|
File without changes
|