## Problem * Bug [bsc#1246997](https://bugzilla.suse.com/show_bug.cgi?id=1246997) To answer questions in advance when using the unattended mode, it is required to use a pre-script. If you just want Agama to use the default values, it is kind of straight-forward: ```jsonnet scripts: { pre: [ { name: 'disable-questions', content: ||| #!/usr/bin/bash agama questions mode non-interactive ||| } ] } ``` However, if you want to answer an specific question (e.g., providing a password for an existing encrypted file system) it is kind of tricky. You might need to create a file like this: ```json { "answers": [ { "password": "my-password", "class": "storage.luks_activation" }, ] } ``` And the load it using a pre-script: ```jsonnet scripts: { pre: [ { name: 'disable-questions', content: ||| #!/usr/bin/bash agama download http://my-server.lan/answers.json answers.json agama questions answers answers.json ||| } ] } ``` ## Solution Allow embedding the answers in the profile. ```json "questions": { "policy": "auto", "answers": [ { "class": "storage.luks_activation", "password": "nots3cr3t" } ] ``` * `policy`: ask the user (`user`) or choose the default option (`auto`). * `answers`: list of answers to the given question. ## Testing - *Added a new unit test* - *Tested manually* |
||
|---|---|---|
| .. | ||
| bin | ||
| conf.d | ||
| etc | ||
| lib | ||
| package | ||
| po | ||
| share | ||
| test | ||
| .editorconfig | ||
| .gitignore | ||
| .rspec | ||
| .rubocop.yml | ||
| agama-yast.gemspec | ||
| agama-yast.spec.in | ||
| Gemfile | ||
| Gemfile.lock | ||
| install.sh | ||
| README.md | ||
| run_tests_in_container.sh | ||
| TEXTDOMAIN | ||
Agama YaST
According to Agama's architecture this project implements the following components:
- The Agama YaST, the layer build on top of YaST functionality.
Testing Changes
The easiest way to test changes done to Ruby code on Agama live media is to build
the gem with modified sources with gem build agama-yast. Then copy the resulting file
to Agama live image. Then run this sequence of commands:
# ensure that only modified sources are installed
gem uninstall agama-yast
# install modified sources including proper binary names
gem install --no-doc --no-format-executable <path to gem>
If the changes modify the D-Bus part, then restart related D-Bus services.