Warning: Can't synchronize with repository "(default)" (No changeset 96d22ec3fa3ef6de3ea8dc0d7d398adc9aa071cf in the repository). Look in the Trac log for more information.

Ticket #298 (new enhancement)

Opened 5 years ago

Last modified 4 years ago

Use a rules.d directory for seperate rules files in oeventsd

Reported by: digger Owned by: jluebbe
Priority: minor Milestone:
Component: framework/oeventsd Version:
Keywords: HasPatch Cc:

Description

Use individual rules files in a /etc/freesmartphone/oevents/rules.d directory rather than a monolithic rules file.

The included patch first parses the rules.yaml file and then any files it finds in rules.d. The patch has been tested with a button-aux.yaml file. The patch does not create a rules.d directory.

This would allow update-alternatives to select rules files. For example: Do I want fso-control or paroli to be launched from the AUX button?

This works as is however it could be expanded to other possibilities. Similar to apache2 (at least in Debian type systems) there could be rules-available and rules-enabled directories. Utilities similar to a2enmod and a2dismod could be written or perhaps even a GUI.

Depending on where oeventsd goes in the future, the rules files could have priorities as are used in /etc/init.d and and /etc/rc.X.d

I included the parse_rules_file function under the factory function because I had trouble seperating it.

Attachments

oevents.py.patch (1.7 KB) - added by digger 5 years ago.

Change History

Changed 5 years ago by digger

comment:1 Changed 4 years ago by daniel

  • Owner changed from mickey to jluebbe
  • Component changed from documentation to framework/oeventsd

This is not a documentation bug

Note: See TracTickets for help on using tickets.