There's a new Linode kernel available
7 Replies
edit:
How about the Kernels API, when I'm on my Linode I can run uname -r and get back 3.12.6-x86-linode55. Ok cool, so can I hit the API and ask for "latest kernel version" and get back 3.12.6-x86-linode55 and know Ok there's not a new one or if it's different then it must be new, I can have my Linode email me.
Here's the kernel API:
I don't want "kernels" plural, I just want to pass in "I'm on xyz, do you have anything newer?" or at least, what's the latest standard 32 bit kernel?
There's also various services out there that can email you when feeds are updated (have a google).
Or you can have a quick and dirty bash script, something like this
curl -s https://www.linode.com/kernels/rss.xml | grep "Latest.*$(uname -r)" > /dev/null
if [ $? -eq 1 ]
then touch /var/run/reboot-required
fi
That checks if your kernel is the latest and creates /var/run/reboot-required which on ubuntu will trigger a reboot required warning when you log in, you could make it a cron job if you like.
@jebblue:
I don't do RSS, what do you recommend? Can I set it up to send me an email notification?
This can help you ..
Just install on you linode and wait for the email!
@obs:
Some email clients support RSS as well, Thunderbird does they just appear like mini web pages and you get unread notifications when new items appear.
There's also various services out there that can email you when feeds are updated (have a google).
Or you can have a quick and dirty bash script, something like this
curl -s https://www.linode.com/kernels/rss.xml | grep "Latest.*$(uname -r)" > /dev/null if [ $? -eq 1 ] then touch /var/run/reboot-required fi
That checks if your kernel is the latest and creates /var/run/reboot-required which on ubuntu will trigger a reboot required warning when you log in, you could make it a cron job if you like.
I thought about doing something like that obs thanks. My understanding with Google dropping support for RSS is that it will be going away so I imagine at some point this will start failing.
I suppose the same approach would work with the api.kernels call too though.
edit:
I changed your curl line to use my key (not abc123) and verified that echo $? does indeed get set correctly.
curl -s "https://api.linode.com/?api_key=abc123&api_action=avail.kernels&isXen=1" | grep "Latest.*$(uname -r)"
I added an email notification line after your line to set the reboot stated (cool idea I wasn't aware how that happened).
mail -s "New Linode Kernel is available - Reboot Required" me@mydomain.foo
So the script for anyone who wants to use obs' script with the API instead of the RSS feed URL:
#!/bin/bash
curl -s "https://api.linode.com/?api_key=abc123&api_action=avail.kernels&isXen=1" | grep "Latest.*$(uname -r)" > /dev/null
if [ $? -eq 1 ]; then
#echo "test"
touch /var/run/reboot-required
mail -s "New Linode Kernel is available - Reboot Required" me@mydomain.foo
fi
Thanks obs Happy New Year
@jebblue:
My understanding with Google dropping support for RSS is that it will be going away so I imagine at some point this will start failing.
Google didn't invent RSS, does not control RSS, nothing of the sort. Google dropped Google Reader, which was a very popular RSS client. There are a number of others (eg I migrated to feedly)
The loss of Google Reader caused a lot of heartburn (including me) but feedly.com has replaced it without a hiccup. I use the "Press" app on Android devices as my client with feedly as the backend.
Linode has other useful RSS feeds as well, such as Lassie events from your linodes.