Skip to content
Ladislav Slezák edited this page Oct 16, 2013 · 1 revision

Reusing SCR in New Installer

Requirements

§1 and §2.2 and define that

  • no code of the installer can be used chrooted
  • there is no (mandatory) second stage anymore
  • calling base functionality of the installed system is OK (e.g. run chroot && mkinitrd)

This can affect all configuration modules currently used during installation.

See minimal system document what the base system can contain.

Currently at the end of the 1st stage the SCR is restarted in the target system. That is no longer allowed. For most SCR commands the same result can be achieved by prepending path or chroot command (in .target.execute).

Which SCR Agents Have to Be Adapted

Definitely

  • ag_ini (e.g. .sysconfig)
  • ag_system (e.g. .target.execute)

Most Likely

  • ag_anyagent

Which SCR Agents Can Stay Untouched

Likely Unaffected

(e.g. no file operations)

  • agent-slp
  • ag_hwprobe
  • net_hostnames
  • ping

Likely not Used

SCR agents that are not used during installation or in chrooted environment.

  • SlapdConfigAgent
  • SquidAgent
  • CrackAgent
  • agent-dbus (only used by storage in running system)
  • agent-dummy (only used in testsuite)
  • agent-curl
  • agent-tftp
  • modinfo

Obsolete

  • agent-resolver seems unused
  • ag_background is replaced by ag_process since years and should be removed instead of adapted (used in iscsi-client and network)

Implementation Recipe

  • Extend class SCRAgent with functions to append prefix (e.g. / or /mnt) to the path and use these in all subclasses. For agents not based on SCRAgent (e.g. perl based agents) an extra parameter or environment variable could be used.

Open Issues

  • Some functionality cannot be converted directly E.g. snapper setup via agent-snapper in storage_finish.ycp. Libsnapper does not offer to prepend all paths with a prefix. The snapper command line tool does not work chrooted as it needs dbus-server to function.