Summary: Need help running a script at boot...

From: Edward C. Bailey <ed_at_pigdog.niehs.nih.gov>
Date: Fri, 17 Nov 1995 15:13:51 -0500

First of all, thanks to the 17 people that responded:
(apologies if some addresses are truncated, and if I missed anyone)

  mclaughl_at_nssdc.gsfc.nasa.
    mcmahon_at_cad3.uccb.ns.ca
     watkins_at_chop.swmed.edu
  szgyula_at_skysrv.Pha.Jhu.ED
     bosse_at_python.konbib.nl
        mike_at_lib.utexas.edu
          hallberg_at_e.kth.se
          trulsonj_at_mscd.edu
     mjl_at_CSlab.tuwien.ac.at
  mooney_at_dogbert.cc.ndsu.No
          dwagon_at_aaii.oz.au
  Jonathan.Buchanan_at_ska.com
       kluge_at_ave.ac.agit.de
        ittrmr_at_staffs.ac.uk
         philip_at_uvo.dec.com
       jwright_at_phy.ucsf.edu
  ucien HERCAUD"_at_paribas.co

The responses tended to be focused in four areas:

    1. Fixing various aspects of the environment (strategically placed
       sleeps, changing sequence of script execution, using a different
       shell, etc.).

    2. Preventing the run_daemon script from getting a HUP signal when its'
       parent (S99msqld) exits. The methods of doing this usually
       consisted of some variant of the following command:

        nohup /usr/local/Minerva/run_daemon msqld &

       The "nohup" prevents HUP signals from having any affect on
       run_daemon. Other methods of doing this using the trap statement,
       writing a wrapper program that calls setsid(), and then execv()s
       run_daemon, using "at" to start run_daemon, etc.

    3. Responses that, while not addressing my problem, contained good
       information. These included the fact that any script executed at a
       "system" level really should use explicit paths for all programs it
       invokes, to prevent trojan horses from making your life more
       exciting than it needs to be. Also mentioned were opinions that
       msqld really doesn't need the run_daemon wrapper script, and that
       msqld is not a very good daemon (along with some code to make it
       work better).

    4. Well meaning responses that made me wonder if the sender actually
       read and understood my message. :-)

To make a long story short, I tried approach #2 and used "nohup". Worked
like a champ from the get-go. Many thanks everyone!

                                Ed
--
Ed Bailey, Information Systems and Networks
(contracted to: National Institute of Environmental Health Sciences)
2327 Englert Drive.
Suite 200
Durham, NC 27713
                              
 Internet: bailey_at_niehs.nih.gov
   BITnet: BAILEY_at_NIEHS.BITNET 
    Voice: (919)361-9422, extension 239
      FAX: (919)544-6642
Received on Fri Nov 17 1995 - 21:50:34 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT