Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Apr 2009 09:14:53 -0500
From:      Barry Pederson <bp@barryp.org>
To:        Jase Thew <bazerka@beardz.net>
Cc:        xer <xernet@hotmail.it>, freebsd-stable@freebsd.org
Subject:   Re: apache 2.0.63 and php5
Message-ID:  <49E348DD.3080700@barryp.org>
In-Reply-To: <49E325A1.9000602@beardz.net>
References:  <20090409120815.A0FAB10658D2@hub.freebsd.org>	<BAY126-DS4D615E21BA0F2E175F2E6A3810@phx.gbl> <49E20DFB.9000208@barryp.org> <49E325A1.9000602@beardz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49E348DD.3080700>