[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: init.d scripts runs at rc5.d, not rc0.d

On Tue, 2004-04-06 at 10:15, Zoltan Boszormenyi wrote:
> Brian Millett írta:
> > Question to the sages:
> > Why?  If the lock file is so important to the success or failure of the
> > execution of the script, then why not have the rc script write the lock
> > file? 
> Because the rc script does not know about what the individual init
> scripts do. Think about it. There are two task types:
> 1. tasks that only require initialization but
>     does not require de-initialization
> 2 tasks that require both
> Examples of task type #1:
>   - Delete contents of /tmp on boot.
>   - Start APM/ACPI (the kernel module, not the daemon).
>     It does not need to be stopped since the poweroff
>     functionality need a working pm module.
> Examples of task type #2: start and stop daemons, networking, etc.
> And there is the possibility of starting an init script
> (incidentally) twice.
> So it's up to the init script writer to create a lockfile.
> Anyway, you should know what you want...

I agree with you and Charles.  Thank you.

Should the rc script care at all about the lock file, or should it be
totally left to the installer/coder of the script?  As it is now, the rc
script cares ONLY if you follow a certain convention.  Again, in my
ignorance, is the name of the lockfile documented anywhere?  I did not
find it in the tldp.org pages.

Brian Millett  -  Technologist Rex 
"There's only one truth about war: people die. Killing is part of a 
 soldier's job. We can't deny it. We can only live with it and hope 
 the reasons for doing it are justified." 
        -- Sheridan, "GROPOS"

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]