From: Christopher Fowler <cfowler@outpostsentinel.com>
To: linux-ppp@vger.kernel.org
Subject: Re: serial device access from welcome script
Date: Tue, 12 Sep 2006 10:29:09 +0000 [thread overview]
Message-ID: <1158056949.2615.98.camel@shuttle.linxdev.com> (raw)
In-Reply-To: <200609061445.20406.thilo@riessner.de>
Use the files /dev/stdin and /dev/stdout
On Thu, 2006-09-07 at 16:44 +0200, Thilo Riessner wrote:
> Am Mittwoch, 6. September 2006 23:53 schrieben Sie:
> > Thilo Riessner writes:
> > > >From a program called by the welcome script which tries to access the
> > > > serial
> > >
> > > port (in this case /dev/ttyI0) I get the errormessage:
> > > Port or socket open error!
> > > I guess, that the serial port is blocked by the pppd.
> > > Is there any possibility to access the serial port nevertheless?
> >
> > You shouldn't be trying to access the port directly. Instead, when
> > the "welcome" script runs, your script's standard input and standard
> > output are connected directly to the tty.
> >
> > You should be able to use 'read' and 'echo' (or whatever your
> > scripting language supports) without having to open anything.
> >
> > This is true for "connect", "disconnect", "init", and "pty" as well.
> Thanks for your hint, but I have the problem, that the program (which is a
> binary program) I am running out of my welcome script (which is a bash
> script) does not support the usage of stdin and stdout, but it demands the
> usage of a device for reading and writing. Is there a trick that I could use
> in the welcome script to redirect stdin and stdout to a "device" and use
> that device in the program, which is called from the welcome script.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2006-09-12 10:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-06 12:45 serial device access from welcome script Thilo Riessner
2006-09-06 12:53 ` Thilo Riessner
2006-09-06 21:53 ` James Carlson
2006-09-07 6:45 ` Pieter Loubser
2006-09-07 11:59 ` James Carlson
2006-09-07 14:44 ` Thilo Riessner
2006-09-12 10:29 ` Christopher Fowler [this message]
2006-09-13 8:13 ` Thilo Riessner
2006-09-13 15:55 ` Bill Unruh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1158056949.2615.98.camel@shuttle.linxdev.com \
--to=cfowler@outpostsentinel.com \
--cc=linux-ppp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox