home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10451 < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.2 KB  |  36 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!gatech!bloom-beacon!bloom-picayune.mit.edu!athena.mit.edu!benjy
  3. From: benjy@athena.mit.edu (Benjamin B Thomas)
  4. Subject: Inittab?
  5. Message-ID: <1992Aug28.000305.7213@athena.mit.edu>
  6. Sender: news@athena.mit.edu (News system)
  7. Nntp-Posting-Host: e40-008-4.mit.edu
  8. Organization: Massachvsetts Institvte of Technology
  9. Distribution: na
  10. Date: Fri, 28 Aug 1992 00:03:05 GMT
  11. Lines: 23
  12.  
  13.  
  14.  
  15.  
  16. I was wondering if someone could help me clear something up.
  17. The documentation I have leads me to believe that if I want to run a script from
  18. /etc/inittab at run level 3 and insure that it remains alive, I need to add this
  19. to /etc/inittab:
  20.  
  21. foo :3:respawn:/bin/sh -c 'exec /usr/local/bin/my_script'
  22.  
  23. The script gets executed (ps gives:  ...../usr/local/bin/my_script /usr/local/)
  24.  
  25. The script writes to a tmp file, sleeps, checks some stuff, and then writes over
  26. the tmp file (ls -ct > /tmp/foo) This works fine when
  27. I execute from the command line, but won't write anythingwhen started from initt
  28. ab.
  29. However, it will write a blank /tmp/foo if I place anything in the file while th
  30. e process is sleeping.
  31.  
  32. Any ideas?   BTW It's a csh script. 
  33.  
  34.                                  Thanx,
  35.                     Benjy
  36.