apache 2.0.63 and php5
Barry Pederson
bp at barryp.org
Mon Apr 13 14:15:11 UTC 2009
Jase Thew wrote:
> Hi,
>
> /etc/profile is the system wide profile for sh shell. So, should you
> need to do this for all sh scripts ( including /usr/local/etc/rc.d/
> scripts), simply add a PATH line to /etc/profile, eg:
>
> PATH=/foo/bar:/bar/baz:$PATH; export PATH
>
> or
>
> PATH=$PATH:/foo/bar:/bar/baz; export PATH
>
> depending on whether you want your additional directories to be searched
> before or after the default path.
>
> Regards,
>
> Jase.
Thanks, that's an easy fix.
----
There are some inconsistencies though in the default paths used in
various places around the system. It seems that we have (on 7.1 at least)
/etc/rc: /sbin:/bin:/usr/sbin:/usr/bin
/etc/rc.shutdown: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
(why no /usr/local/bin ?)
/etc/login.conf, /usr/share/skel/dot.profile, /usr/share/skel/dot.cshrc:
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin
Would it make any sense to do something like to add /usr/local/s?bin
later in the rc startup as a system default - to make automatic
boot-startup behavior more similar to manual service-starting behavior...
--- defaults/rc.conf.original 2009-01-19 22:58:58.490989000 -0600
+++ defaults/rc.conf 2009-04-13 09:09:01.680065507 -0500
@@ -51,6 +51,7 @@
populate_var="AUTO" # Set to YES to always (re)populate /var, NO to
never
cleanvar_enable="YES" # Clean the /var directory
local_startup="/usr/local/etc/rc.d" # startup script dirs.
+local_startup_path="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
# Path to use when starting local scripts
script_name_sep=" " # Change if your startup scripts' names contain
spaces
rc_conf_files="/etc/rc.conf /etc/rc.conf.local"
--- rc.original 2009-01-19 22:56:22.411969000 -0600
+++ rc 2009-04-13 09:07:16.046050290 -0500
@@ -100,7 +100,10 @@
#
case ${local_startup} in
[Nn][Oo] | '') ;;
-*) find_local_scripts_new ;;
+*) find_local_scripts_new
+ PATH=local_startup_path
+ export PATH
+ ;;
esac
files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null`
-----------------
You could also perhaps pull that $local_startup_path into rc.shutdown
Barry
More information about the freebsd-stable
mailing list