Automating YOU updates with cron
Hi, Has anyone successfully setup YOU to be run from a cron job successfully? In the SuSE manual it provides an example but I cannot get it to run properly. The commands run OK if done manually. lin-2:~/bin # crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (crontab installed on Wed Feb 26 21:08:30 2003) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) MAILTO=graham 10 21 * * * /sbin/yast2 online_update .auto.get 15 21 * * * /sbin/yast2 online_update .auto.install lin-2:~/bin # I end up with the following error messages being emailed to myself Error opening terminal: unknown. Error opening terminal: unknown. Does anyone know what I'm doing wrong with the crontab to get these messages? -- Regards, Graham Smith ---------------------------------------------------------
* Graham Smith <gqs@iinet.net.au> [02-27-03 21:14]:
Has anyone successfully setup YOU to be run from a cron job successfully? In the SuSE manual it provides an example but I cannot get it to run properly. The commands run OK if done manually.
I use fou4s instead of you. It works... # The command below will update patch descriptions from the ftp server # and download necessary update. To install the updates, run fou4s -in # (i = install, n = no download) afterwards. # # PLEASE CHANGE THE TIME to some other value to keep load on ftp servers low # (default is 03:05 am) # The checkfou4s option lets fou4s check for an update of fou4s (recommended). # # Add the option -n after the --auto parameter to disable download # of needed update packages. It is advisable not to do so, because this # will save bandwidth during the day. 5 4 * * * root /usr/sbin/fou4s --auto --checkfou4s # clean up cache directory every month (patch descriptions and temp files) 1 0 1 * * root rm -rf /var/cache/fou4s/packages/*/*/update/*.*/patches/*-* 2 0 1 * * root rm -rf /var/cache/fou4s/packages/tmp.rsync.list.* # check with buildtime option once a month for safety 7 3 1 * * root /usr/sbin/fou4s -e --buildtime # Run patch description generator for supplementary tree once a month # this is just for kde/gnome/xfree/etc. updates and not for security. # In fact, some updates here may contain holes although they are already known. # The list of directories to search for updates must first be configured in # fou4s.conf (GpdList=) #7 3 1 * * root gpd.sh -- Patrick Shanahan Please avoid TOFU and trim >quotes< http://wahoo.no-ip.org Registered Linux User #207535 icq#173753138 @ http://counter.li.org
On Thursday 27 February 2003 6:12 pm, Graham Smith wrote:
Has anyone successfully setup YOU to be run from a cron job successfully? ... lin-2:~/bin # crontab -l MAILTO=graham ... I end up with the following error messages being emailed to myself
Error opening terminal: unknown. Error opening terminal: unknown.
Does anyone know what I'm doing wrong with the crontab to get these messages?
Yes. Yast(2) uses ncurses if it cannot use an X display; SuSE's support DB goes into detail as to why, but the short answer is they suggest setting MAILTO to null ("") to keep cron from trying to e-mail a result. [which really defeats the purpose of doing this automatically -- you WANT to know when it fails so you can correct it manually...] If you've got the space for it (about 6 gigs, I think) you should look into rsync'ing the update site [from a mirror] which CAN be done in a cron job -- then all you need to do is actually perform an "update" whenever you see rsync download files that you use [with the added bonus that since rsync already brought down the file, YOU can work against a local directory and the initialization time should be VERY quick...] -- Yet another Blog: http://osnut.homelinux.net
* Tom Emerson; <osnut@pacbell.net> on 27 Feb, 2003 wrote:
If you've got the space for it (about 6 gigs, I think) you should look into rsync'ing the update site [from a mirror] which CAN be done in a cron job --
toganm@earth:~/projects/oldstyle> du -sH /usr/local/update/i386/update/8.1/ 728MB /usr/local/update/i386/update/8.1 So something like 1 gig is enough
then all you need to do is actually perform an "update" whenever you see rsync download files that you use [with the added bonus that since rsync already brought down the file, YOU can work against a local directory and the initialization time should be VERY quick...]
http://susefaq.sf.net/articles/you.html describes the process to have a local YOU mirror -- Togan Muftuoglu Unofficial SuSE FAQ Maintainer http://dinamizm.ath.cx
participants (4)
-
Graham Smith
-
Patrick Shanahan
-
Togan Muftuoglu
-
Tom Emerson