Logo Search packages:      
Sourcecode: schroot version File versions  Download package

void sbuild::chroot::get_keyfile ( keyfile keyfile  )  const [protected, virtual]

Copy the chroot properties into a keyfile. The keyfile group with the name of the chroot will be set; if it already exists, it will be removed before setting it.

Parameters:
keyfile the keyfile to use.

Reimplemented in sbuild::chroot_block_device, sbuild::chroot_file, sbuild::chroot_lvm_snapshot, sbuild::chroot_plain, and sbuild::chroot_source.

Definition at line 352 of file sbuild-chroot.cc.

References get_active(), get_aliases(), get_chroot_type(), get_command_prefix(), get_description(), get_groups(), get_mount_device(), get_mount_location(), get_priority(), get_root_groups(), get_run_exec_scripts(), get_run_setup_scripts(), name, sbuild::keyfile::remove_group(), sbuild::keyfile::set_list_value(), and sbuild::keyfile::set_value().

Referenced by sbuild::chroot_plain::get_keyfile(), sbuild::chroot_file::get_keyfile(), sbuild::chroot_block_device::get_keyfile(), and setup_session_info().

{
  keyfile.remove_group(this->name);

  keyfile.set_value(this->name, "type",
                get_chroot_type());

  keyfile.set_value(this->name, "active",
                get_active());

  keyfile.set_value(this->name, "run-setup-scripts",
                get_run_setup_scripts());

  keyfile.set_value(this->name, "run-exec-scripts",
                get_run_exec_scripts());

  keyfile.set_value(this->name, "priority",
                get_priority());

  keyfile.set_list_value(this->name, "aliases",
                   get_aliases());

  keyfile.set_value(this->name, "description",
                get_description());

  keyfile.set_list_value(this->name, "groups",
                   get_groups());

  keyfile.set_list_value(this->name, "root-groups",
                   get_root_groups());

  if (get_active())
    keyfile.set_value(this->name, "mount-location",
                  get_mount_location());

  if (get_active())
    keyfile.set_value(this->name, "mount-device",
                  get_mount_device());

  keyfile.set_list_value(this->name, "command-prefix",
                   get_command_prefix());
}


Generated by  Doxygen 1.6.0   Back to index