• Veronika Kabatova's avatar
    Add support for configuration files · 98415541
    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: 's avatarVeronika Kabatova <vkabatov@redhat.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    98415541
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...