Public
Authored by SamwiseFilmore

init States

Brainstorming for Redox init

Edited
init_states.rs 285 Bytes
  • I wonder about Directive. A directive would be a verb, and an enum like that would have start and stop defined. Better:

    enum DirectiveState {
        Disabled,
        Enabled
    }
    
    enum Directive {
        Disable,
        Enable,
        Start,
        Stop
    }

    However, based on the Solaris init talk, it seems like it would be a good idea to implement Directive as defined in this comment as part of the configuration file, as methods on the service, rather than as a fixed set of directives, as shown here. enable and disable should be implemented as part of init rather than as methods in the service file, using the start and stop methods.

  • As per configuration file format, which does everyone prefer (ping me in the chat):

    [method.start]
    cmd = [ "vesad", "T", "T", "G" ]
    [method.start]
    bin = "initfs:/bin/vesad"
    args = [ "T", "T", "G" ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment