Contents
How to manage task settings on the command line
You can edit the settings for all user tasks and all predefined tasks, except for Rollback and License tasks.
On the command line, you can edit the settings of tasks using the kfl-control --set-settings
command:
- You can edit all task settings using the configuration file that contains the task settings. You can get the configuration file using the command for displaying task settings.
- You can edit individual task settings on the command line in the
<
setting name
>=<
setting value
>
format. You can get the current values of task settings using the command for displaying task settings. - You can restore the task settings to their default values.
You can add or remove scan scopes and exclusion scopes using a configuration file that contains task settings or command line options. Configuring scan scopes and exclusion scopes is available for tasks of the OAS and ODS types.
In order to optimize the operation of scan tasks, it is recommended to add the path with snapshots mounted by the system in the read-only mode to the exclusions for the systems with the btrfs file system and enabled active snapshots. For example, for the systems based on SUSE/OpenSUSE, you can add the following exclusion for the path: /.snapshots/*/snapshot/
.
For some tasks, separate management commands are also provided that allow you to edit task settings.
How to modify task settings using a configuration file:
To edit values of task settings using a configuration file:
- Output the task settings to the configuration file:
kfl-control --get-settings
- Open the configuration file and edit the values of the necessary settings.
For tasks whose type is OAS or ODS, you can add or remove scan scopes and exclusion scopes.
If you want to add a scan scope, add a
[ScanScope.item_#]
section with the following settings to the file:AreaDesc
is a description of the scan scope, which contains additional information about this scope.UseScanArea
enables scanning of the specified scope.Path
is a path to the directory with the objects to be scanned. You can specify a path to a local directory or enable scanning of remote directories mounted on a client device.AreaMask.item_#
is a limitation of the scan scope. You can specify a mask for the name of the files to be scanned. Scanning is enabled by default for all objects in the scan scope. You can specify multipleAreaMask.item_#
items.
If you want to add an exclusion scope, add an
[ExcludedFromScanScope.item_#]
section with the following settings to the file:AreaDesc
– a description of the exclusion scope, which contains additional information about the exclusion scope.UseScanArea
enables exclusion of the specified scope.Path
is a path to the directory with the objects to be excluded. You can specify a path to a local directory or exclude remote directories mounted on a client device. Possible values for the setting depend on the type of task.AreaMask.item_#
is a limitation of the exclusion scope. You can specify a mask for the name of the files that you want to exclude from the scan scope. By default, all objects in the scope are excluded.Example:
[ExcludedFromScanScope.item_0000]
AreaDesc=
UseScanArea=Yes
Path=/tmp/notchecked
AreaMask.item_0000=*
You can specify multiple
[ScanScope.item_#]
and[ExcludedFromScanScope.item_#]
sections. The application processes the scopes by index in ascending order. - Save the configuration file.
- Execute the command:
kfl-control --set-settings <
task ID/name
> --file <
configuration file path
> [--json]
where:
<
task ID/name
>
is the ID assigned to the task at the time of its creation, or the name of the task in the command line.--file <
configuration file path
>
is the full path to the configuration file from which the task settings will be imported.- Specify the
--json
option if you are importing settings from a JSON configuration file. If the--json
option is not specified, the application attempts to import from an INI file. If the import fails, an error is displayed.
All values of task settings defined in the file will be imported into the application.
Page topHow to modify task settings using command line options:
You can use the kfl-control --set-settings
command to modify individual task settings, as well as add or remove scan scopes and exclusion scopes for tasks of the following types: OAS and ODS.
Configuring individual task settings
To modify individual values of task settings using command line options, run the following command:
kfl-control --set-settings
<
task ID/name
> <
setting name
>=<
setting value
> [<
setting name
>=<
setting value
>]
where:
<
task ID/name
>
is the ID assigned to the task at the time of its creation, or the name of the task in the command line.<
setting name
>=<
setting value
>
is the name and value of one of the task settings. You can get the current values of task settings using the command for displaying task settings.
The values of the specified task settings will be changed.
Adding and removing a scan scope
To add a scan scope using command line options, run the following command:
kfl-control --set-settings <
task ID/name
> --add-path <
path
>
where:
<
task ID/name
>
is the ID assigned to the task at the time of its creation, or the name of the task in the command line.--add-path <
path
>
adds the path to the directory with the objects to be scanned.
A new [ScanScope.item_#]
section will be added to the task settings. The application scans the objects in the directory specified by the Path
setting. The remaining settings of the scan scope take default values.
If the task settings already contain a [ScanScope.item_#]
section with the specified value for the Path
setting, a duplicate section is not added.
If the UseScanArea
setting is set to No
its value will change to Yes
after this command is executed and the objects located in this directory will be scanned.
Example: Adding a scan scope for a task with ID=100:
The following scan scope settings will be added to the task:
|
To delete a scan scope using command line options, run the following command:
kfl-control --set-settings <
task ID/name
> --del-path <
path
>
where:
<
task ID/name
>
is the ID assigned to the task at the time of its creation, or the name of the task in the command line.--del-path <
path
>
deletes the path to the directory with the objects to be scanned.
The [ScanScope.item_#]
section that contains the specified path will be deleted from the task settings. The application will not scan the objects in the specified directory.
Adding and removing an exclusion scope
To add an exclusion scope using command line options, run the following command:
kfl-control --set-settings <
task ID/name
> --add-exclusion <
path
>
where:
<
task ID/name
>
is the ID assigned to the task at the time of its creation, or the name of the task in the command line.--add-exclusion <
path
>
adds the path to the directory with the objects that you want to exclude from the scan.
A new [ExcludedFromScanScope.item_#]
section will be added to the task settings. The application will exclude objects in the directory specified by the Path
setting from scans. The remaining settings of the exclusion scope take default values.
If the task settings already contain an [ExcludedFromScanScope.item_#]
section with the specified value for the Path
setting, a duplicate section is not added.
If the UseScanArea
setting is set to No
its value will change to Yes
after this command is executed and the objects located in this directory will be excluded from scans.
To delete an exclusion scope using command line options, run the following command:
kfl-control --set-settings <
task ID/name
> --del-exclusion <
path
>
where:
<
task ID/name
>
is the ID assigned to the task at the time of its creation, or the name of the task in the command line.--del-exclusion <
path
>
deletes the path to the directory with the objects to be excluded.
The [ExcludedFromScanScope.item_#]
section that contains the specified path will be deleted from the task settings. The application will not exclude the objects in the specified directory from the scan.
How to restore default task settings on the command line
You can restore the default settings for all user tasks and all predefined tasks, except for tasks of the Rollback and License types (these tasks have no settings).
To reset task settings to their default values, execute the following command:
kfl-control --set-settings <
task ID/name
> --set-to-default
where <
task ID/name
>
is the ID assigned to the task at the time of its creation, or the name of the task in the command line.
The application changes the setting values to their defaults.