Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

NIS maps actualization

Posted on 1998-10-28
5
Medium Priority
?
248 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 400 total points
ID: 1812268
you must specify the full path for make in your script, like  /bin/make
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

721 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