reported by Alexey Proschenko > There is unsafe use of "cat /etc/installurl" in PKG_PATH composition code > because of man INSTALLURL(5): > "Empty lines and lines beginning with ‘#’ in the file are ignored." the current code was looking for the first line not starting with # which was wrong in case the line was empty.
|5 months ago|
|LICENSE||5 months ago|
|README.md||5 months ago|
|pkgupdate||5 months ago|
pkgupdate is a simple shell script meant for OpenBSD users of the stable branchs (people following releases) to easily keep their packages up to date.
It is meant to be run daily by cron on servers on at boot time for workstations (you can obviously configure it how you prefer).
pkgupdate has only one flag
-q to hide successful messages, preventing to send an email from cron scripts if it worked.
pkgupdate uses 3 tricks to speed up the process, this is particularily important for workstations updating during the boot process:
- fetch the index of packages and compare it between runs (using a cache in
- if the index changed, which mean everytime a new package is updated, then it only try to update the packages available in the
- if curl is installed, use curl instead of ftp(1) command
In my opinion, workstations should be updated as soon as possible, at boot time, to update packages at boot before using anything from the user session, avoiding a boring reboot.
As for servers, making the process faster is always welcome.
git clone https://tildegit.org/solene/pkgupdate.git and copy
Best way to manage this is to use root's crontab. As root, type
crontab -e to edit its tab.
# for updating on boot @reboot /usr/local/bin/pkgupdate # for updating every hour @hourly /usr/local/bin/pkgupdate # for updating every 6 hours 0 */6 * * * /usr/local/bin/pkgupdate