Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkgadmin: Workaround missing /usr/local/bin path in cronjob
Currently pmirror resides in /usr/local/bin (which is not optimal) and /usr/local/bin is not incluided in the default path. As a non-interactive bash or one that is called as /bin/sh (as cron does) does not read .bashrc, we don't have /usr/local/bin in the path. However, the pkgadmin command expected "pmirror" to be in the path. As a workaround, until the default path is updated to include /usr/local/bin (and /usr/sbin ?) , read our .bashrc to get all PATHs we are used to. Another workaround would be to set SHELL an BASH_ENV in the crontab file to have all of the .bashrc settings. SHELL=/usr/bin/bash BASH_ENV=./.bashrc 0 2 * * * root pkgadmin update Another workaround would be 0 2 * * * root PATH=/usr/local/bin:/usr/sbin:$PATH pkgadmin update
- Loading branch information