diff --git a/client_software/0010_kwallet/install.sh b/client_software/0010_kwallet/install.sh index 0c7f78e..1461054 100755 --- a/client_software/0010_kwallet/install.sh +++ b/client_software/0010_kwallet/install.sh @@ -39,6 +39,12 @@ WALLETFILE="${WALLETNAME}.kwl" WALLETPATH="${DECRYPTEDDATADIR}/kwallet" 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 # kwallet and kwalletmanager are optional and only started when an app has been using them already WALLET_PID=$( pgrep -u $SUDO_USER kwalletd6 )