[PATCH 08/10] base-manager: process initial kernel events from an input file

Aleksander Morgado aleksander at aleksander.es
Mon Aug 29 09:29:33 UTC 2016


On Fri, Aug 19, 2016 at 10:01 PM, Dan Williams <dcbw at redhat.com> wrote:
>> In order to cope with devices already available in the system when
>> the daemon
>> starts, we allow loading a list of kernel events from an input text
>> file where
>> the kernel events were recorded since boot.
>
> What's the use-case for this functionality?  It seems to me (though I
> haven't thought deeply about it) that it's pretty much redundant with
> the new mmcli commands.  Wouldn't this be better done in mmcli, parsing
> the file and shoving the commands to MM?

The thing is that mmcli doesn't know when to send these commands. In
other words, an external process would need to monitor the
availability of the daemon and once it is available, send the commands
to the daemon. If the logic is in the daemon, the daemon will directly
process the input file, regardless of whether there's an external
process sending those.

I think this logic may be biased to what OpenWRT requires. In there I
have a pair of hotplug scripts that trigger whenever a tty or net
device appear/disappear. The hotplug scripts will run mmcli *and*
update the list of initial kernel events, and then they exit. There is
no ongoing process running that monitors the availability of MM, so MM
just starts and processes the initial kernel events file.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list