home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / next / sysadmin / 7237 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.7 KB  |  45 lines

  1. Newsgroups: comp.sys.next.sysadmin
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!stupid!francisr
  3. From: francisr@stupid.ucs.indiana.edu (Rob Francis)
  4. Subject: Upgrade_3.0.app/Default.upgrade/PostProcess has a problem
  5. Message-ID: <C006G2.F3s@usenet.ucs.indiana.edu>
  6. Sender: news@usenet.ucs.indiana.edu (USENET News System)
  7. Nntp-Posting-Host: stupid.ucs.indiana.edu
  8. Organization: Indiana University
  9. Date: Tue, 29 Dec 1992 04:14:26 GMT
  10. Lines: 33
  11.  
  12.  
  13. There's this little snippit in the script that runs after the upgrade
  14. to update the /users directory in Netinfo:
  15.  
  16.     echo -n "    Updating user accounts..."
  17.     set users = `niutil -t -list localhost/${usetag} /users|awk '{print $2}'`
  18.     foreach user ($users)
  19.         niutil -t -list localhost/${usetag} /users/${user}/info >& /dev/null
  20.         if ($status != 0) then
  21.             niutil -t -create localhost/${usetag} /users/${user}/info
  22.             niutil -t -createprop localhost/${usetag} /users/${user}/info _writers ${user}
  23.         endif
  24.     end
  25.     echo "$#users accounts"
  26.  
  27. Basically, it just adds the info property to each user's directory.
  28. But there's a problem.  My Upgrade Log showed the following:
  29.  
  30. Updating user accounts...foreach: Too many arguments.
  31.  
  32. I have 1167 accounts.  I haven't figured out what the cut off is, but
  33. I did manage to make it work by commenting that out of the script and
  34. running something that did the same thing using /bin/sh and a while
  35. loop.  Then commenting it out of the script and rerunning the script
  36. by hand.
  37.  
  38. So I'm not sure where the cut off is, but thought others might want to
  39. know about this little treat.
  40.  
  41. -rob
  42. ---
  43. Rob Francis   Unix Systems Specialist, Indiana University
  44. francisr@indiana.edu (812)855-0327
  45.