On Thu, Mar 12, 2009 at 04:35:50PM +0100, Jochen Krallmann wrote:
> Ceri Davies wrote:
> > On Wed, Mar 11, 2009 at 09:16:19PM -0400, Bob Doolittle wrote:
> >> Ceri Davies wrote:
> >>> Glad that "utuser -p" is on the right lines at least :)
> >>>
> >>> But there's no real lightweight way to get the DTU token ?  I need to be
> >>> able to disable speaker output if a session is migrated to a DTU in,
> >>> say, a library for example.
> >>>   
> >> I don't think we realized how common this request might be.
> >> If you have the latest 4.1 (or 4.0) patch, try utuser -xo. It's similar 
> >> to utuser -o, but includes the logical token as the first field.
> >>
> >> It's not documented, which should probably be corrected, since clearly 
> >> it has value to some users.
> >>
> >> utuser -xo is somewhat more expensive than utuser -p, because it has to 
> >> read and format records for all the tokens instead of just one, but it's 
> >> friendlier to parse and the difference in cost shouldn't be that great. 
> >> It's nowhere near as expensive as something involving a utauthd callback 
> >> - I wouldn't worry about it.
> > 
> > It's prettier, but I still need to run it through awk and I still don't
> > get the DTU id from it.  Does "utsession -l -t foo.wibble" do a utauthd
> > callback?
> > 
> 
> I believe the cheapest way to get the DTU id is to resolve the 
> $DTDEVROOT/unit symlink.

That looks like it will work, thanks.  I wonder if porting FreeBSD's
readlink(1) is a little over the top or if I should just use ls and grep
:)

Thanks again to all for their help, I think I'm covered now!

Ceri
-- 
That must be wonderful!  I don't understand it at all.
                                                  -- Moliere

Attachment: pgpQq3mHX6LoO.pgp
Description: PGP signature

_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

Reply via email to