Solved

NIS maps actualization

Posted on 1998-10-28
5
243 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
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

860 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