LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-10-2003, 05:09 AM   #1
SWAT
Member
 
Registered: Aug 2003
Posts: 36

Rep: Reputation: 15
Bash scripting


I have a ADSL USB modem installed on my Debian3.0 computer. I want this computer to [list=1][*]Start uploading the firmware to my USB modem(and wait 20 seconds, because the uploading takes this long)[*]Start PPPd (the actual connection)[*]After succesfull PPPd start & login into the network (20 seconds wait) I want the PC to start services like Eggdrop, Bouncer etc. (internet services)[/list=1]
Can anyone give me tips/hints how to write this as a nice script?
Or does anyone have a better idea how to do this?

Can I add the script (using Webmin) to boot at startup, but as the last possible script? (because the devUSBfs etc. must have loaded already)

HELP!
 
Old 11-10-2003, 06:00 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
It sounds like a pretty straightforward script and it should be very easy to implement. For reference, download the Advanced Bash Scripting Guide (scroll down a little bit and it's there), it's very useful.
Code:
#!/bin/bash
<commands for uploading the firmware>
sleep 20
/etc/init.d/pppd start # Or whatever the PPPd script is called
blah
I don't think you would need to use a "sleep 20" line after the firmware is uploaded - the script executes one line at a time so PPPd won't be launched until the prior command (the upload) is done. You could also some simple error checking and reporting with the script.

Håkan
 
Old 11-11-2003, 03:21 AM   #3
SWAT
Member
 
Registered: Aug 2003
Posts: 36

Original Poster
Rep: Reputation: 15
Hmm... thnx dude, I'll try it.
 
  


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
Bash scripting help (su ...) shwong Linux - General 1 11-02-2005 12:26 PM
Bash scripting pete1234 Programming 1 09-27-2005 01:48 AM
bash scripting vadon Linux - Newbie 6 05-10-2005 04:07 AM
need help with bash scripting rich2oo1 Programming 2 12-17-2003 12:50 PM
HELP with BASH scripting atwah Linux - Newbie 6 09-09-2003 01:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:14 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