Solved

NIS maps actualization

Posted on 1998-10-28
5
245 Views
Last Modified: 2013-12-16
How can I make the actualization of my NIS maps automatically?

Manually I do it by typing:
cd /var/yp
make

But I introduce it in a script and the execute it in the
root's crontab it does not work.

The NIS server works under SunOS 4.1.3
TIA
0
Comment
Question by:iaguirre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Expert Comment

by:plebras
ID: 1812264
HI !

Normally no problem

I think your line in root's crontab may be false. You must specify the complet path of the script (no default path except /bin in cron) in the line and also in the script eg :

0 10  * * * * /home/script

The script look like this

cd /var/yp
/var/yp/make

You must also set the rights by : "chmod 755 /home/script"
and then reinit cron by

"crontab root"

To verify type :
"crontab -l"

You must see your line

Bye
0
 

Author Comment

by:iaguirre
ID: 1812265
It does not work. I caan not execute /var/yp/make it answers
"Command not found"

Moreover if I execute the script form the command line it works
but not in the crontab. This is my script:

#!/bin/csh
cd /var/yp >&! /sysutils/propaNIS.res
make >>& /sysutils/propaNIS.res

and this is my crontab:
15 3 * * * find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune
5 4 * * 6 /usr/lib/newsyslog >/dev/null 2>&1
15 4 * * * find /var/preserve/ -mtime +7 -a -exec rm -f {} \;
20 12 * * * /sysutils/propaNIS

0
 
LVL 3

Expert Comment

by:elfie
ID: 1812266
check your environment variables. You can print them as the first action in your script. Then run it online and within crontab.

Verify the two environment and you will see some differences. Try setting the needed env vars inside the script so there also available at 'crontab' execution
0
 

Author Comment

by:iaguirre
ID: 1812267
Ok there was some problem with the environment
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 1812268
you must specify the full path for make in your script, like  /bin/make
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question