Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Auto disconnect\shutdown?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
man named enis
n00b
n00b


Joined: 18 Jun 2003
Posts: 7

PostPosted: Wed Jun 18, 2003 11:25 am    Post subject: Auto disconnect\shutdown? Reply with quote

Hi! After using Mandrake and Redhat on and off for a couple of years I've decided to take the plunge and have a go with gentoo. I just had a couple of questions before I got started:

1. When I do the installation I want to download all the stuff first and then compile it all afterwards. I checked around on the forums and found this: "emerge -f pkg" will that work for what I'm trying to do?

2. My Download limit is fairly small (1000mb) but my ISP has this off-peak thing where if you connect after midnight and disconnect before 7pm, any downloads do not count towards your usage. The connecting after midnight bit I have no problems with but I was wondering if anyone knew a way to set a timer so that my internet connection (PPPoE) will disconnect or my computer will shutdown (thus disconnecting me) after about, say, 6 hours?

3. Lastly, will I be able to resume where I left off if my installation doesn't finish in one go?

Thanks in advance!
Back to top
View user's profile Send private message
dmitchell
Veteran
Veteran


Joined: 17 May 2003
Posts: 1159
Location: Austin, Texas

PostPosted: Wed Jun 18, 2003 11:31 am    Post subject: Reply with quote

Yes, emerge -f will do what you want. You can continue an installation after an error as long as you don't reboot your computer. If a download or a compile fails you can try it over and over again.
_________________
Your argument is invalid.
Back to top
View user's profile Send private message
man named enis
n00b
n00b


Joined: 18 Jun 2003
Posts: 7

PostPosted: Wed Jun 18, 2003 11:47 am    Post subject: Reply with quote

Thanks for the help danmitchell! Can anyone help me out with the second question?
Back to top
View user's profile Send private message
Senso
Apprentice
Apprentice


Joined: 17 Jun 2003
Posts: 250
Location: Montreal, Quebec

PostPosted: Wed Jun 18, 2003 12:31 pm    Post subject: Reply with quote

I guess some kind of cron job starting every day at 6:50, bringing down eth0 or whatever interface you use would be possible.

/etc/init.d/net.eth0 stop (or something like that, I'm at work and don't remember the command) should disconnect you.

IMO, lazarusrat's idea below is better, at least if you don't plan on doing this everyday for weeks.


Last edited by Senso on Wed Jun 18, 2003 12:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
lazarusrat
Guru
Guru


Joined: 17 Jul 2002
Posts: 305
Location: Lafayette, IN

PostPosted: Wed Jun 18, 2003 12:37 pm    Post subject: Reply with quote

As root, either background the emerge or switch to another virtual terminal:
Code:
sleep 6h; /etc/init.d/net.eth0 stop


sleep will make it pause that long (6 hours, you can also use m for minutes or s or nothing for seconds) before running the next command. You could just as easily run some other command instead.

No guarantees on this, just the first thing that occured to me. :)
Back to top
View user's profile Send private message
man named enis
n00b
n00b


Joined: 18 Jun 2003
Posts: 7

PostPosted: Wed Jun 18, 2003 12:41 pm    Post subject: Reply with quote

Thanks everyone! i'm gonna test these ideas out tomorrow (cos it's getting late in Australia) but if you've got other ideas don't be afraid to post 'em. Can't hurt to have many things to try, right?
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Wed Jun 18, 2003 1:08 pm    Post subject: Reply with quote

To make emerge download all the sources first, do --fetchonly (whoops, just realized that's the same as -f, so you're fine with the way you had it). so, what it could look like if you wanted to (let's say it was 10:00) wait 2 hours and install kde and openoffice-bin is:


Code:
sleep 2h; emerge --fetchonly kde openoffice-bin ; /etc/init.d/net.eth0 stop ; emerge kde openoffice-bin


You might have to change the "/etc/init.d/net.eth0 stop" part if it's different for pppoe though. Gotta love the unix shell for this kind of stuff.

As for your third question, you can (attempt) to resume a compilation with the --resume command, so let's say kde didn't get done from our last command above:

Code:
emerge --resume kde


(note: emerge automatically resumes downloads with or without --resume, this is just for the actual compilation)

Hope this helps - good luck
Back to top
View user's profile Send private message
man named enis
n00b
n00b


Joined: 18 Jun 2003
Posts: 7

PostPosted: Thu Jun 19, 2003 12:03 am    Post subject: Reply with quote

Thanks alot to everyone who helped out. Hopefully I'll be running Gentoo shortly! :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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