LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 01-18-2004, 06:18 PM   #1
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Bootscripts - pause at init 3?


Hello people. I'm very pleased with myself as I've recently done LF Scratch. It's been a lot of hard work but it's been very rewarding as I've learnt an enormous amount and I've done it all myself (well, Google helped a fair bit), this is the first time I've asked for help. The thing is, the driver for my modem, an Alcatel Speedtouch, works as a Kernel module which loads at boot. The problem is, the Nvidia module seems to put it of it's stride. If I boot to init 5, the Nvidia module stops the modem connecting to my ISP and I have to unplug it and plug it in again, the hotplug script notices it and it then connects. I don't like doing that though so what I do is boot to init 3, type root, password, init 5 and by the time I've done that the modem has done it's thing and the GDM takes me to my Gnome desktop.
So what I'd like to know, is it possible to make the boot scripts pause for about 10 seconds at init 3 to let the modem draw breath? On Mandrake it pauses for about 30 seconds during the boot process to let the modem connect and then moves on. I will study the way they do it but I would be grateful for any assistance, if someone could give me a few tips and point me in the right direction.
 
Old 01-19-2004, 03:41 AM   #2
mdh
Member
 
Registered: Nov 2002
Location: Melbourne, Australia
Distribution: (C)LFS (x86_64, ix86, sparcv9, ppc)
Posts: 122

Rep: Reputation: 16
Re: Bootscripts - pause at init 3?

sleep 10
will cause a script to sleep for 10 seconds.
 
Old 01-19-2004, 09:55 AM   #3
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Original Poster
Rep: Reputation: 64
Thanks, but I did know that. I was hoping someone would be able to point me towards a script I could put it in.
 
Old 01-19-2004, 01:48 PM   #4
mdh
Member
 
Registered: Nov 2002
Location: Melbourne, Australia
Distribution: (C)LFS (x86_64, ix86, sparcv9, ppc)
Posts: 122

Rep: Reputation: 16
If all you want to do is pause for 10 seconds at the end of runlevel 3,
just create a script in /etc/rc.d/init.d as say "pause", should only be

#!/bin/sh
sleep 10

Then just create a symlink under rc3.d pointing to it to as S99pause .

Ugly hack of a workaround to your issue, but hey, it'll do the job till you
come up with something better...
 
Old 01-19-2004, 02:44 PM   #5
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Original Poster
Rep: Reputation: 64
Sadly it doesn't work (yes, I did remember to chmod 755). The script runs if I open it in a terminal but if I run it during boot as you described, there is no pause. Presumably the script is still running in the background somewhere, meanwhile the boot process is busy starting Gnome and...no internet. Thanks for your time.
 
Old 01-28-2004, 06:20 PM   #6
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Original Poster
Rep: Reputation: 64
Yay! It works! The answer was so obvious I'm ashamed it took so long for the penny to drop. All it needed was
Code:
#!/bin/bash
sleep 20
init 5
The pause script sleeps in the background for 20 second while the modem settles down and then takes me into Gnome without typing a thing. Thanks for your help mdh. Sorry for being so thick.
 
Old 01-28-2004, 08:00 PM   #7
mdh
Member
 
Registered: Nov 2002
Location: Melbourne, Australia
Distribution: (C)LFS (x86_64, ix86, sparcv9, ppc)
Posts: 122

Rep: Reputation: 16
Don't mention it :-)

It's an interesting issue you have, if you feel the need to you may want to
make note of it on lfs-support, you won't be the only one that runs into
this... and we may come up with a better way. (note I'm not on that list,
only really lfs-dev and lfs-hackers).

Good luck with your LFS'ing mate
[R]
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hotplug-ng-002 + LFS bootscripts 3.2.2 = a complete mess :( ParticleHunter Linux From Scratch 1 07-21-2005 09:27 PM
how does one go about writing and implementing sysvinit bootscripts? behmjoe Linux - Software 2 05-02-2005 04:30 PM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-18-2004 11:10 PM
RH & HP4050N PCL - page, pause, page, pause, page andguent Linux - Hardware 0 11-10-2003 08:35 AM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 01:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration