Re: Xprint on NetBSD...

From: Frederick Bruckman (fredb_at_immanent.net)
Date: 11/27/03


Date: Wed, 26 Nov 2003 23:28:25 -0600

In article <3FC57729.455161AE@informatik.med.uni-giessen.de>,
        Roland Mainz <roland.mainz@informatik.med.uni-giessen.de> writes:
> Hubert Feyrer wrote:
>>
>> In comp.unix.bsd.netbsd.misc Roland Mainz <roland.mainz@informatik.med.uni-giessen.de> wrote:
>> > 1. I have no clue where the "xprint" init script (located at
>> > xc/programs/Xserver/Xprint/etc/init.d/xprint in CVS) should be placed in
>> > the NetBSD file hieracy... does anyone have a clue how the NetBSD
>> > startup system works ?

I don't see that file in an up-to-date XFree86 checkout. Does mozilla
maintain it's own private X tree?

>> If you're making a package, put your script into $PREFIX/etc/rc.d.
>> Also see /etc/rc.d for what comes in the NetBSD base system.
>
> How is that script executed then ?
> In SysV (like Solaris) and Linux the script is placed in /etc/init.d/
> and then the script gets linked to the single runlevels dirs... how does
> NetBSD do that ?

The recommended[*] way is for the user to copy the script into "/etc/rc.d",
and set $rcvar ("rcvar" is set in the script, usually to the name of the
command) to "YES" in "/etc/rc.conf". There are no "run-levels" -- the order
at startup is normally determined by topologically sorting via tags in the
scripts, but it's very easy to start just the network or just the services
you want. The main man page may be read at

  http://netbsd.gw.com/cgi-bin/man-cgi?rc+8+NetBSD-current

but it's probably easier to understand by looking at the scripts shipped
with the base system. The tags are essential, so a script written for SysV
or Linux WOULD NOT be adequate.
 
>> > 2. How does NetBSD handle the distribution of env variables ? Xprint
>> > needs the env variable XPSERVERLIST set that clients can locate the
>> > server (or servers).
>> > On Linux there are /etc/profile.d/xprint.sh (for sh/ksh/bash) and
>> > /etc/profile.d/xprint.csh (for csh&co.) - but how does NetBSD handle
>> > that case ?
>>
>> Hum, I'd install these as $PREFIX/share/examples/xprint/xprint.sh and
>> .../xprint.csh for lack of a better directory.
>
> That wouldn't help any users... the idea of these scripts is to
> distribute the XPSERVERLIST env variable that the matching applications
> can find the Xprint server(s) ...

I'm not sure what you're asking. Who needs the environment variable? All
users? There is an "/etc/profile", and an "/etc/csh.cshrc", but who knows
if users of an arbitrary shell will get those. A better design, IMHO, would
be to fall back to a host-wide configuration file at, say, "/etc/X11/Xprint"
or "/etc/X11/Xprint-config" (or a build-time configurable location).

> Is there a newsgroup for tech-pkg@netbsd.org or is that email-only ?

It's gated to news.netbsd.org (and others), but you have to email responses
to the list (no posting to the gateway). Anyone can email to the list. [The
gateway you're using probably works similarly -- your posts ARE NOT showing
up on netbsd-help or netbsd-users.] I read netbsd-bugs that way.
 
>> > Can anyone investigate the issue and comment in
>> > http://xprint.mozdev.org/bugs/show_bug.cgi?id=5038 , please ? Thanks! :)

Thanks for your interest in NetBSD, by the way.

I imagine, as long is it builds on NetBSD, interested folks will figure out
how to start it (and feed the script back to you). Is there any chance that
NetBSD support will make it into XFree86 4.4.0? XFree86 4.4.0 with IPv6
support will be really hard to pass up for NetBSD 2.0, so if so, then
Xprint will become part of the "base" system, so the startup script would be
installed on all NetBSD systems, same as the script for "xdm".

[*] There is no "recommended" way -- long story.

-- 
Frederick


Relevant Pages