Pipes, redirects, and rc.local (was: Conundrum with aucat and rc_scripts)

2011-09-09 Thread misc . openbsd
G0kita,

I've had a chance to review your advice, and I believe I've spotted a problem
with your redirects. The command that works for me is:

/usr/bin/aucat -o - 2/dev/null /dev/null | /usr/local/bin/lame -r -a -b 56 - -
2/dev/null | /usr/local/bin/ezstream -c /etc/ezstream.xml /dev/null 21 

Before the first pipe: aucat is sending audio to stdout, so we don't want to
mess with that. However, we want to disconnect terminal output (only stderr
remains) and terminal input so we redirect accordingly to /dev/null.

Before the second pipe: lame is receiving data from stdin and sending data to
stdout, so we don't want to mess with that. However, we want to disconnect
terminal output (only stderr remains) so we redirect accordingly to /dev/null.

After the second pipe: ezstream is receiving data from stdin, so we don't want
to mess with that. However, we want to disconnect terminal output (both stdout
and stderr in this final case) so we redirect accordingly to /dev/null.

The above works for me when added to rc.local, and works when added to my
watchdog script that is executed by cron.

Breeno


Quoting G 0kita goo...@gmail.com:

 If you throw it into rc.local you will have to disconnect it from the
 terminal for it to work.
 /etc/rc.local:
  /usr/bin/aucat -o - 2 /dev/null | /usr/local/bin/lame -r - - |
 /usr/local/bin/ezstream -q -c /etc/ezstream.xml  /dev/null  /dev/null
--snip--



Re: Pipes, redirects, and rc.local (was: Conundrum with aucat and rc_scripts)

2011-09-09 Thread misc . openbsd
Correction: This works fine from a script executed by cron. Still doesn't work
from rc.local. Anyone willing to impart some additional wisdom?

Breeno


Quoting misc.open...@mail.usask.ca:

 G0kita,

 I've had a chance to review your advice, and I believe I've spotted a problem
 with your redirects. The command that works for me is:

 /usr/bin/aucat -o - 2/dev/null /dev/null | /usr/local/bin/lame -r -a -b 56
 - -
 2/dev/null | /usr/local/bin/ezstream -c /etc/ezstream.xml /dev/null 21 

 Before the first pipe: aucat is sending audio to stdout, so we don't want to
 mess with that. However, we want to disconnect terminal output (only stderr
 remains) and terminal input so we redirect accordingly to /dev/null.

 Before the second pipe: lame is receiving data from stdin and sending data to
 stdout, so we don't want to mess with that. However, we want to disconnect
 terminal output (only stderr remains) so we redirect accordingly to
 /dev/null.

 After the second pipe: ezstream is receiving data from stdin, so we don't
 want
 to mess with that. However, we want to disconnect terminal output (both
 stdout
 and stderr in this final case) so we redirect accordingly to /dev/null.

 The above works for me when added to rc.local, and works when added to my
 watchdog script that is executed by cron.

 Breeno


 Quoting G 0kita goo...@gmail.com:

  If you throw it into rc.local you will have to disconnect it from the
  terminal for it to work.
  /etc/rc.local:
   /usr/bin/aucat -o - 2 /dev/null | /usr/local/bin/lame -r - - |
  /usr/local/bin/ezstream -q -c /etc/ezstream.xml  /dev/null  /dev/null
 --snip--



Re: Stuck with Dualdisplay xorg

2007-01-13 Thread misc . openbsd . org
This is not an OpenBSD question but since you ask, and I toyed with this
just yesterday:

To make dual head work with my ATI Radeon 9000 (on a T41) I need only
one line in the Device section:



Re: Stuck with Dualdisplay xorg

2007-01-13 Thread misc . openbsd . org
This is not an OpenBSD question but since you asked and I toyed with
this just yesterday...

To make dual head work with my ATI Radeon 9000 (on a T41) I need only
one line in the Device section:

Option CRT2Position RightOf  #(or LeftOf)

And as my screens are different sizes I also added

Option MergedNonRectangular true

I found that the device will run both screens without xinerama or
telling xorg there are two screens or any such thing - it all happens in
hardware - so I found I didn't need to confuse myself, or my machine,
with anything more than this.  Two lines in the device section was all i
needed; I didn't add another screen section nor alter the
ServerLayout section.  It just worked :)  Your mileage may vary.

I found both man 4 radeon and man xorg.conf useful.



Redirect to ftp-proxy when client is on localhost?

2006-07-04 Thread misc . openbsd . org
Hello,

I like the 3.9 ftp-proxy so much I'm thinking wouldn't it be nice if,
in addition to the clients inside my lan, ftp connections from this very
openbsd machine went through it also.

Is this just a silly idea?  Is this possible, trivial, tricky? Done
before?

I found nada on google, but a freebsd post attempting something similar
which suggested that as the initial packet never goes in to the ext_if
the obvious rdr won't work.  Instead it is necessary to snag it with on
a 'pass out' rule and use 'route-to' to pipe it back through localhost. 
Using this technique I can get tcpdump to prove these packets hit the
lo0 (although with their initial addresses)...

pass out quick route-to (lo0 127.0.0.1) proto tcp from any to any port
21

Great, that was 6 hours.  Now to push them through the proxy I'm
expecting an rdr similar to the text book example will lead me home.  No
luck so far...

rdr pass on lo0 proto tcp from any to any port 21 - 127.0.0.1 port 8021

... just doesn't seem to catch them.  I'm expecting ftp-proxy on full
debug would have something to say if it was getting them.

The last step would presumably be a 'pass out' for anything ftp from
user proxy.

I'm betting that some bright spark/anal geek has tried this before, and
perhaps hope that they can throw me a bone.  Otherwise am I just wasting
everyone's time and should follow the tried and true path like a good
sheep?

Thanks,
John.