YaST/Modes and Stages
From openSUSE
< YaST
Contents |
[edit]
About
This article is assumed to be mostly used by YaST developers, however the real usage need not be so strictly limited ;)
It describes in which different modes YaST can run and how a developer can influence what happens depending on how and where YaST was started or is running.
[edit]
Stages
Stage is method how to find out what the current program phase is. We use Stages to determine whether where we are in the installation workflow or why the program was called.
Here are stages we currently use:
- normal - YaST was started on a normal running system without any specialties. Mainly developed to configure some service on a running system.
boolean check = Stage::normal();
- initial - YaST was started to run the initial (first stage) installation. This stage lasts until the "continue" stage (see below).
boolean check = Stage::initial();
- continue - YaST was started to continue (second stage) installation. This stage can also be restarted in the middle by applying YaST or Libzypp patch during the second stage installation. Sometimes such patchs may even restart the whole system and continue this stage again.
boolean check = Stage::cont();
- firstboot - Special YaST configuration module for distributing computers with a pre-installed system. Such a module allows user to set the root password, etc., on an already installed system.
boolean check = Stage::firstboot();
- reprobe - YaST was started because of new hardware found during the system boot procedure.
boolean check = Stage::reprobe();
[edit]
Modes
Modes closer define the task we are just doing and extend the stage.
- installation - Defines that we are just somewhere in the installation workflow, currently the New Installation or AutoYaST Installation.
boolean check = Mode::installation();
- update - Similar to installation but doing an Update/Upgrade of the system.
boolean check = Mode::update();
- normal - Normal running system, e.g., configuring some service.
boolean check = Mode::normal();
- repair - Special mode when YaST is started when booting from the installation media. Offers to repair system by verifying packages, repairing bootloader settings etc.
boolean check = Mode::repair();
- autoinst - Running AutoYaST installation.
boolean check = Mode::autoinst();
- config - Running the special AutoYaST module that allows configuring the AutoYaST installation profile. This YaST module calls several other YaST modules below.
boolean check = Mode::config();
- commandline - Command-line interface of YaST.
boolean check = Mode::commandline();
- testsuite - Running YaST in a testsuite. This is mostly used when building the RPM package or during make check command.
boolean check = Mode::testsuite();
[edit]
Stages and Modes Overview
See how Modes are matching stages. This table describes which stages are possible with which modes and vice versa.
|
Stage Mode | normal | initial | continue | firstboot | reprobe |
|---|---|---|---|---|---|
| installation | | | | | |
| update | | | | | |
| normal | | | | | |
| repair | | | | | |
| autoinst | | | | | |
| config | | | | | |
| commandline | | | | | |
| Depeche | | | | | |

