Another thing to try: Replace
pkill --signal HUP polkitd
with
systemctl try-restart polkitd.service
in /usr/lib/udisks2/udisks2-inhibit. That will immediately restart it, instead of waiting for another d-bus activation cycle (which might confuse existing clients).
Another thing to try: Replace
pkill --signal HUP polkitd
with
systemctl try-restart polkitd.service
in /usr/lib/ udisks2/ udisks2- inhibit. That will immediately restart it, instead of waiting for another d-bus activation cycle (which might confuse existing clients).