LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-15-2004, 04:57 PM   #1
mrtwice
Member
 
Registered: Feb 2002
Distribution: xubuntu 8.10
Posts: 225

Rep: Reputation: 31
pppd ip-up script does not appear to be running


I am attempting to get my dial-up working as needed, however I can't seem to get the /etc/ppp/ip-up script to run. Here is what I have.

Code:
root@gateway:/etc/ppp# ls -l
total 60
-rw-------    1 root     root          318 Jun 15 16:39 connect-errors
-rwxr-xr-x    1 root     root         1208 Mar 30 12:58 ip-down*
-rwxr-xr-x    1 root     root         1208 Jan  7 12:03 ip-down.OLD*
-rwxr-xr-x    1 root     root         2104 Jun 15 16:20 ip-up*
-rwxr-xr-x    1 root     root         1945 Jan  7 12:03 ip-up.OLD*
-rw-------    1 root     root          585 Jun 15 16:38 options
-rw-------    1 root     root          655 Mar 30 12:58 options.demand
-rw-------    1 root     root          213 Mar 30 12:58 pap-secrets
drwxr-xr-x    2 root     root         4096 Mar  2  2003 plugins/
-rw-------    1 root     root          125 Jun 15 16:28 pppscript
-rw-------    1 root     root         8992 Mar 30 12:58 pppsetup.txt
-rwx--x--x    1 root     root         2279 Jan  9 11:00 redialer*
-rw-r--r--    1 root     root           25 Jun 15 13:57 resolv.conf
Notice that ip-up is readable and executable by root. I run:

Code:
root@gateway:/etc/ppp# pppd nodetach connect 'chat -v -s -f /etc/ppp/pppscript'
timeout set to 60 seconds
abort on (ERROR)
abort on (BUSY)
abort on (NO CARRIER)
abort on (NO DIALTONE)
send (AT&FH0w1^M)
expect (OK)
AT&FH0w1^M^M
OK
 -- got it

send (atdt7328669^M)
timeout set to 75 seconds
expect (CONNECT)
^M
atdt7328669^M^M
+MCR: V92^M
^M
+MRR: 26400,48000^M
^M
+ER: LAPM^M
^M
CONNECT
 -- got it

Serial connection established.
Using interface ppp0
Connect: ppp0 <--> /dev/modem
local  IP address 64.45.254.95
remote IP address 207.14.219.125
Here is the ip-up file:
Code:
root@gateway:/etc/ppp# cat ip-up
#!/bin/sh
#
# This file /etc/ppp/ip-up is run by pppd when there's a
# successful ppp connection.
#
# Put any commands you want run after a successful connection
# in this file.
#
# Any commands you want printed to the screen should be directed
# to: >/dev/tty0
#
# Other commands should not be directed to: >/dev/tty0
#
# The companion file is /etc/ppp/ip-down, it's run when the PPP
# connection ends.
#
# This file is created when you run pppsetup: Tue Mar 30 12:58:20 CST 2004
#
# The environment is cleared before executing this script
# so the path must be reset.
#
PATH=/usr/bin:/usr/sbin:/usr/local/bin:/sbin:/bin
export PATH

# This will print to the screen the local & remote IP address when you
# make a successful ppp connection.  $4 = Local IP $5 = Remote IP
#
# The CARRIER speed at which you connected will be reported, if it's in
# the /var/log/messages file.  You also need the programs "tail" "cut"
# "tr" "grep" and "syslogd" running for this to work.
# You may have to add S95=46 to your modem init string
# to get your modem to report the DCE = CARRIER speed.
# Example: AT&FS95=46

if [ -s /var/log/messages ] && ( ps xc 2>/dev/null | grep -q syslogd 2>/dev/null ); then
S=`tail -n 30 /var/log/messages 2>/dev/null | grep "CARRIER[^)]" 2>/dev/null | tr -d "^M" 2>/dev/null | cut -d: -f4 2>/dev/null`
echo -n "$S" >/dev/tty0
echo " Local: $4 -> Remote: $5 $1" >/dev/tty0
else
echo " Local: $4 -> Remote: $5 $1" >/dev/tty0
fi

# If you want to ping the other end to keep the connection open.
# The output from ping will goto >/dev/null, you won't see it.
# Ping -i 60 = send ping every 60 seconds to remote = $5.

#(ping -i 60 $5 &) >/dev/null 2>&1

# If you want sendmail to send any mail in /var/spool/mqueue when
# you connect, remove the # below.

#sendmail -q

# If you want fetchmail to get your mail when you connect and check
# every 300 seconds = 5 minutes for mail, remove the # below.

#fetchmail -d 300

#Restarts the firewall because it can get messed up sometimes
echo "Restarting firewall.." >/dev/tty0
/etc/rc.d/rc.firewall restart >/dev/tty0
echo "whatever"
# End...
Notice that none of the messages are printing in the output and my firewall is not restarting. So, I am assumin that this file is not being run as it should be.

Code:
root@gateway:/etc/ppp# cat options
# General configuration options for PPPD:
lock
defaultroute
noipdefault
modem
/dev/modem
115200
crtscts
persist
passive
asyncmap 0
name "kenbarnes"
Code:
root@gateway:/etc/ppp# cat pppscript
TIMEOUT 60
ABORT ERROR
ABORT BUSY
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
"" "AT&FH0w1"
OK "atdt7328669"
TIMEOUT 75
CONNECT
This is really bothering me as it shouldn't be this complicated. Maybe I have been messing with it too long and am missing something simple. Help would be much appreciated. Thank you.
 
  


Reply



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
how to run script after connecting with pppd maginotjr Linux - Networking 1 11-20-2005 07:12 AM
PPPD Script problem when cron-scheduling the script andresurzagasti Linux - Networking 0 11-24-2004 02:54 PM
PPPD how do I know what to put in the script? jimdaworm Slackware 4 02-29-2004 12:02 PM
Problem running pppd on Redhat Linux EL 3.0 brianvdc Linux - Software 0 12-10-2003 05:14 PM
Intuitive pppd redial script Moltag Linux - Networking 1 09-16-2003 09:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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