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
image: add /etc/environment #4065
Conversation
Really not a fan of this. It adds patches and a bunch of custom stuff to make it work. is it really so bad to use the full path?
|
It was more for the convenience, and because this is a general issue. I didn't think the patches were too intrusive. The alternative would be to install |
As commented in Slack: with /etc/environment directly processed by sshd we're basically mimicing what normal Linux distros with PAM enabled do as well. Having to specify the rsync path on the host is a really awful thing - same goes for tvheadend which can't find ffmpeg on it's path and probably lots of other cases. Installing binaries to non-standard locations that are not on PATH is biting us now. We need to fix that. |
Created separate |
I've reverted the |
For rsync and ffmpeg just make symbolic link in image to addon's location and problem will go away? |
@vpeter4 Yes it would, but that's fixing the issue for those two examples only, and we'd be littering the image with (for most users) broken links (and if we ever decided to reorganise add-ons and move the location of an executable, how would that work with links in some versions of LE pointing to the wrong location?) This is a general solution that works for everything, without any unnecessary hacks (apart from re-using some AIX functionality). The |
Executables (scripts, binaries) installed via add-ons are not accessible to
sshd
unless the full add-on path is specified because profiles are not sourced unless the user actually logs in to an interactive session.This is a particular issue with
rsync
:In the case of
rsync
, the current workaround is to specify the full path of the remote LibreELECrsync
binary to thersync
client (with--rsync-path=/storage/.kodi/addons/virtual.network-tools/bin/rsync
) but this is far from ideal.Installing
rsync
into the image would also work, but this is wasteful and doesn't solve the problem for other add-on installed executables, and we can't install them all in to the image...This PR provides a general solution by adding the system-wide
/etc/environment
file which is sourced bysshd
when a session is connected allowing add-on executables to be successfully located on thePATH
.I've added
/bin
and/sbin
to the base PATH set by98-busybox.conf
as although/bin
is a symbolic link to/usr/bin
,sshd
doesn't seem to follow symbolic links. eg:with
/bin
in/etc/environment
without
/bin
in/etc/environment