-
Veronika Kabatova authored
Implementation changes for usage of simple configuration files. Before parsing the command line options, either default configuration files (/etc/criu/default.conf, $HOME/.criu/default.conf; in this order) are parsed, or a specific config file passed by the user. Two new options are introduced: "--config FILEPATH" option allows users to specify a single configuration file they want to use; and "--no-default-config" option to forbid the parsing of default configuration files. Both options are to be passed only via the command line. Usage of configuration files is not mandatory to keep backwards compatibility. The implementation of this feature tries to be compatible with command line usage -- the user should get the same results whether he passes the options (in the right order of parsing) on command line or writes them in config files. This allows the user to: 1) Override boolean options if needed 2) Specify partial configuration for options that are possible to pass several times (e.g. "--external"), and pass the rest of the options based on process runtime by command line Configuration file syntax allows comments marked with '#' sign, the rest of the line after '#' is ignored. The user can use one option per line (with argument supplied on the same line if needed, divided with whitespace characters), the options are the same as long options (without the "--" prefix used on command line). Configuration file example (syntax purposes only, doesn't make sense): $ cat ~/.criu/default.conf tcp-established work-dir /home/<USERNAME>/criu/work_directory extra # inline comment no-restore-sibling tree 111111 Signed-off-by:
Veronika Kabatova <vkabatov@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
98415541