LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 02-13-2008, 05:49 AM   #1
wondergirl
LQ Newbie
 
Registered: Feb 2008
Posts: 18

Rep: Reputation: 0
NIS + question


Hi all,
I have a question regarding NIS+.

We have a script in each NIS+ primary master servers, that rsyncs all tables info from primary master servers to all secondary master servers whenever there is any changes to the tables.

There is a part in the script that checks whether the script is run from primary master server only, and it goes like this :

-------------------------------------------------

my $NISMATCH = "nismatch" ;
my $MASTERTBL = "masters.site_dir.nis.plus.domain" ;
my $master_mark = "M" ;


# If I'm not primary NIS+ master server.
# Script shouldn't start
#
my $master = '' ;

&Logger ("Can\'t execute ${NISMATCH} status=${master_mark} ${MASTERTBL}!" , "ERROR" ) unless
open NISMATCH, "${NISMATCH} -s : status=${master_mark} ${MASTERTBL}|" ;

chomp($master = (<NISMATCH>)[0]) ;

close NISMATCH ;

$master =~ s/:M$// ;

&Logger ("No primary master server found." , "ERROR" ) if "${master}" eq '' ;

exit if ${hostname} !~ /$master/;
}

-------------------------------------------------------

My question is, sometimes the command 'nismatch -s : status=m masters.site_dir.nis.plus.domain' returns nothing, which gives us the No Primary Master server found error. I cant figure out why this is because other times this command works and gives the proper primary master server. Is there any reason/condition/possiblities when this command might not return any value, even if the primary master server is running fine? Usually this issue resolves itself couple of minutes after happening.

Any idea would be helpful. Thanks!
 
Old 02-13-2008, 10:10 AM   #2
javier.e.menendez
Member
 
Registered: Jan 2006
Posts: 168

Rep: Reputation: 30
Just a suggestion:

man nisping

nisping -Ca does the same thing as your script

---

OPTIONS

-a Checkpoint all directories on the server.



-C Send a request to checkpoint, rather than a
ping, to each server. The servers schedule
to commit all the transactions to stable
storage.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NIS: NIS running but users not able to log in with NIS credentials outerspace Linux - Server 3 10-17-2007 08:51 AM
Question about NIS iammike Solaris / OpenSolaris 3 06-26-2005 01:14 PM
NIS Question ktambascio Linux - Software 1 03-12-2004 09:10 PM
NIS Question jayakrishnan Linux - Networking 14 08-08-2002 10:43 AM
NIS Question jayakrishnan Linux - General 3 05-27-2002 05:42 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 04:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration