Linux::Bootloader - Base class interacting with Linux bootloaders


Linux-Bootloader documentation  | view source Contained in the Linux-Bootloader distribution.

Index


NAME

Top

Linux::Bootloader - Base class interacting with Linux bootloaders

SYNOPSIS

Top

	use Linux::Bootloader;

	my $bootloader = new Linux::Bootloader();
        my $config_file='/boot/grub/menu.lst';

	$bootloader->read($config_file);
	$bootloader->print_info('all');
	$bootloader->add(%hash);
	$bootloader->update(%hash);
	$bootloader->remove(2);
	$bootloader->get_default();
	$bootloader->set_default(2);
	%hash = $bootloader->read_entry(0);
	$bootloader->write($config_file);

  


DESCRIPTION

Top

This module provides base functions for working with bootloader configuration files.

FUNCTIONS

Top

new()

	Creates a new Linux::Bootloader object.

read()

	Reads configuration file into an array.
	Takes: string.
	Returns: undef on error.

write()

	Writes configuration file.
	Takes: string.
	Returns: undef on error.

_info()

	Parse config into array of hashes.
	Takes: nothing.
	Returns: array of hashes.

get_default()

	Determine current default kernel.
	Takes: nothing.
	Returns: integer, undef on error.

set_default()

	Set new default kernel.
	Takes: integer.
	Returns: undef on error.

add()

	Add new kernel to config.
	Takes: hash.
	Returns: undef on error.

update()

	Update args of an existing kernel entry.
	Takes: hash.
	Returns: undef on error.

remove()

	Remove kernel from config.
	Takes: string.
	Returns: undef on error.

read_entry()

        Read an existing entry into a hash suitable to add or update from.
	Takes: integer or title
	Returns: undef or hash

debug($level)

        Sets or gets the current debug level, 0-5.
        Returns:  Debug level

_check_config()

        Conducts a basic check for kernel validity
        Returns:  true if checks out okay,
                  false if not okay,
                  undef on error

_lookup()

        Converts title into position.
	Takes: string.
        Returns:  integer,
                  undef on error

AUTHOR

Top

Jason N., Open Source Development Labs, Engineering Department <eng@osdl.org>

COPYRIGHT

Top

SEE ALSO

Top

boottool, Linux::Bootloader::Grub, Linux::Bootloader::Lilo, Linux::Bootloader::Elilo, Linux::Bootloader::Yaboot


Linux-Bootloader documentation  | view source Contained in the Linux-Bootloader distribution.