periodic: Use a deterministic $PATH for periodic.
Various tools can have alternate versions elsewhere, eg: the GNU mailutils port (a dependency of emacs*) brings /usr/local/bin/mail. Match the preset PATH in /etc/crontab for deterministic path searches even when run manually with a different environment. PR: 259265 Reported by: iandstanley@gmail.com
This commit is contained in:
parent
08d157a832
commit
81a48881c6
@ -30,6 +30,10 @@ if [ $# -lt 1 ] ; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Use a deterministic path to match the preset from /etc/crontab in case
|
||||
# periodic is run interactively.
|
||||
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
|
||||
|
||||
# If possible, check the global system configuration file,
|
||||
# to see if there are additional dirs to check
|
||||
if [ -r /etc/defaults/periodic.conf ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user