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

Update for OpenWrt #49

Closed
wants to merge 1 commit into from
Closed

Update for OpenWrt #49

wants to merge 1 commit into from

Conversation

small-5
Copy link
Contributor

@small-5 small-5 commented Aug 1, 2024

Use the /tmp/run/n3n directory for OpenWrt, the libcap is not required.

hamishcoleman added a commit to hamishcoleman/n3n that referenced this pull request Aug 2, 2024
All modern Linux systems have the ephemeral local state directory
created at "/run" - however this is not universal even across just the
supported Linux systems.

Add a configure option to set the location of run dir that is compiled
into the binary.

(See PR n42n#48 and n42n#49)
hamishcoleman added a commit to hamishcoleman/n3n that referenced this pull request Aug 2, 2024
It turns out that the openwrt systems that I have been using to test my
OpenWRT package builds (All Turris Omnia systems) appears to have had a
vendor patch applied to create a symlink from "/run" to "/var/run".  On
a vanilla OpenWRT system, there is no "/run".  Use the new configure
option to set the correct run dir location.

(Also deal with the OpenWRT auto conf tools being too old to include the
runstatedir option)

(See PR n42n#48, n42n#49)
hamishcoleman added a commit to hamishcoleman/n3n that referenced this pull request Aug 2, 2024
It turns out that the openwrt systems that I have been using to test my
OpenWRT package builds (All Turris Omnia systems) appears to have had a
vendor patch applied to create a symlink from "/run" to "/var/run".  On
a vanilla OpenWRT system, there is no "/run".  Use the new configure
option to set the correct run dir location.

(Also deal with the OpenWRT auto conf tools being too old to include the
runstatedir option)

(See PR n42n#48, n42n#49)
@hamishcoleman
Copy link
Contributor

(Note that this is the same function as proposed in PR #48, with a different patch - see that PR for the earlier discussion)

char *basedir = "/run/n3n";
#else
char *basedir = "/tmp/run/n3n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "/tmp/run" is an implementation detail - the well defined dir to use is "/var/run"

@hamishcoleman
Copy link
Contributor

When I talked about adding a "config" option, I meant adding it to the configure script so that it was clearly a config option.

I've implemented it like that in hamishcoleman@0847c26 and hamishcoleman@dae535a

@hamishcoleman
Copy link
Contributor

That has been merged in PR #50 - can you test that and confirm that it is working as expected?

@small-5 small-5 closed this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants