View previous topic :: View next topic |
Author |
Message |
ugluk n00b
Joined: 06 Oct 2006 Posts: 64
|
Posted: Tue Oct 17, 2006 7:49 am Post subject: crond woes |
|
|
I've put this script into /etc/cron.daily
Code: |
#! /bin/sh
exec /bin/nice /usr/bin/emerge --sync
exec /bin/nice /usr/bin/emerge -DNu world
|
crond is running as verified with ps ax. Script has been chmoded +x. Still it does not get executed by vixie-cron. Help? |
|
Back to top |
|
|
phajdan.jr Retired Dev
Joined: 23 Mar 2006 Posts: 1777 Location: Poland
|
Posted: Tue Oct 17, 2006 2:11 pm Post subject: |
|
|
How do you know it is not executed? What are contents of /etc/crontab file? What's the output of ls -l /etc/cron.daily?
By the way: what you are trying to do is extremely dangerous. It has been discussed many times: don't do that. It may break your system and you won't even know. Why?
1. no revdep-rebuild
2. no etc-update
3. you don't see einfos, ewarns etc. (at least if you don't use elog functionality in portage 2.1)
4. you have no control over what gets updated
5. you can't resolve package blocks
...
There are better ways of automatic update. There was some python script which precompiled packages for you and allowed you to install them, with logging and configuration support. |
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Tue Oct 17, 2006 2:18 pm Post subject: |
|
|
1. Read the Gentoo Cron Guide; note the Troubleshooting section.
2. See this thread to learn why your script can't work as-is.
3. Heed _ph's words and don't do this. It is a Very Bad Idea. _________________ Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others. |
|
Back to top |
|
|
ugluk n00b
Joined: 06 Oct 2006 Posts: 64
|
Posted: Wed Oct 18, 2006 9:16 am Post subject: |
|
|
Thanks! Your replies were very instructive. I will still keep the emerge --sync in the script and put in the execution test from the guide.
but what if I'd add:
revdep-rebuild -X
echo -5 | etc-update
to the script? |
|
Back to top |
|
|
phajdan.jr Retired Dev
Joined: 23 Mar 2006 Posts: 1777 Location: Poland
|
Posted: Wed Oct 18, 2006 9:31 am Post subject: |
|
|
ugluk wrote: |
revdep-rebuild -X
|
Shouldn't be very dangerous but still could be. I wouldn't do that. revdep-rebuild sometimes misses broken packages, so the best way is revdep-rebuild --pretend, manual review, revdep-rebuild and optional corrections if it missed some package.
ugluk wrote: |
echo -5 | etc-update
|
Don't even think about it! It will wipe your config files, restoring default settings. You don't want that, right?
If you are really interested in automatic upgrades, search for the python script I wrote about earlier. |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
|
Back to top |
|
|
|