Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!Greg@AppleLink.Apple.Com From: Greg@AppleLink.Apple.Com (Greg Marriott) Newsgroups: comp.sys.mac.programmer Subject: Re: When is the boot process over? Message-ID: <12171@goofy.Apple.COM> Date: 20 Feb 91 13:10:09 GMT References: <1CE00001.y856or@tbomb.ice.com> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 24 In article <1CE00001.y856or@tbomb.ice.com>,... writes: > In article <2799@krafla.rhi.hi.is>, ebth@rhi.hi.is (Eggert Bjarni Thorlacius) writes: > > I am writing an INIT that is supposed to be active only during the startup > > process. Is there any trap(toolbox preferably) that is called for the first > > time *soon* after startup? > > In the SCSI disk drivers I have written, I use a "dNeedTime" flag > in the driver. The first "accRun" control call to the driver does > not happen until just after the Finder launch. If you do not have > a driver for this, you might try patching PBMount, which should > happen just as Finder boots. An even better way is to patch _Launch. BTW, I just thought I'd mention that you can't just "unpatch" your patches by setting the trap address back to what it was before you patched it. Any other INITs that patch the same traps you do would be "cut off". Either set a flag in your patches that will make them short-circuit after boot time, or make a little "jump table" that points to your patches when they're active and then points to the old trap address when they're not. Greg Marriott Blue Meanie Apple Computer, Inc.