ksh script question

From: Brehl, Blake (Blake.Brehl@anritsu.com)
Date: Tue Mar 18 2008 - 17:59:33 EST


Hello Admins,
 
trying to have a script that will write to a NFS mounted drive, but will
write to a local drive if the NFS mounted one is not available. Trying
this with a cd to the local drive 1st, then a cd to the NFS mounted one
2nd.
 
#!/bin/ksh
LOCALDRV=/home/users/mfg/xxbusint1; export LOCALDRV
NFSDRV=/home/whlzdev/xxbusint1; export NFSDRV
 
cd $LOCALDRV; sleep 1
cd $NFSDRV
 
exec /someexecutable
 
When either the Local or NFS drives aren't there, the 'cd' command
returns an error value of >0 and exits the shell script.
 
Any suggestions?
 
 
Blake Brehl
Sys Admin/DBA
Anritsu Company United States
Morgan Hill, CA
blake.brehl@anritsu.com
 

 



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:50:37 EDT