pidof

1998-06-26 Thread Robert W. Canary

Hi,

I am trying to obtain the 'pid' of a script for when I do logging and
back tracking. The script is initiated from a shell command within the
ppp option files.  It happens like this:

A caller calls in and connects using ppp.  An ppp option file for that
serial port (ie options.ttyC6) includes the 'welcome' option.  The ppp
'welcome' option initiates a shell that takes a commandline for an
argument.  In this case the 'welcome /etc/sysconfig/network-scripts/isp
start ttyC6 '.

The isp script checks for and monitors the main connection to the
internet,  and logs to the syslogd. When the dialin user hangs up, pppd
will also kill the script.  

For logging and accounting purposes I need to track the connection and
up time of the connection. I will have to do this through pids.  The
problem is I cannot seemed to collect the correct pid. Every dialin
connection has an instance of the script, so sometimes i have 6 to 10 of
them all monitoring it own dialin port and insuring it has Internet
continuity. The only difference between each instance is the ttyCx
commandline option. The 'pidof' function keeps returning the pidof the
first instance.  When I do ps faux I see the pid in the logfile is not
the correct pid. In the script I do the following:

#!/bin/sh
#
# isp  This shell script takes care of starting and stopping
#  Main Internet Connection
#

# Source function library.
. /etc/rc.d/init.d/functions
ISPSH="sh $0 $1 $2"
PID=`pidof -s $ISPSH`
^--(back tic)-^ My email client changed this to '
INFOENTRY="-p local0.info -t isp.sh[$PID]"

--snip--

[ -f $SCRIPT_HOME/isp ] || exit 0
case "$1" in
  start)
logger $INFOENTRY "Looking for ISP Connection for $2"

--snip to EOF--

What kind of input can you give me on this?  Hopfully a solution.

thanks in advance
--
robert


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
 To unsubscribe: mail [EMAIL PROTECTED] with 
   "unsubscribe" as the Subject.




Re: Can't connect by SCRIPT just by HAND

1998-06-26 Thread Robert W. Canary

You may need to include the 'silent' option in yout /etc/options file. 
This will cause your connection to wait for the other end to send an LCP
packet efore it tries to negoiate.  Also,  I think the problem maybe
that the other end is waiting for the username and password.  Some ISP
do this for some strange reason.  "rname:" "yourusername" "ssword:"
"your password" try something like this in your chat script file.

hope this helps.
--
robert

Tacio Alessandro Grespan dos Santos wrote:
 
 Hi,
 
 I tried to connect by script without success. Everything goes right till
 I get the following:
 
 pppd[112]: Serial connection established.
 pppd[112]: Using interface ppp0
 pppd[112]: Connect: ppp0 -- /dev/ttyS2
 
 I checked then the debug file and I see that trying to negotiate the PPP
 session.
 It keeps sending the LCPs till it hangs up.
 
 pppd[244]: sent [LCP ConfReq id=0x1 asyncmap 0x0 magic 0xff4d0027
  pcomp accomp] Jun 22 20:28:29 porto last message repeated 9 times



-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
 To unsubscribe: mail [EMAIL PROTECTED] with 
   "unsubscribe" as the Subject.




Re: PPP desperation

1998-06-23 Thread Robert W. Canary

What port are you using? ttySx or cuax? Try *not* using the modem
symlink to your serial device try using /dev/ttySx directly.  This
does take care of alot of problems.

I'm here all night unless something breaks down, so reply quickly!

--
robert

Chris Mayes wrote:
 
 Hello.  Yes, it's me, again.  I have tried many, many ways of connecting with
 no luck.  None of the scripts I run even pick up the modem, nor do they report
 any errors.  pppd run with '-v chat my script' does exactly the same thing:
 nothing.  The only thing that can access my modem is minicom.  Heartened by
 this, I set minicom up with a script to automatically set up my PPP stuff.
 However, when I tried to use it, the display was appallingly slow, for some
 reason.  Instructions take nearly a minute to display.  The initialization
 string does not even show up until well after the handshake.  In any case, the
 script does not even initialize, possibly because of the massive delay.  When
 the login prompt finally creeps accross the screen, I perform the login
 manually.  When it gets to the ppp-start, the modem disconnects.  Any ideas?
 I'd still like to find out why none of the scripts access the modem correctly,
 or at all, and still do not report any problems.  Thanks in advance.
 
 Chris
 
 --
   PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
 http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
  To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
 To unsubscribe: mail [EMAIL PROTECTED] with 
   "unsubscribe" as the Subject.




Re: worng domain name in email header

1998-06-21 Thread Robert W. Canary

Hi agin Tony,

Thanks for patients! 

I insert the "ohiocounty.net" into the "sendmail.cw" file and it seems
to of taken care of the problem.

I got one more question for you.

Tony Langdon wrote:
 
 Actually, you can define users _not_ to be masqueraded (root,
 Postmaster, MAILER-DAEMON sometimes are set as not masqueraded).
 Everyone else will have the masqueraded domain as part of their email
 address.
 

Are these individual setting at the sendmail config level?

--
robert


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
 To unsubscribe: mail [EMAIL PROTECTED] with 
   "unsubscribe" as the Subject.




Re: worng domain name in email header

1998-06-18 Thread Robert W. Canary

Tony Langdon wrote:
 
 It's 18 Jun 98  16:13:22,
 We'll return to [EMAIL PROTECTED] and All's
 discussion of worng domain name in email header
 
  rw I don't know if this a sendmail problem or network configuration
  rw problem.
 
  rw All mail that goes through my SMPT is referanced as
  rw (user)@office.ohiocounty.net it is supposed to be
  rw (user)@ohiocounty.net.  If I try to send mail to an account with
  rw (user)@ohiocounty.net it gets returned to me (or whoever sends it).
  rw Even the mail daemon has an address of
  rw [EMAIL PROTECTED]
 
  rw any suggestion on this?
 
 By default, sendmail pulls out the hostname of the machine it's running
 on and puts it in the from: header.  This is a common problem for dialup
 users who fetch mail from a POP server, or networks where you want mail
 to go to the domain, not the host.
 
 If you use Netscape locally, you can fix it in Netscape.  If you use a
 shell based mail agent (e.g. elm, pine), you can get sendmail to
 masquerade as any domain you want.  In /etc/sendmail.cf, there is a line
 to configure masquerading.  Simply add the desired domain after this in
 the space provided for masquerading (the line beginning with DM) and
 remove any leading hash (#) to uncomment the line.
 
 DMohiocounty.net
 
 Also, you'll have to add ohiocounty.net to /etc/sendmail.cw, if you are
 running the machine as a mail server for a domain, so incoming mail to
 ohiocounty.net is treated as local mail.
 
 Finally, make sure you have the appropriate MX records in your DNS, so
 other hosts know where to send mail for your domain.
 

Well I don't except incoming mail other that an occasional return
receipt.  But I did (for the dial users) include a line that maps the
'mail.ohiocounty.net' to the SMTP server. This also the dialin server,
ftp, www, etc. ...

;
; Zone file for Ohiocounty.Net
;
;
@   IN  SOA office.ohiocounty.net. root.ohiocounty.net. (
1998042400  ; serial, todays date + todays
serial #
8H  ; refresh, Hours, Seconds
2H  ; retry
1W  ; expire
1D) ; minimum TTL
;
NS  office  ; Inet Address of NameServer
MX  10 mail ; Primary Mail Exchanger
;
localhost   A   127.0.0.1
ftp A   192.168.1.1
www A   192.168.1.1
office  A   192.168.1.1
mailA   192.168.1.1
office_two  A   192.168.1.90
dial-up A   192.168.1.100
ttyc0   A   192.168.1.101
ttyc1   A   192.168.1.102
ttyc2   A   192.168.1.103
ttyc3   A   192.168.1.104
ttyc4   A   192.168.1.105
ttyc5   A   192.168.1.106
ttyc6   A   192.168.1.107
ttyc7   A   192.168.1.108
~

 Dialup users fetching mail won't need to to do the last two steps (since
 their isp will be holding the mail), but instead, should make sure

I am thier ISP.  However, (to apply this) I guess your saying this is
not nesscary since netaddress.com (a free email server) will be holding
their mail.  I just relay it. A SMTP, that is all I do.

 important addresses such as MAILER-DAEMON and root aren't masqueraded
 (don't want to go impersonating your ISP, do you? :) ).  There is a
 space provided for this, which should be easily found from the comments
 in sendmail.cf.
 

thanks agin ;-)
--
robert


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
 To unsubscribe: mail [EMAIL PROTECTED] with 
   "unsubscribe" as the Subject.




Re: SMPT: We do not relay.

1998-06-17 Thread Robert W. Canary

Hi,

Tony Langdon wrote:
 
 It's 17 Jun 98  21:04:00,
 We'll return to Tony Langdon and [EMAIL PROTECTED]'s
 discussion of SMPT: We do not relay.
 
  TL As I have installed anti spam support on Red Hat 4.2 by hand (with the
  TL aid of docs from an email security site), I may be able to offer some
  TL form of explanation.
 
 Meanwhile, I caused myself the same problem... forgot to add localhost
 as a local machine, so sendmail complained, until I fixed it. :-)
 

How did complain? To give an "We do not relay" error?

--
robert


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
 To unsubscribe: mail [EMAIL PROTECTED] with 
   "unsubscribe" as the Subject.




Re: PPP CHAT script fails using PAP

1998-06-15 Thread Robert W. Canary

Hi,

enzyme wrote:

 LOCAL_IP=0.0.0.0# Local IP address if known. Dynamic = 0.0.0.0
 REMOTE_IP=0.0.0.0   # Remote IP address if desired. Normally 0.0.0.0

Try deleting both of these entries.  My chat config has them as:
LOCAL_IP=
REMOTE_IP=

Yes, both are blank.

hope this helps :-)

--
robert


begin:  vcard
fn: Robert W. Canary
n:  Canary;Robert W.
email;internet: [EMAIL PROTECTED]
tel;work:   812/853-4163
tel;fax:812/853-1052
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
version:2.1
end:vcard




Re: I m wandering if one day I could use ppp under Linux ;p

1998-06-12 Thread Robert W. Canary

Hi,

You really should try using minicom and manually dialing the ppp connection (as
outlined in the ppp HowTo).
This will give you the idea of what is going on with your connection.

--
robert

Antonio Iacovelli wrote:

 Hi,

 Here are my files for configuring ppp:

 1) /etc/resolv.conf
 search microtec.net
 nameserver 204.50.80.200

 2) /etc/ppp/ ppp-on
 TEL: 861-7915
 ACCOUNT= eva
 Password= 56redt6
 LOCAL_ IP=0.0.0.0
 REMOTE_IP=204.50.80.200
 NETMASK= 255.255.255.0
 DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
 .
 exec /usr/sbin/pppd lock modem crtscts /dev/cua3 57600 \
asyncmap 20A escape FF $LOCAL_IP:$REMOTE_IP \
 noipdefault netmask $NETMASK defaultroute connect \ 

 3) my /etc/ppp/pap-secrets
 Here there is my password, username,  and IP adress of my Isp and the
 symbol
 * under server.
 4) In /etc/ppp/options,
 I have entries like phone number..etc.

 I ve also configured ppp-on-dialer with just new entries such as my
 password, my username and phone of the connection.

 Then, I did: chmod +x /etc/ppp/ppp-on* at root.

 But when I do /etc/ppp/ppp-on at root, I get my modem ringing once (the
 phone dials once..) then nothing else happen: no handshake..nothing.
 What am I missing pls ?

 I have some additional questions pls:

 1. Why the * symbol in " chmod +x /etc/ppp/ppp-on* "?
 2. Why just one ring of my phone as if it was dialing someone s phone
 with no handshake...etc...

 Alan

 --
   PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
 http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
  To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.




-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
 To unsubscribe: mail [EMAIL PROTECTED] with 
   "unsubscribe" as the Subject.




Re: [Fwd: Sorry - no kernel support for PPP]

1998-06-04 Thread Robert W. Canary

Hi,

Sorry for the long delay in response.   No you can still use the RedHat Linux just
stick with distributed version.  And do no recompiling.  If you do only add do not
take away anything or change any of current settings.Are you getting this right
out of the distribution kernel?  If so try inserting the ppp.o manually.  If you
already did what error did you get?

--
robert

[EMAIL PROTECTED] wrote:

 Sorry had to resend (was using my other account ...)

  So you are telling me that RedHat released a faulty distribution?  I actually
  paid for this damned CD only to be told that I can't do something as basic as
  connecting to the internet?  Well one thing I can say for RedHat 5 is that the
  configuration of everything else was fine... Why wouldn't they actually tell
  people how to fix this as Linux is rather stagnant without an internet
  connection.
 
  Robert: Did you find a way to fix it or are you using another OS to connect to
  the i-net? What do you suggest that I do then? This seems to be a rather large
  and nasty bug...
 
  What's real funny is that with Slackware 3.2 the only thing I could get
  working was PPP but now that I have RedHat 5 the only thing I can't get
  working is PPP :(
 
  Canary, Robert W. wrote:
 
   I am using RHD5.0 also. With 2.0.33 I never have been able to get to
   recognize the PPP module and then I always get one dozen or so unresolved
   symbols from the insmod on boot up.  I finally gave up and stuck with
   distribution.  Until I could stand it no longer I discivered their are is a
   bug in the configuration.  Turns out that if some drivers are modulized
   then thier are certain others that are and are not to be modulized, however
   they did a very piss poor job in for warning people.  If Red Hat was able
   to builda kernel then I *know* they knew about it.
  
   --
   robert






-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
 To unsubscribe: mail [EMAIL PROTECTED] with 
   "unsubscribe" as the Subject.




Re: Cannot use auth for pppd

1998-05-30 Thread Robert W. Canary

Hi Casey,

We really need more infomation on this problem;

ppp version?
getty type: (mgetty or getty)?
config files for your modem, getty, and ppp.
log files are a must.

bye
--
robert

Casey Bralla wrote:

 I am trying to set up a dial-in ppp server.  I have gotten to the point
 where I can successfully dial-in and connect to my intranet.  However,
 I cannot get windows to connect, presumably because I have commented
 out the "auth" line in /ppp/options.  If I un-comment the auth line, I
 cannot connect at all.  The log file tells me that mgetty failed with
 the message "init chat failed, exiting ...: Invalid argument"

 Can anybody suggest where to look for the invalid argument?

 Thanks,

 Casey Bralla

 Chief Nerd in Residence
 NerdWorld.net
 (A Vorlon Information Technologies Company)

 --
   PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
 http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
  To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.




-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
 To unsubscribe: mail [EMAIL PROTECTED] with 
   "unsubscribe" as the Subject.




Importing Variables

1998-05-30 Thread Robert W. Canary

Hi,

I am trying to write a script that gives the specific information and
controls the Main Trunk connection when a dialin user calls in and
connect.   This script has been designed to be sensitive to the specfic
port list on the command line when the script is initiated.

I need to import into the script the actual speed that modem negeotiated
and the name of the user that is logging on.

mgetty is answering the phone and pass authentication to the ppp from
where the script is initiated in such away as to run in the background.

Also, how does one send AT commands to a modem from the command line or
in maybe even in a script form.

thanks in advance
--
robert


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
 To unsubscribe: mail [EMAIL PROTECTED] with 
   "unsubscribe" as the Subject.