[330] in Moira

home help back first fref pref prev next nref lref last post

here's my proposed patch for nfs.sh

daemon@ATHENA.MIT.EDU (haynes@cats.ucsc.edu)
Mon Jul 29 20:49:17 1991

To: bug-moira@ATHENA.MIT.EDU
Date: Mon, 29 Jul 91 17:48:44 PDT
From: haynes@cats.ucsc.edu <haynes@cats.UCSC.EDU>

This is to catch and not install a zero-size credentials file. That has
happened (here) and causes a total disaster - nobody can attach anything.
It won't quite fit at MIT because we have credentials in /etc rather than
in /usr/etc

*** /u1/sms/bin/nfs.sh	Fri Jul 26 22:50:30 1991
--- nfs.sh	Mon Jul 29 17:33:05 1991
***************
*** 2,12 ****
  # This script performs nfs updates on servers.
  #
  # $Source: /source/common/athena/athena.lib/moira/gen/RCS/nfs.sh,v $
! echo '$Header: /source/common/athena/athena.lib/moira/gen/RCS/nfs.sh,v 1.2 1991/07/26 23:25:12 haynes Exp $'
  
  # The following exit codes are defined and MUST BE CONSISTENT with the
  # MR error codes the library uses:
  set MR_NOCRED = 47836470
  set MR_MKCRED = 47836474
  set MR_TARERR = 47836476
  
--- 2,13 ----
  # This script performs nfs updates on servers.
  #
  # $Source: /source/common/athena/athena.lib/moira/gen/RCS/nfs.sh,v $
! echo '$Header: /source/common/athena/athena.lib/moira/gen/RCS/nfs.sh,v 1.3 1991/07/30 00:32:24 haynes Exp $'
  
  # The following exit codes are defined and MUST BE CONSISTENT with the
  # MR error codes the library uses:
  set MR_NOCRED = 47836470
+ set MR_MISSINGFILE = 47836473
  set MR_MKCRED = 47836474
  set MR_TARERR = 47836476
  
***************
*** 58,65 ****
  
  # build new credentials files.
  rm -f /etc/credentials.new
! cp ${uchost}.cred /etc/credentials.new
! if ($status) exit $MR_NOCRED
  
  /usr/etc/mkcred /etc/credentials.new
  if ($status) exit $MR_MKCRED
--- 59,71 ----
  
  # build new credentials files.
  rm -f /etc/credentials.new
! if (! -z ${uchost}.cred) then
! 	cp ${uchost}.cred /etc/credentials.new
! 	if ($status) exit $MR_NOCRED
! else
! 	/bin/rm -f ${uchost}.cred
! 	exit $MR_MISSINGFILE
! endif
  
  /usr/etc/mkcred /etc/credentials.new
  if ($status) exit $MR_MKCRED

home help back first fref pref prev next nref lref last post