**** BEGIN LOGGING AT Thu Apr 23 02:59:57 2009 Apr 23 23:26:28 hey. how do i set the system path? i need to put /opt/bin/ in front of /usr/bin/ in the path Apr 23 23:26:50 i've done this in my .bashrc, but it doesn't apply to other shells (or other users) Apr 23 23:27:03 (obviously) Apr 23 23:27:30 they still use /usr/bin over /opt/bin Apr 23 23:27:38 i'm on unslung 6.10 Apr 23 23:29:41 export PATH=$PATH:/path/to/my/directory Apr 23 23:29:57 but you want system wide.. Apr 23 23:32:39 iwo: just use ssh to login, and it will have the right PATH Apr 23 23:33:32 the problem is, i have crontab running a script regularly, and in the session that crontab uses, it's always trying to use binaries from /usr/bin and not /opt/bin Apr 23 23:34:10 then in the script, you can set PATH=/opt/bin:$PATH Apr 23 23:34:25 so this script tries to use "find", and it gets the cut-down BusyBox version of "find" (which resides in /usr/bin) Apr 23 23:34:49 eno: yeah, could do that i suppose. i'm looking for a more permanent solution :) Apr 23 23:35:06 my script worked fine before i rebuilt my slug recently... Apr 23 23:35:24 so in my previous setup, i must have had the path set somewhere Apr 23 23:35:29 correctly Apr 23 23:36:18 cron's default PATH probably is set in its code Apr 23 23:36:30 my scripts need the findutils version of find, which exists in /opt/bin (well the update-alternatives symlink to it is anyway) Apr 23 23:36:35 ah yes, good point Apr 23 23:36:56 however if i log in, the execute "sh" to open the default shell... Apr 23 23:37:00 my path is wrong Apr 23 23:37:15 where is the config for "sh" ? Apr 23 23:37:41 if i run scripts that include #!/bin/sh as the header, i don't want the path to be wrong Apr 23 23:38:52 ah yes, cron path is at the top of /etc/crontab :) good thinking eno :D Apr 23 23:40:25 i guess i'm just looking for the ash rc file now. is there such a thing? Apr 23 23:41:45 ah, guess it's ~/.profile Apr 23 23:42:23 my understanding is .profile only gets invoked when it's a login shell Apr 23 23:45:33 yep, looks that way :S Apr 23 23:45:51 never mind, crontab is the main problem and this is now hopefully fixed Apr 23 23:47:20 this might sound like a stupid question but... Apr 23 23:47:49 is it entries earlier in the path value that take presedence or entries later Apr 23 23:47:51 ? Apr 23 23:48:00 yeah Apr 23 23:48:38 which one? earlier, right? Apr 23 23:48:51 * iwo has a sanity check Apr 23 23:49:15 i.e. you stick it at the front of the path to take precedence Apr 23 23:49:19 ? Apr 23 23:49:28 yes Apr 23 23:50:07 earlier one takes precedence Apr 23 23:54:17 okay, don't think my edit to crontab worked :( Apr 23 23:54:40 restarted cron but still having no luck. Apr 23 23:55:04 maybe just change your script Apr 23 23:55:15 right after #!/bin/sh Apr 23 23:55:29 add the PATH=/opt/bin:$PATH line there Apr 23 23:56:06 unless you have a lot of scripts, this seems to be quite easy and effective Apr 23 23:56:38 :D Apr 23 23:56:48 good advice, which i will probably take Apr 24 00:03:41 thanks eno. i think i'm gonna mail the list. cheers! **** ENDING LOGGING AT Fri Apr 24 02:59:57 2009