View previous topic :: View next topic |
Author |
Message |
man named enis n00b
Joined: 18 Jun 2003 Posts: 7
|
Posted: Wed Jun 18, 2003 11:25 am Post subject: Auto disconnect\shutdown? |
|
|
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 |
|
|
dmitchell Veteran
Joined: 17 May 2003 Posts: 1159 Location: Austin, Texas
|
Posted: Wed Jun 18, 2003 11:31 am Post subject: |
|
|
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 |
|
|
man named enis n00b
Joined: 18 Jun 2003 Posts: 7
|
Posted: Wed Jun 18, 2003 11:47 am Post subject: |
|
|
Thanks for the help danmitchell! Can anyone help me out with the second question? |
|
Back to top |
|
|
Senso Apprentice
Joined: 17 Jun 2003 Posts: 250 Location: Montreal, Quebec
|
Posted: Wed Jun 18, 2003 12:31 pm Post subject: |
|
|
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 |
|
|
lazarusrat Guru
Joined: 17 Jul 2002 Posts: 305 Location: Lafayette, IN
|
Posted: Wed Jun 18, 2003 12:37 pm Post subject: |
|
|
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 |
|
|
man named enis n00b
Joined: 18 Jun 2003 Posts: 7
|
Posted: Wed Jun 18, 2003 12:41 pm Post subject: |
|
|
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 |
|
|
BradN Advocate
Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Wed Jun 18, 2003 1:08 pm Post subject: |
|
|
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 |
|
|
man named enis n00b
Joined: 18 Jun 2003 Posts: 7
|
Posted: Thu Jun 19, 2003 12:03 am Post subject: |
|
|
Thanks alot to everyone who helped out. Hopefully I'll be running Gentoo shortly! |
|
Back to top |
|
|
|