Retry systemd reload in the fingerprint recovery migration (#14260)
* Retry systemd reload after installing fingerprint recovery A failed reload leaves the migration pending with the drop-in already installed. Reload existing configuration on retry so completion means systemd has applied the stop timeout, while preserving administrator changes. Co-Authored-By: Codex Medium <317366263+omarchybot@users.noreply.github.com> * Avoid sudo for an already-applied fingerprint repair Migration completion belongs to each user, while the systemd repair is machine-wide. Query systemd reload state without elevation and reload only stale configuration, so interrupted repairs still retry and later users can complete without sudo. A failed state query remains a migration failure. Co-Authored-By: Greptile <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com> Co-authored-by: Greptile <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
2 files changed
+51
-7
No files matched your search
@@ -18,5 +18,11 @@ fi
|
||||
|
||||
if [[ -f $stop_timeout_src && ! -e $stop_timeout_dst ]]; then
|
||||
sudo install -Dm644 "$stop_timeout_src" "$stop_timeout_dst"
|
||||
sudo systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [[ -f $stop_timeout_dst ]]; then
|
||||
reload_needed=$(systemctl show fprintd.service --property=NeedDaemonReload --value)
|
||||
if [[ $reload_needed == "yes" ]]; then
|
||||
sudo systemctl daemon-reload
|
||||
fi
|
||||
fi
|
||||
Reference in new issue
Block a user