Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polkit.service needs to be restarted after installation #30

Closed
docwhat opened this issue Feb 4, 2023 · 6 comments · Fixed by #35
Closed

polkit.service needs to be restarted after installation #30

docwhat opened this issue Feb 4, 2023 · 6 comments · Fixed by #35
Labels
enhancement New feature or request
Milestone

Comments

@docwhat
Copy link

docwhat commented Feb 4, 2023

If you have anything that installs polkit actions in /usr/share/polkit-1/actions/ then polkit.service needs to be restarted to pick those changes up.

I haven't checked the boot order yet, but it may require a change to the systemctl files as well.

My use case was I tried to install 1Password and have it use system unlock (e.g., polkit) and it wouldn't see the action. Since I just learned about polkit today, this took a while to debug. ;-)

@docwhat
Copy link
Author

docwhat commented Feb 4, 2023

PS: I volunteer my dog, Rufus, as a mascot for this project if you'd like:

IMG_4704

@ValShaped
Copy link
Owner

ValShaped commented Feb 5, 2023

EDIT: Having multiple units in Stop_Units, Mask_Units, Restart_Units is currently broken? Hmm.
Fixed on dev branch!
Great suggestion, and a cute dog too! In the mean time, you can add polkit.service to /etc/opt/rwfus.conf Service/Restart_Units:

--- snip ---
[Service]
# Units to [Stop|Mask|Restart] while Rwfus is running
Stop_Units         var-cache-pacman.mount
Mask_Units         pacman-cleanup.service
Restart_Units      usr-local.mount polkit.service

(I should note that this will stop polkit entirely before Rwfus starts, and start it when Rwfus finishes. This behavior might not be ideal in this specific case..)

ValShaped added a commit that referenced this issue Feb 5, 2023
@ValShaped ValShaped added the enhancement New feature or request label Feb 6, 2023
@ValShaped ValShaped added this to the v0.4.1 milestone Feb 6, 2023
@docwhat
Copy link
Author

docwhat commented Feb 6, 2023

You should only need to restart it after launching rwfus.

It doesn't hurt before or during the launch since it continues to see the original filesystem.

@ValShaped
Copy link
Owner

ValShaped commented Feb 7, 2023

That's true; however, it reuses existing machinery. I'd be up for adding a new config entry for restartable/reloadable units, though

@docwhat
Copy link
Author

docwhat commented Feb 13, 2023

That's true; however, it reuses existing machinery. I'd be up for adding a new config entry for restartable/reloadable units, though

I'm not sure what you mean. Would you be willing to explain it to me?

@ValShaped
Copy link
Owner

ValShaped commented Feb 14, 2023

Since Rwfus 0.4.0 (if I remember correctly), rwfusd has been able to stop and start other services when it starts/stops.

This was implemented, because SteamOS Offload uses systemd mount units to auto-mount certain things after /home/ is mounted.

If you mask a mounted filesystem with another mounted filesystem, and then try to unmount the first filesystem, systemd will mark the mount unit as failed and refuse to remount it. I worked around that by stopping the mount units while Rwfus is in the process of activating, and then restarting them when it finished activation.

In 0.4.1, Rwfus uses this same "machinery" (stopping polkit, activating itself, starting polkit) to handle reloading polkit, even though it would not fail, because I already had code to do that. I'd be open to add code to explicitly reload units, if that'd be a good feature, but it seems to work just fine as-is.

@ValShaped ValShaped mentioned this issue Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants