Subject: RE: /var/run vs /proc & newbie questions
To: None <port-alpha@NetBSD.ORG>
From: Michael G. Schabert <mikeride@prez.buf.servtech.com>
List: port-alpha
Date: 06/14/1998 14:40:36
>The pid files for pppd are stored in /var/run.  Thats how it is on all the
>ports I use.  /proc, if it exists (read: make sure you mounted it!) will also
>contain the pid info needed for pppd. (though I'd be interested to learn
>exactly how it fetches the pid outta there)  I'll bet your mac has a /var/run
>entry as well for it.

I already reformatted the MacBSD drive but from what I'm reading, I
certainly believe you are right that the /var/run exists. I was ignorant
because the Mac port took care of mounting the /proc. I never did anything
there to make it mount, so I just assumed that it was "s'posed to be
there". I was using pre-done scripts that users of MacBSD made available to
idiot-proof dialup PPP connections. Here's the ppp-down script to give you
an idea:

#!/bin/sh
p=`cd /proc; grep -l '^pppd' */status | sed 's,^\([0-9]*\)/.*$,\1,'`
#
if [ -n "$p" ]; then
  echo -n killing pppd...
  kill $p
  if [ -f /etc/resolv.conf ]; then
    mv /etc/resolv.conf /etc/resolv.conf.down
  fi
  echo done
else
  echo ppp already is down 1>&2
fi



>EEEk!   Take that secure port out!!  If you want root accees, either add a
>user
>to the wheel group, or use ssh to get into root.  Secure means "physically
>secure".  As far as using a console port as a modem/isdn connection.. I'm not
>actually sure how the SRM would cope with that.  If it detects a keyboard
>missing, it places the console on the serial device.  It might not do so
>if you
>manually overrode that.  But I would be skeptical. They do sell nifty little
>"dummy keyboards" that are just little plugs that trick machines into thinking
>a kbd is attached, if your SRM chokes on it.  You probably wouldn't need to
>bring pppd down on port C1, you could most likely leave it up and manually
>change the default routes back and forth in your script.

I hava a real keyboard that I can attach to it, but the problem is that
with the keyboard attached, it doesn't finish boot. I'm assuming this is
because I have no video, so it fails any checks for that. When there's no
kbrd attached, then it just uses serial-out for the console & doesn't need
video. I understood the security issues, & knew what secure was meant for,
I was just hoping that there was some way to declare the ethernet to be
secure, as my in-home Ethernet is quite "physically secure" (as it's a
single crossover cable at the moment). The main reason that I'm not worried
about the secure port is that there's only one, & until I'm logged into it,
there's no network besides my home. PPP isn't there until I tell it to go
up. As long as I keep a telnet session on tty0, then I'm still safe (in as
far as I understand).

The reason that I would be bringing pppd down on port C1 is because wanted
to log into my ISP on port C0 at that point. I can't connect both my analog
and ISDN units to the same ISP at the same time, so I must kill the first
in the script that starts the second.

I guess that my options if I want two serial modems available would be (1)
get a cheap VGA card to get console off serial, or (2) get a cheap ISA I/O
card to give me additional ports. I'll start looking around for cheap
sources.

Thank you all for all of your help,
Michael G. Schabert

Bikers don't *DO* taglines.