:: Re: [Dng] epoch feature request
Pàgina inicial
Delete this message
Reply to this message
Autor: Anto
Data:  
A: dng
Assumpte: Re: [Dng] epoch feature request


On 15/06/15 16:23, Steve Litt wrote:
> On Mon, 15 Jun 2015 08:42:53 +0200
> Anto <aryanto@???> wrote:
>
>>
>> On 15/06/15 02:41, Steve Litt wrote:
>>> On Mon, 15 Jun 2015 00:36:34 +0200
>>> Anto <aryanto@???> wrote:
>>>
>>>
>>>> There is one thing that annoys me due to epoch only has a singe
>>>> configuration file. I think you have done a lot more research on
>>>> epoch so perhaps you could answer this. Is there any mechanism to
>>>> automatically manage applications that we want to start/stop at
>>>> boot/shutdown time on epoch, which is similar to update-rc.d script
>>>> for sysvinit?
>>> I've never seen update-rc.d, but if you're asking me if I can write
>>> a separate program that takes a list of services, each with their
>>> "provides" and their list of "requires", into the numbers you need
>>> for ordering those service, absolutely I can write that program.
>>> You and Subsentient just need to give me the specification of the
>>> format of the service/provides/requires{,requires{,requires{...}}},
>>> and I can write the program that turns that into numbers.
>>>
>>>> At the moment, it looks to me that if I installed ntpd for
>>>> instance, I have to manually edit epoch.conf and add ntpd ObjectID.
>>> Yes. You should go onto Freenode's #epoch and talk to Subsentient. I
>>> believe that one of his design manifesto principles is that you edit
>>> this stuff, no GUI. But I'm pretty sure that as of a couple versions
>>> ago, Epoch can deal with multiple config files.
>>>
>>> Thanks,
>>>
>>> SteveT
>>>
>>> Steve Litt
>>> June 2015 featured book: The Key to Everyday Excellence
>>> http://www.troubleshooters.com/key
>> Hello Steve,
>>
>> I am not actually looking for GUI interface to manage epoch
>> configuration, but more like the functionality of update-rc.d script
>> (http://manpages.debian.org/cgi-bin/man.cgi?sektion=8&query=update-rc.d&apropos=0&manpath=sid&locale=en).
> Yes. From what I read in the preceding link, update-rc.d simply
> activates or deactivates daemon startup. Yes, I can make a program to
> do that with Epoch. That program would be *absolutely trivial* to make
> for any daemontools-inspired inits.
>
>> I am not a hard core UNIX/Linux admin, but I think such script is
>> distro specific, In Debian and its derivative distros, update-rc.d
>> script is part of sysvinit package. So it should be understandable
>> that the upstream sysvinit, upstart or epoch do not provide such
>> script, as it should be provided by the init package of the distro.
>> This means that I have to learn much more than I previously thought :)
> I just want to make sure you understand that Epoch is much, much,
> *much* simpler than sysvinit. Whereas sysvinit has those funky comments
> telling what their symlink should be, with Epoch, all you do is mark
> each service either ObjectEnabled=true or ObjectEnabled=false. It's
> probably easier to change that with an editor than with a program. But
> yes, I could write a program, even a CLI program, to enable you to
> change the ObjectEnabled value.
>
> SteveT
>
> Steve Litt
> June 2015 featured book: The Key to Everyday Excellence
> http://www.troubleshooters.com/key
>


Hello Steve,

Thanks a lot for offering to develop the script. And I understand that
epoch is much simpler than sysvinit. However, what I am after is not
just a script to start/stop the daemon. But a mechanism to automatically
manage the settings of the daemons on epoch.conf when we install/remove
packages. Perhaps, I didn't explain that well enough before. So please
let me rephrase that.

Let's focus on sysvinit. In Debian based distros, when we install/purge
packages with daemons that need to be started/stopped at boot/shutdown,
their installation scripts install/remove specific scripts on
/etc/init.d and then run update-rc.d to create/remove the symlinks to
those scripts on runlevel directories. I previously thought that we need
to do similar to that for epoch. But I just realised that would mean we
need to include epoch specific scripts into those packages which is
definitely a bad approach, like what Debian does for systemd by
including the service and unit files. As far as I understood, Devuan
follows this approach as well, just in case somebody wants to use
systemd in Devuan. Sorry... the last sentence is perhaps off-topic :)

But if we would not add epoch specific scripts into those packages, how
could we make sure that epoch would be able to control the daemons of
those packages if we installed/removed them via Synaptic for instance? I
don't think it is a good idea to always manually edit epoch.conf to
add/remove the ObjectID and all related parameters of the daemon after
each package installation/de-installation, and then manually start/stop
them.

I am not entirely sure what would happen if we purged sysvinit to
replace it with epoch, whether those packages will still generate their
specific scripts on /etc/init.d when we install them under epoch or not.
If they would still generate them, we could maybe implement a mechanism
to monitor /etc/init.d, automatically add the daemon parameters into
epoch.conf based on their "INIT INFO" when the new script is being added
into /etc/init.d and then start the daemon.

There must be more elegant solution than that, but I am running out of
ideas due to my limited knowledge on this.

Cheers,

Anto