-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Fresh install of NUT - /var/run/nut is not created and permissions not set #1030
Comments
I believe modern Linux systems deliver |
Also, kudos on your patching of the service file. I suppose for a quick win, you would need to similarly patch the unit files for I am not sure currently with which version of systemd the RuntimeDirectory et al were introduced, but per https://www.freedesktop.org/software/systemd/man/systemd.exec.html we might add use of them for Linux distros going forward at least:
So that could cover NUT pid files and state files (e.g. sockets where that upsd talks to drivers). On a separate note, your configuration did not set a |
…reate runtime locations
…reate runtime locations
…reate runtime locations
@jimklimov, I didn't intend for that that to default, but it's of no consequence on my end. It doesn't really matter where the files are to me, as long as they run.. :) |
In the
based on detected presence of systemd features; with the tmpfiles config make-installed regardless of enablement of other systemd units (they make sense for SYSV style init scripts too, if the OS would provide the temporary locations). Note you (or generally a package post-install script) would need to run For a configuration with options for actual unit files like below, it should also apply those:
with generated contents like:
Note that currently |
@TheKaese : hi, after my earlier comment, I posted some more commits to polish the https://github.com/jimklimov/nut/tree/systemd-tmpfiles branch (source for PR #1037) - can you check to confirm if that would solve your issue? Note you would still have to Also note that systemd may complain about use of "/var/run" instead of "/run" - that is noisy but harmless and may also be addressed separately later. |
Sure, I'll give it a go when I get a chance this week. |
Hmm.. I'm not getting that output. The only things systemd I see in the output of .configure is:
I'm still using the same .configure command as my original post, by the way. So my steps have been:
This all said, it DOES appear to work. Running the above appears to have replaced the changes I had made to the startup scripts, and a reboot of the system results in the nut services starting up without issue. |
Follows up from PR networkupstools#1037 for issue networkupstools#1030 to let the trick work for distcheck and similar out-of-tree builds.
Follows up from PR networkupstools#1037 for issue networkupstools#1030 to let the trick work for distcheck and similar out-of-tree builds.
@TheKaese : looking back at your post, I think the Anyway, currently all my ideas on this matter should be part of NUT master branch codebase, so it would be nice if you could check again that this issue got solved for your use-case? |
May be related to #1212 |
Should have no "nut" subdir for STATEPATH and ALTPIDPATH Follow-up for networkupstools#1030, networkupstools#1037, networkupstools#1117 May be related to networkupstools#1712
…(.in) to install a *.conf pattern [networkupstools#1754] Follow-up for networkupstools#1030, networkupstools#1037, networkupstools#1117 May be related to networkupstools#1712
Hi
Having some serious issues getting NUT running on one of my servers. What's curious is that I'm using the exact same configuration on two systems, but one of them will not create the var/run/nut directory with the correct permissions at boot. I installed NUT using the following commands.
But nut-server refuses to start due to the permissions issue and the fact that /var/run/nut is not present. If I create the folder manually and give it the correct permissions, things work if I run upsdrvctl start, and then restart nut-server and nut-monitor. But this does not persist after reboot as the /var/run dirs are deleted.
I was able to tailor the service file a bit to get it to create the folders properly:
But still, NUT does not start on reboot. But if I run upsdrvctl start, and then restart nut-server and nut-monitor, things are working this updated service file. Seems like the service that is supposed to start the driver is not starting.
This all said - I think there's a bug in the latest version where /var/run/nut is not being created all the time and upsdrvctl is not starting at boot. Unless someone can see something I'm missing?
The text was updated successfully, but these errors were encountered: