Confused about init scripts expectations (oops...wrong subject last time)

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

 



I'll try again, with a more instructive subject !


Hi John,

What happens if you try to add the daemon via the chkconfig process ?

If the script is located in /etc/rc.d/init.d

You can use

chkconfig --add mydaemon
chkconfig --level 2 5 mydaemon on

(caveat: check this syntax...I'm not near an RH/fedora box)

This may produce more instructive errors than a hung GUI.

HTH
Andrew




Date: Wed, 22 Feb 2006 21:40:07 -0600
From: Justin Willmert < justin@xxxxxxxxxx>
Subject: Re: Confused about init scripts expectations
To: For users of Fedora Core releases < fedora-list@xxxxxxxxxx >
Message-ID: <43FD2E97.7040806@xxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Mikkel L. Ellertson wrote:
> Jon Trauntvein wrote:
>
>> Mikkel L. Ellertson wrote:
>>
>>
>>> Jon Trauntvein wrote:
>>>
>>>
>>>> Greetings,
>>>>
>>>> I am developing a daemon application to handle datalogger
>>>> communications. I have developed the init script that is
>>>> included at the bottom of this mail based upon examples that
>>>> I found on the web. This script runs very
>>>> well from the command line. However, when I attempt to use
>>>> the gnome server configuration tool to start csilgrnet, the
>>>> tool locks up and has to be aborted. I have searched in vain
>>>> for guidelines for writing init scripts and have no idea what
>>>> the gui is looking for and not finding. Any assistance or
>>>> advise would be gratefully accepted.
>>>>
>>>> Regards,
>>>>
>>>> Jon Trauntvein
>>>>
>>>>
>>> For a guide to writing them, look at the documentation for the
>>> initscipts package. The file you are looking for is called
>>> sysvinitfiles.
>>>
>>> Mikkel
>>>
>> I found the above referenced file and have studied it in detail.  I
>> thank you.
>>
>>
>> My original problem remains, however.  That is, I can execute my script
>> on the command line to start and stop the daemon process.  If, however,
>> I attempt to start the daemon using the services configuration GUI
>> provided by gnome, the gui will lock up and I will have to kill it to
>> close it.  I have found, through experimentation, that, if the gui is in
>> this locked state, I can actually bring it out by running the script
>> from the command line to shut the daemon down.  The gui will then pop up
>> a dialogue indicating that the daemon has been started.
>>
>> I am convinced that my script is finishing because I can see evidence
>> that the lock file is being generated by the call to touch.  Again,
>> there is absolutely no problem when this script is run from the command
>> line or when I am starting or stopping the run level.
>>
>>
>> Regards,
>>
>> Jon Trauntvein
>>
>>
> I didn't see anything wrong with it when I looked at it, but I do
> not use the GUI, so I could be missing something. One thing you may
> want to check on is the permissions and ownership of the script.
>
> Mikkel
>
To go along with the permissions thing, make sure your SELinux context
is correct. I find that SELinux is the cause for *many* problems if you
don't remember to accommodate for it.

Justin Willmert





[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux