home *** CD-ROM | disk | FTP | other *** search
- /**
- * File:
- * include/bootloader/elilo/misc.ycp
- *
- * Module:
- * Bootloader installation and configuration
- *
- * Summary:
- * Miscelaneous functions for configuring and installing ELILO bootloader
- *
- * Authors:
- * Jiri Srain <jsrain@suse.cz>
- *
- * $Id: misc.ycp 28904 2006-03-13 15:35:23Z jplack $
- *
- */
-
- {
- textdomain "bootloader";
-
- import "Installation";
- import "Mode";
- import "Report";
- import "Storage";
-
- /**
- * Return mountpoint of partition holding EFI data
- * @return mountpoint if partition holding EFI data
- */
- global define string getEfiMountPoint () {
- string mountpoint = "/";
- // FIXME: UGLY HACK because of testsuites
- map mountpoints = $[];
- if (Mode::test ())
- mountpoints = $["/" : ["/dev/hda2"], "/boot" : ["/dev/hda1"]];
- else
- mountpoints = Storage::GetMountPoints();
- if (haskey (mountpoints, "/boot/efi"))
- {
- mountpoint = "/boot/efi";
- }
- else if (haskey (mountpoints, "/boot"))
- {
- mountpoint = "/boot";
- }
- y2milestone ("Mountpoint of EFI: %1", mountpoint);
- return mountpoint;
- }
-
- /**
- * Get used EFI vendor
- * @return EFI vendor
- */
- global define string getEfiVendor () {
- return "SuSE";
- }
-
- /**
- * Get directory containing elilo.conf relative to EFI partition's root
- * @return directory containing elilo.conf relative to EFI root
- */
- global define string getEliloConfSubdir () {
- return sformat ("/efi/%1", getEfiVendor ());
- }
-
- /**
- * Get path of elilo.conf relative to EFI partition's root
- * @return string path of elilo.conf relative to EFI partition's root
- */
- global define string getEliloConfSubpath () {
- return sformat ("%1/elilo.conf", getEliloConfSubdir ());
- }
-
- /**
- * Return path to elilo.conf file
- * @return string path to elilo.conf
- */
- global define string getEliloConfFilename () {
- // FIXME config file name location should be read from Library
- // and it should not be needed here!!!
- string ret = sformat ("%1/efi/%2/elilo.conf", getEfiMountPoint (),
- getEfiVendor ());
- y2milestone ("elilo.conf sould be located at %1", ret);
- return ret;
- }
-
-
- }
-