Re: NIS configuration

2002-11-22 Thread Thomas Lange
> On Wed, 18 Sep 2002 17:19:06 -0400, [EMAIL PROTECTED] said:

> Yah, it's too bad the NIS gets defined if YPDOMAIN is defined.

This is not a bug, it's a feature! Fix the entiries in your DHCP or
BOOTP server. Why should a YPDOMAIN be defined, if you do not want to
be a NIS client?


> ...which employs that undefclass() function mentioned in my
> earlier diffs.  This is not necessarily the right way to do
> this, but works for me.
A undefclass() function is very bad. Classes should only be added to
the list. Otherwise the class concept is going very complicated when
we can also remove classes from the list or move them inside the list.

-- 
Gruss Thomas



Re: NIS configuration

2002-09-19 Thread pll


In a message dated: Thu, 19 Sep 2002 11:32:13 EDT
AUSTIN MURPHY said:

>Why not just modify S24nis.sh to set $YPDOMAIN="" if NONIS is defined?

You could do that to, but you need to somehow get NONIS defined.  If 
you do this in the dhcpd.conf file by setting 'option nis-domain' to 
an empty string for a spefic client, then you don't really need to 
bother with modifying FAI scripts that much.

>PS. thanks Thomas for explaining how bootp/dhcp sets $YPDOMAIN.

Ahm was this a private e-mail, or did I miss this post?  Was it 
overly different from what I explained?  Just curious, as I don't
want miss any good information :)
-- 

Seeya,
Paul
--
It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.

 If you're not having fun, you're not doing it right!





Re: NIS configuration

2002-09-19 Thread AUSTIN MURPHY

Why not just modify S24nis.sh to set $YPDOMAIN="" if NONIS is defined?

Maybe something like this would work:

ifclass NONIS && YPDOMAIN=""

Then you could set NONIS in the S01alias.sh (or any other script
S02 - S23) and prevent NIS from being configured.

--
Austin

PS. thanks Thomas for explaining how bootp/dhcp sets $YPDOMAIN.


On Thu, 19 Sep 2002 [EMAIL PROTECTED] wrote:

> I can see why you'd be curious.  The problem for me
> is that my DHCP server has a single global nis-domain
> definition that gets handed to all clients, ...

> ... and that when I say
> NONIS, I really do actually mean it...




Re: NIS configuration

2002-09-19 Thread pll


In a message dated: Thu, 19 Sep 2002 11:02:29 EDT
[EMAIL PROTECTED] said:

>I could lose the global definition, but then I'd
>be obliged to define nis-domain on a per-client
>basis, right?  I'd rather that FAI didn't helpfully
>make incorrect assumptions, and that when I say
>NONIS, I really do actually mean it...

Why not do something like seting 'nis-domain=NONE' for the one client 
you don't want to have an NIS config?

Of course, you can also define things on a subnet basis rather than 
using a global:

subnet 192.168.1.0 netmask 255.255.255.0 {

option nis-domain "foobar";
.
.
.
}

subnet 192.168.2.0 netmask 255.255.255.0 {

# No NIS on this subnet
#option nis-domain "";
.
.
.
}


And, as you mentioned, you *could* use a per-client definition for 
NIS, but that would be a real pain, not to mention overly redundant.

Have you tried defining the NIS option as an empty string for the 
clients you want to boot without an NIS config?  Something like this
*should* work:


host client { 
  hardware ethernet 00:d0:a8:00:d8:46; 
  fixed-address client; 
  option fai-action "install";  # FAI_ACTION install/sysinfo 
  option fai-flags "verbose createvt sshd reboot"; 
  option nis-domain "";
} 

That *should* over-ride the global and set it to an empty string 
which I would expect to evaluate to nothing when the FAI scripts do 
their test, which means you'd get the NONIS class defined.

None of this is tested or guaranteed, but I think it *should* work 
just fine.

-- 

Seeya,
Paul
--
It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.

 If you're not having fun, you're not doing it right!





Re: NIS configuration

2002-09-19 Thread mod+linux-fai



>>Yah, it's too bad the NIS gets defined if YPDOMAIN is defined.
>
>I'm curious, why would this be bad?  If you have YPDOMAIN defined, 
>then wouldn't you *want* NIS?  If you don't want NIS, then don't 
>define YPDOMAIN.  Wouldn't you simply create a class which doesn't 
>have NIS, and therefore doesn't define YPDOMAIN?


I can see why you'd be curious.  The problem for me
is that my DHCP server has a single global nis-domain
definition that gets handed to all clients, and which
is appropriate for all clients that will be living on
that server's network.  But I sometimes temporarily
connect client machines to that server in order that
they can use FAI to load them up with a configuration
that will later be used when those machines are moved
onto a private LAN that doesn't have NIS.

I could lose the global definition, but then I'd
be obliged to define nis-domain on a per-client
basis, right?  I'd rather that FAI didn't helpfully
make incorrect assumptions, and that when I say
NONIS, I really do actually mean it...




Re: NIS configuration

2002-09-19 Thread pll


In a message dated: Wed, 18 Sep 2002 17:19:06 EDT
[EMAIL PROTECTED] said:

>Yah, it's too bad the NIS gets defined if YPDOMAIN is defined.

I'm curious, why would this be bad?  If you have YPDOMAIN defined, 
then wouldn't you *want* NIS?  If you don't want NIS, then don't 
define YPDOMAIN.  Wouldn't you simply create a class which doesn't 
have NIS, and therefore doesn't define YPDOMAIN?
-- 

Seeya,
Paul
--
It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.

 If you're not having fun, you're not doing it right!





Re: NIS configuration

2002-09-18 Thread mod+linux-fai



Yah, it's too bad the NIS gets defined if YPDOMAIN is defined.

I had to create a /fai/class/S25nis.source that says:

 #
 # Fix situation where a machine is being setup in an environment
 # that has NIS but where we don't want it defined.
 #
 ifclass NONIS &&  {
 ifclass NIS &&  {
 echo "Both NONIS and NIS are set, so unsetting NIS" >/dev/console
 undefclass NIS
 }
 ifclass YPDOMAIN &&  {
 echo "Both NONIS and YPDOMAIN are set, so unsetting YPDOMAIN" >/dev/console
 undefclass YPDOMAIN
 }
 }


...which employs that undefclass() function mentioned
in my earlier diffs.  This is not necessarily the
right way to do this, but works for me.





Re: NIS configuration

2002-09-18 Thread Geert Stappers

At 18:42 +0200 9/18/02, AUSTIN MURPHY wrote:
>Hi,
>Can someone explain how the NIS configuration is intended to work?
>
>fai/class/S24nis.sh first checks if a variable $YPDOMAIN is defined and if
>it is then defines the NIS class.  If classes are defined before
>variables, then how is this supposed to work?

I managed to use FAI without NIS
IMNSHO should NIS be an option for FAI,
in other words:
 Default there is no Network Information System, NIS,
 for the Full Automatic Installation, FAI.
 It is an add-on.


Probably is already implemented that way.

Just remove "NIS" from the class definition.


Geert St