Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
crond woes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
ugluk
n00b
n00b


Joined: 06 Oct 2006
Posts: 64

PostPosted: Tue Oct 17, 2006 7:49 am    Post subject: crond woes Reply with quote

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
View user's profile Send private message
phajdan.jr
Developer
Developer


Joined: 23 Mar 2006
Posts: 1764
Location: Poland

PostPosted: Tue Oct 17, 2006 2:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2671
Location: here, there or in transit

PostPosted: Tue Oct 17, 2006 2:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
ugluk
n00b
n00b


Joined: 06 Oct 2006
Posts: 64

PostPosted: Wed Oct 18, 2006 9:16 am    Post subject: Reply with quote

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
View user's profile Send private message
phajdan.jr
Developer
Developer


Joined: 23 Mar 2006
Posts: 1764
Location: Poland

PostPosted: Wed Oct 18, 2006 9:31 am    Post subject: Reply with quote

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
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Wed Oct 18, 2006 5:46 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Duplicate Threads.
See https://forums.gentoo.org/viewtopic-t-506441-highlight-.html
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum