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

Sles 11 (SuSE) has logger in /bin/ not in /usr/bin/. #225

Closed
andabata opened this issue Apr 11, 2018 · 6 comments
Closed

Sles 11 (SuSE) has logger in /bin/ not in /usr/bin/. #225

andabata opened this issue Apr 11, 2018 · 6 comments

Comments

@andabata
Copy link

And gives an error:
Apr 11 11:55:50 hotel gocryptfs[52806]: redirectStdFds: could not start logger: fork/exec /usr/bin/logger: no such file or directory

@rfjakob
Copy link
Owner

rfjakob commented Apr 11, 2018

Thanks for the report! Patch follows shortly...

@voobscout
Copy link

just to chime in - please don't hardcode paths, for example I'm on NixOS and logger lives in /run/current-system/sw/bin/logger

@rfjakob
Copy link
Owner

rfjakob commented Nov 14, 2018

The reason for the hardcoded paths was that the PATH environment variable is not set when we are mounted from /etc/fstab. However, commit 10212d7 should handle that case, and I think I can drop the hardcoded paths.

@voobscout
Copy link

This commit appears to already be in v1.6_2018-10-17, that's the version I'm running. However, I'm forced to sed -i 's|"/bin/logger"|&, "/run/current-system/sw/bin/logger"|' daemonize.go to get it to run.

Same thing goes for path, some distros are really bizarre.

May I suggest a command line option that can override the few places gocryptfs has hardcoded paths, unless it's given it should stick to defaults of sane /bin /usr/bin etc... But for those of us on eclectic systems it would help a lot to not have to patch sources.

Many thanks!

rfjakob added a commit that referenced this issue Nov 17, 2018
The hardcoded full paths were introduced to handle the
case of an empty PATH environment variable. However,
since commit 10212d7 we set PATH to a default
value if empty. The hardcoded paths are no longer neccessary,
and cause problems on some distros:

User voobscout on
#225 (comment) :

  just to chime in - please don't hardcode paths, for example I'm on
  NixOS and logger lives in /run/current-system/sw/bin/logger

Drop the hardcoded paths.
@rfjakob
Copy link
Owner

rfjakob commented Nov 17, 2018

@voobscout Fixed in d882ed4 . No command line options neccessary, just PATH should be set to the right value for the distro.

@voobscout
Copy link

Many thanks! that certainly makes it easier to package gocryptfs!

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

No branches or pull requests

3 participants