Also sanitze the PATH for rc.single, rc.multi, rc.local and daemons. --- functions | 4 +++- rc.shutdown | 2 -- rc.sysinit | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/functions b/functions index 2eb4f72..bcc97c1 100644 --- a/functions +++ b/functions @@ -2,7 +2,8 @@ # initscripts functions # -# width: +# sanitize PATH (will be overridden later when /etc/profile is sourced, but is useful for UDev) +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" if [[ $1 == "start" ]]; then if [[ $STARTING ]]; then @@ -12,6 +13,7 @@ if [[ $1 == "start" ]]; then fi fi +# width: calc_columns () { STAT_COL=80 if [[ ! -t 1 ]]; then diff --git a/rc.shutdown b/rc.shutdown index 6d43229..fe42797 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -6,8 +6,6 @@ . /etc/rc.conf . /etc/rc.d/functions -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - run_hook shutdown_start # avoid staircase effect diff --git a/rc.sysinit b/rc.sysinit index b34d4ad..89cbd55 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -13,9 +13,6 @@ printsep run_hook sysinit_start -# export standard PATH (will be overridden later when /etc/profile is sourced, but is useful for UDev) -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - # mount /proc, /sys, /run, /dev, /run/lock, /dev/pts, /dev/shm (the api filesystems) mountpoint -q /proc || mount -n -t proc proc /proc -o nosuid,noexec,nodev mountpoint -q /sys || mount -n -t sysfs sys /sys -o nosuid,noexec,nodev -- 1.7.1