kwallet: stop kwalletd6-logon.service before remounting wallet
ExecStop (umount) fires asynchronously ~26s after logout, by which time a second login's install.sh has already remounted the wallet. ExecStop then unmounts the fresh mount, leaving kwalletd6 without the wallet directory. Fix: stop kwalletd6-logon.service at the top of install.sh so its ExecStop fires and drains before the remount, eliminating the race. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,12 @@ WALLETFILE="${WALLETNAME}.kwl"
|
|||||||
WALLETPATH="${DECRYPTEDDATADIR}/kwallet"
|
WALLETPATH="${DECRYPTEDDATADIR}/kwallet"
|
||||||
WALLETPATH_CFG="$SUDO_HOME/.local/share/kwalletd"
|
WALLETPATH_CFG="$SUDO_HOME/.local/share/kwalletd"
|
||||||
|
|
||||||
|
# Stop kwalletd6-logon.service first so its ExecStop (umount) fires before we remount the wallet.
|
||||||
|
# Without this, ExecStop races with the remount below and can unmount the freshly mounted wallet.
|
||||||
|
_USER_UID=$(id -u "${SUDO_USER}")
|
||||||
|
XDG_RUNTIME_DIR="/run/user/${_USER_UID}" DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/${_USER_UID}/bus" \
|
||||||
|
sudo -u "${SUDO_USER}" systemctl --user stop kwalletd6-logon.service 2>/dev/null || true
|
||||||
|
|
||||||
# Stop the daemon anyway if running
|
# Stop the daemon anyway if running
|
||||||
# kwallet and kwalletmanager are optional and only started when an app has been using them already
|
# kwallet and kwalletmanager are optional and only started when an app has been using them already
|
||||||
WALLET_PID=$( pgrep -u $SUDO_USER kwalletd6 )
|
WALLET_PID=$( pgrep -u $SUDO_USER kwalletd6 )
|
||||||
|
|||||||
Reference in New Issue
Block a user