-
Committer:
James Hunt
-
Date:
2011-06-01 13:20:49 UTC
-
mto:
(1182.14.31 upstart)
-
mto:
This revision was merged to the branch mainline in
revision
1317.
-
Revision ID:
james.hunt@ubuntu.com-20110601132049-j3ubn78g9f8x9932
Add "check-config" command to initctl.
* util/initctl.c:
- New functions:
- allow_event(): Determine if specified event is erroneous or not.
Handles globbing.
- allow_job(): Determine if specified job is erroneous or not.
Handles variables (such as instance variables).
- check_condition(): High-level function to handle checking start
on/stop on conditions.
- check_config_action: Handler for "check-config" command.
- display_check_errors(): Display errors from expression tree nodes
that are in error.
- eval_expr_tree(): Evaluate expression tree.
- ignored_events_setter(): handler for '--ignore-events' command-line
option for "check-config" command.
- tree_filter(): Used for filtering expression tree nodes.
- show_config_action(): Update for check-config mode.
- job_class_parse_events(): Update for check-config mode.
- job_class_show_emits(): Update for check-config mode.
* util/initctl.h:
- Added structs for JobCondition, CheckConfigData and ExprNode.
- New macros: MAKE_EXPR_NODE() and MAKE_JOB_CONDITION().
* util/tests/test_initctl.c:
- test_check_config(): New function to test "initctl check-config".
- main(): Added call to test_check_config(), conditional on
a non-chroot environment and a working D-Bus system.
* util/man/initctl.8: Updated for "check-config" command and associated
options.