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

  1. Newsgroups: comp.sys.next.sysadmin
  2. Path: sparky!uunet!spool.mu.edu!agate!iat.holonet.net!mross
  3. From: mross@iat.holonet.net (Michael Ross)
  4. Subject: rc.local modification?
  5. Message-ID: <Bzwwt6.C0D@iat.holonet.net>
  6. Organization: HoloNet National Internet Access BBS: 510-704-1058/modem
  7. Date: Sun, 27 Dec 1992 09:53:28 GMT
  8. Lines: 51
  9.  
  10. I'm really confused.
  11.  
  12. I'm trying to get a program to execute when I turn the NeXT on. This
  13. program, 'start', spawns a daemon 'serverd' and must be run by the
  14. user 'server'. I have added a line to /etc/rc.local so that it looks
  15. like this:
  16.  
  17. #####################################
  18. # Read in configuration information
  19. . /etc/hostconfig
  20.  
  21. (echo -n 'local daemons:')
  22. >/dev/console
  23. #
  24. # Run your own commands here
  25. #
  26. su server -c '/usr/server/start -cr >/dev/console' && (echo -n '
  27. listserv') >/dev/console
  28. #
  29. #
  30. (echo '.')
  31. >/dev/console
  32. ####################################
  33.  
  34. During the boot process, the console echoes 'local daemons:', the
  35. output of the start program,  and the final '.' properly. However '
  36. listserv' never appears, meaning the previous su... was unsuccessful.
  37. And, indeed, the daemon spawned by 'start' is no longer is the list
  38. of processes running (seen with 'ps -ax') when I first login.
  39.  
  40. The frustrating thing is that the su.... line works fine when
  41. executed from a Terminal shell as root!
  42.  
  43.  
  44. Can anyone tell me why this process is dying at startup and what can
  45. I do to the rc.local file to make it stay? It looks like  either when
  46. the 'su' subshell exits, it kills all processes it has spawned, or su
  47. is returning an exit error code, but not 'saying' anything to the
  48. console....
  49.  
  50. Thanks for any suggestions and.... MERRY CHRISTMAS!!!!
  51.  
  52. Michael
  53.  
  54. ---
  55. Michael Ross
  56. Antigone Press, San Francisco, California
  57. e-mail: mross@antigone.com
  58. FAX: 1-415-431-3650
  59. ---
  60.  
  61.