Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Apr 7th, 2004, 7:04 PM   #1
zdawg
Newbie
 
Join Date: Mar 2004
Posts: 1
Rep Power: 0 zdawg is on a distinguished road
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!
zdawg is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:33 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC