Checking for Slackware current
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:
#!/bin/bashREMOTE=ftp.slackware.com/pub/slackware/slackware64-current
LOCAL=/usr/local/src/slackware64# check connection
ping -q -w 1 slackware.com 1> /dev/nullif [ ${?} = 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
else
echo "yes"
exit 1
fi
fi
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.
![]() |
![]() |
![]() |



No Comments to “Checking for Slackware current”