SUMMARY: "su" in init script

From: curt (curt_at_cola.iges.org)
Date: 09/14/04

  • Next message: Browett, Darren: "Printing to Multiple IP Addresses."
    Date: Tue, 14 Sep 2004 10:59:29 -0400
    To: tru64-unix-managers@ornl.gov
    
    

    (1) There was a typo in my script -
    #/bin/sh should have been #!/bin/sh

    (2) "nohup" needed to be added to the command.

    (3) The script now looks like this:

    #!/bin/sh
    nohup su -f curt -c /homes/cola/curt/fort/a.out &

    Several people replied saying that the init process sends
    a HUP signal to programs that it launches. This was the
    key. Thanks to all who replied, especially, Eris Sisson,
    Dr. Thomas P. Blinn, Richard Loken, Piotyr Grzybowski,
    and Oisin McGuinness.

    - Curt

    ORIGINAL POST:
    ~~~~~~~~~~~~~~~
    I need to start up a job at system startup
    under a userid other than root. I'm running
    tru64 v5.1b (pk4?) on an ES45. I created
    a little script called /sbin/rc3.d/S96try:

    #/bin/sh
    su -f curt -c /homes/cola/curt/fort/a.out &

    If I run this script in multi-user mode, or
    from crontab it works just fine: it runs
    the little fortran program a.out under the userid
    "curt" - which is what I want. But when I
    start the system up the script doesn't "launch".

    Any suggestions?

    Sincerely,
    Curt Steinmetz


  • Next message: Browett, Darren: "Printing to Multiple IP Addresses."

    Relevant Pages

    • "su" in init script
      ... I need to start up a job at system startup ... under a userid other than root. ... a little script called /sbin/rc3.d/S96try: ... Curt Steinmetz ...
      (Tru64-UNIX-Managers)
    • Re: $PHP_SELF
      ... Curt, ... > it but $_SESSION is available all the time. ... the time, so it can't be a coding problem in the script, as script never ...
      (php.general)
    • Re: [PHP] Return to browser and keep running!
      ... > Add before the exit: ... I want to be able to keep running a script ... browser there's no need for the user to wait until the script finish its ...
      (php.general)
    • Re: notice and warning
      ... You expect some piece of data from a post in your script, eg: userid. ... never make mistakes, but I doubt that. ... post/get/cookie 'rule' and he'll kill your how dataset of users ...
      (comp.lang.php)
    • Re: notice and warning
      ... You expect some piece of data from a post in your script, eg: userid. ... prefer $_REQUEST over $_POST. ... in this instance, it scales more 'easily'. ...
      (comp.lang.php)