I have often wanted a way to check if end of life is getting close for my systems on the command line.
The message in freebsd-update is really nice, but it feels a bit overkill to run that just to check if I should consider updating to a new release of FreeBSD -and it also only checks for the system it is run on..
So I hacked up this little script which checks if EoL is close for either the currently running release of FreeBSD or for the one given as an argument. Now I can have a cron job running every now and then to check for all releases I’m using.
Get it here if you want to give it a try.
An example of first running it without argument on an old system and then running with 9.0 as argument:
WARNING: FreeBSD 8.2-RELEASE HAS PASSED ITS END-OF-LIFE DATE.
Any security issues discovered after Wed Aug 1 02:00:00 CEST 2012
will not have been corrected.
It exits with 0 if no message is displayed as in the second example.
This script borrows just about all of the code from freebsd-update, it just skips a lot of things and turns it into a real one trick pony.
Perhaps a patch for freebsd-update would be appropriate but I’m not entirely sure anybody else would even find this feature useful so I’m saving that for a rainy day.
If you have an opinion about the script or think that I atually should turn it into a patch, please leave a comment bellow.