![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2004
Posts: 1
Rep Power: 0
![]() |
Sup all
This is my first shell script, I'm fairly lost. It does what I want it to.. drops eth0, dials, starts my firewall script, saves to iptables and checks ifconfig. Though I have to listen for the dialing to finish, then press ENTER. But so far that's the only way I know how to do it. I'd rather have it verify that ppp0 is up then execute the rest, but that's beyond me yet. Here it is: #!/bin/sh #zdawgs script to stop/start eth0 and dialout IFCONFIG=/usr/sbin/ifconfig ifconfig eth0 down && pon echo; echo "Down eth0... dialing..." echo "Press ENTER when dial ready." read ready ifconfig eth0 up && zwall && iptables-save && ifconfig exit 0
__________________
Me & Myself just ganged up on I....... Now We all have problems..and none of Us are speaking! |
|
|
|
|
|
#2 |
|
PFO Founder
![]() ![]() |
sorry i cant help you out, im not very strong on my shell scripting sorry. maybe someone else will beable to help. or if you figure it out let us know what you had to do to fix it
![]()
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#3 |
|
Newbie
|
try adding an if....fi statement to it that includes the following:
ifconfig|grep ppp0
__________________
int main{ int count; for(count=0;count<99;count++){ printf("I will not throw paper airplanes.\n");} } |
|
|
|
|
|
#4 |
|
Programming Guru
![]() ![]() ![]() |
You could also try using a sleep command to wait for a specific interval to
allow the process to finish. IR
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|