SUMMARY: /var/yp directory structure

2007-12-24 19:34:00

I received three responses. Thanks to the following people for taking
the time to get back to me:

David Foster
Devin Ganger
Darren Dunham

They basically confirmed what I had figured.

1. "What does it matter? The convention is to put the maps in
/var/yp/`domainname`, and put the source files in another
directory under /var/yp."

I guess I'm being overly anal, and like to put a bit more logical
structure to all this. I'll stick with this, but I'm still going
to tuck the timestamp files away from /var/yp, and in the same
subdir as the maps, /var/yp/$(DOM), as I think the default just
too cluttered.

2. "yppush is an executable that doesn't read the Makefile, and it has
no way to specify where the maps are, so I'd say you can't change
their location. I suppose you could replace yppush with something
else... but what?"

That's what I was afraid of. I was hoping for an environment
variable, or a command line option or a config file. *sigh*

3. One person had offered to send me the original version 1.17 of the
nis Makefile that came from Solaris 2.5.1, but I haven't yet heard
back from him. If anyone else has a copy of that file available,
please contact me to see if I still need a copy. Thanks in advance.

--
Mike van der Velden email mvanderv at redback.com
System Administrator voice (604) 629-7281
Redback Networks Canada, Inc. pager (604) 868-1562
305 - 8988 Fraserton Court fax (604) 433-0257
Burnaby, BC. Canada

Mike van der Velden wrote:
>
> I'm trying to clean up my NIS directory structure in /var/yp. I come
> across three things that have me stumped.
>
> I'm running Solaris 2.6 on my NIS server, fwiw, but the problem seems to
> be there on all Solari up to and including 8.
>
> 1. I'd like to set up my yp directory like this:
>
> /var/yp/`domainname`/{src,timestamps,dbmaps}
>
> I have the following defined in the Makefile to support this:
>
> YPSRCDIR=/var/yp/$(DOM)/src
> YPTSDIR=/var/yp/$(DOM)/timestamps
> YPDBDIR=/var/yp/$(DOM)/dbmaps
>
> The problem is that yppush doesn't work. It appears that yppush
> *insists* on finding all of its maps in /var/yp/`domainname`. There
> doesn't even seem to be an option to give it a different directory
> name.
>
> Is there any way around this, or do i need to dream up a different
> directory structure? Suggestions welcome.
>
> 2. The domainname is usually set in the Makefile like this:
>
> DOM = `domainname`
>
> However, make doesn't eval that in place like a shell script would.
> Instead it copies that string verbatim throughout the file, which
> ends up doing stupid things like
>
> don't know how to make /var/yp/`domainname`/ethers
>
> because the backticks end up on the LHS of a make directive. I work
> around this by hardcoding the domainname in the Makefile, or by
> passing this along on the command line:
>
> make DOM=`domainname`
>
> Any better ideas?
>
>
> 3. The Makefile I inherited seems to have originated from version 1.17,
> which I believe came with 2.5.1. The version of Makefile that came
> with Solaris 8 is 1.26. I'd like to apply all the changes incorpra-
> ted into 1.26 into my Makefile, but I don't want to redo all my
> edits. 'patch' is the obvious solution:
>
> diff -c Makefile.117.orig Makefile.126.orig > patchfile
> patch Makefile < patchfile
>
> The problem is, I can no longer find an original version 1.17 of the
> Makefile. Our repository doesn't have it, and I don't have the 2.5.1
> server distro CDs. Can one of you kind souls send me a copy of 1.17
> of the Makefile? I realize I'll probably get flooded, but at least
> I'll have a copy.
>

Comments

Got something to say?

You must be logged in to post a comment.