Skip to content
  • David Johnson's avatar
    Add client side service and service hook configuration commands. The · 25711c9c
    David Johnson authored
    valid service/env/whence tuples are specified in the client_services
    table.  Only services that exist in that table can be configured -- so
    if rc.ifconfig is only configurable at boot, every time, the user can
    only add hooks (or control the service) for rc.ifconfig at boot, every
    time (so not in the load env, nor only once).
    
    Users can either specify a script that gets turned into a per-experiment
    blob, OR they can specify a static blob that they already created in the
    blobs table via mkblob.  They can't do both though.
    
    tb-set-node-service "rc.foo" \
        -node (""|$node) -env (boot|load) -whence (every|first) \
        -script "/path/to/script" -scriptblob "<blobid>" \
        -enable (0|1) -enablehooks (0|1) -fatal (0|1)
    
    All options are "optional".  Even if you disable a service, its hooks
    are enabled by default.  Services can now be fatal.
    
    tb-add-node-service-hook "rc.foo" \
        -node (""|$node) -env (boot|load) -whence (every|first) \
        -script "/path/to/script" -scriptblob "<blobid>" \
        -op (boot|shutdown|reconfig|reset) -point (pre|post) \
        -argv "" -fatal (0|1)
    25711c9c