home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!gatech!bloom-beacon!bloom-picayune.mit.edu!athena.mit.edu!benjy
- From: benjy@athena.mit.edu (Benjamin B Thomas)
- Subject: Inittab?
- Message-ID: <1992Aug28.000305.7213@athena.mit.edu>
- Sender: news@athena.mit.edu (News system)
- Nntp-Posting-Host: e40-008-4.mit.edu
- Organization: Massachvsetts Institvte of Technology
- Distribution: na
- Date: Fri, 28 Aug 1992 00:03:05 GMT
- Lines: 23
-
-
-
-
- I was wondering if someone could help me clear something up.
- The documentation I have leads me to believe that if I want to run a script from
- /etc/inittab at run level 3 and insure that it remains alive, I need to add this
- to /etc/inittab:
-
- foo :3:respawn:/bin/sh -c 'exec /usr/local/bin/my_script'
-
- The script gets executed (ps gives: ...../usr/local/bin/my_script /usr/local/)
-
- The script writes to a tmp file, sleeps, checks some stuff, and then writes over
- the tmp file (ls -ct > /tmp/foo) This works fine when
- I execute from the command line, but won't write anythingwhen started from initt
- ab.
- However, it will write a blank /tmp/foo if I place anything in the file while th
- e process is sleeping.
-
- Any ideas? BTW It's a csh script.
-
- Thanx,
- Benjy
-