Home » Slackware » Checking for Slackware current

Checking for Slackware current

25 February 2012

If you are using Slackware and if you are following -current, then you need to check slackware.com regularly to see if there is any update. There are more than one way to do this: reading the ChangeLog on-line, using slackpg or launching rsync… But all of these approaches require, at least, to download the full ChangeLog file from the server which is neither efficient nor elegant. An other way is to only check the modification time of the file, without downloading it, and compare it with a local version. You can do this with curl in a bash shell script like this:



# check connection
ping -q -w 1 slackware.com 1> /dev/null

if [ ${?} = 0 ]; then
  NEW=`curl -s -I ftp://${REMOTE}/ChangeLog.txt | grep Last-Modified`
  OLD=`curl -s -I file://${LOCAL}/ChangeLog.txt | grep Last-Modified`
  if [ "${NEW}" = "${OLD}" ]; then
    echo "no"
    exit 0
    echo "yes"
    exit 1

If your using SlackE17, you can use the execwatch module to check regularly for update. Make it wait for an exit code of 0. A poll time of 1 hour should be good. If updates are available, the green icon of exewatch will turn red to warn you.

execwatch configuration no update update present


No Comments to “Checking for Slackware current”

Leave a Reply