Re: [ILUG] ypserv domainname on RH7.1 ??????

From: Glen Gray (glen at domain antefacto.com)
Date: Wed 17 Oct 2001 - 11:07:23 IST


On Tue, 2001-10-16 at 18:44, Paul Jakma wrote:
> it's NISDOMAIN.
>
Yup, it was him.

The problem lies in the way that the domainname is never actually set.
Instead ypserv picks up the environment var that is created in the
/etc/init.d/ypserv script by sourceing /etc/sysconfig/network. The var
is obviously only available inside the shell "session", so logging in
and running "nisdomainname" from the console will yield a "(none)"
response. Also running make in /var/yp will result in a subdir called
(none).

So in short I had actully put in the correct setting into
/etc/sysconfig/network, however there was now way to tell from the
console that the domain name was setup correctly.

I added the following to the start function in the /etc/init.d/ypserv
script.

# Set the NIS domain name
if [ -n "$NISDOMAIN" ]; then
    action "Setting NIS domain name $NISDOMAIN: " domainname $NISDOMAIN
else
    domainname ""
fi

-- 
_______________________________________
Glen Gray             Software Engineer
a n t e f a c t o     t: +353 1 8586006
www.antefacto.com     f: +353 1 8586014
181 Parnell Street - Dublin 1 - Ireland


This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:12:47 GMT