n42n / n3n

Peer to Peer VPN
https://n3n.dev
86 stars 9 forks source link

Why is *.service installed in /lib/systemd/system/? #14

Closed YCJDWCJI closed 8 months ago

YCJDWCJI commented 8 months ago

This may be a preference for a specific dist, but when --libdir=/xx/yy/zz is specified, it installs to both locations and does not override the default path.

YCJDWCJI commented 8 months ago

Some distributions do not fully comply with the FHS (e.g. Arch Linux) and merge /lib into /usr/lib.

Refer:

hamishcoleman commented 8 months ago

There are several reasons for this. I've only ever tested the code on merged /lib /usr/lib and the documented search path for systemd is /lib/systemd/ on those systems. The install code has been in quite a bit of flux recently too. I've been making the assumption that most OS will use a package (yes, I realise there is no arch package definition) and that the packaging can take care of moving things that are inaccurate around. I've been trying to keep the amount of autotools configuration down to a minimum, so deliberately didnt plumb up all the directories. Finally, I didnt consider the libdir to cover this case - if I thought about it at all it was to confirm that there were no binary libraries being installed,

However, there is no reason why the --libdir feature (and --docdir) could not be hooked up, especially if it helps your use case

hamishcoleman commented 8 months ago

Since the autoconf has no support for a directory for non-binary, non-/etc, deployed config files, I have added a new option - you should be able to use the --with-systemddir=DIR to change the install directory.

Does this solve your issue?

YCJDWCJI commented 8 months ago

Solved.