Re: cron job question (for checking kernel updates)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 3 Oct 2013 02:17:09 +0200 poma <pomidorabelisima@xxxxxxxxx>
wrote:

> On 02.10.2013 22:06, Ranjan Maitra wrote:
>
> > However, what I do not understand is why this does not "work" though. I
> > do not understand because notify-send is in /usr/bin as well as in /bin:
> > 
> > $ which notify-send 
> > notify-send is /bin/notify-send
> > notify-send is /usr/bin/notify-send
> > 
> > Both appear to be in the path. So where is the problem? 
> 
> 
> http://goo.gl/Mqq6UP

Thanks! But this does not "work" either. Here is what I tried in my
crontab -e:

0 * * * * maitra DISPLAY=:0.0 $HOME/scripts/yum/check-kernel.sh

(maitra is my username).

Here is how I changed my check-kernel.sh, though I am not sure if there
was a problem with the earlier one....

$more check-kernel.sh 

#!/bin/bash
# from http://goo.gl/Mqq6UP

latestkernel=$(rpm -q kernel |tail -n1|sed -e 's/kernel-//')

#echo "$latestkernel"

if uname -a | grep -qv "$latestkernel"; then
notify-send "Kernel UPDATE on ${HOSTNAME}: " \
"<b><i>Running</i></b> kernel is 
<b><i>$(uname -r | awk '{gsub(/*PAE/,""); print}')</i></b>
but <b>latest</b> <b><u>installed</u></b> is
<b><u>${latestkernel}</u></b>
required
<b><u>REBOOT</u></b>"
fi;

How do you get yours to work?

(Works fine from the commandline, of course.) Btw, FWIW, I am using
dunst.

Many thanks,
Ranjan

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
Check it out at http://www.inbox.com/marineaquarium


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux