barrygordon Posted May 13, 2010 Share Posted May 13, 2010 If I wish to install a particular binary package (e.g. s2ram) what is the appropriate location to put it so it can be accessed by name only. Obviously the location must be in the path (See I am begining to learn about linux). What is the convention on unRaid? Is it recommened to modify the path so that perhaps /boot/custom/bin is in the path? Quote Link to comment
Joe L. Posted May 13, 2010 Share Posted May 13, 2010 If I wish to install a particular binary package (e.g. s2ram) what is the appropriate location to put it so it can be accessed by name only. Obviously the location must be in the path (See I am begining to learn about linux). What is the convention on unRaid? Is it recommened to modify the path so that perhaps /boot/custom/bin is in the path? It is a tiny bit more complicated than it sounds. There are two different PATH's involved. One is used when you log onto the system with a login-shell. It is defined partly by /etc/profile an partly by your own .profile file in the login directory. Since we log in as "root" we would need to create a /root/.profile file and add the appropriate PATH command to it. The other PATH is used by the "go" script. It has nothing to do with what you can invoke at the command line. It does affect programs invoked by the "go" script. Yes, the /boot/custom/bin directory is the suggested location as it will not collide with any unRAID files. I personally just use full path names. It eliminates all ambiguity. Others create symbolic links. I've not ever seen any mention of anyone editing /etc/profile to affect login shells. (although it could easily be done) Joe L. Quote Link to comment
barrygordon Posted May 13, 2010 Author Share Posted May 13, 2010 I am assuming that if part of the install copies the binary from lets say /boot/custom/bin/binary_file to lets say /usr/local/sbin/binary_file that would make the binary_file appear in the path with no real adverse affects as /usr/local/sbin is in the path. Yes I do understand that I can just reference it as /boot/custom/bin/binary_file Thanks Quote Link to comment
Joe L. Posted May 13, 2010 Share Posted May 13, 2010 I am assuming that if part of the install copies the binary from lets say /boot/custom/bin/binary_file to lets say /usr/local/sbin/binary_file that would make the binary_file appear in the path with no real adverse affects as /usr/local/sbin is in the path. Yes I do understand that I can just reference it as /boot/custom/bin/binary_file Thanks That will work perfectly well at the expense of a tiny bit of ram used for the copy. Quote Link to comment
barrygordon Posted May 13, 2010 Author Share Posted May 13, 2010 Ahhh Thats correct. Forgot it is RAM resident. I guess If I want to do what I want I should just change the path and the profile and.... Oh Hell I will just reference it from /boot/custom/... Quote Link to comment
Joe L. Posted May 13, 2010 Share Posted May 13, 2010 Ahhh Thats correct. Forgot it is RAM resident. I guess If I want to do what I want I should just change the path and the profile and.... Oh Hell I will just reference it from /boot/custom/... or, you can create a symbolic link to the file on the flash drive. ln -s /boot/custom/bin/s2ram /usr/sbin/local/s2ram Then, the file is actually on the flash drive, but it is in the search path because a symbolic link to it is in /usr/local/sbin Symbolic links only occupy a few bytes, so the RAM used is not a worry, regardless of the size of the program. Joe L. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.