Bryce Harrington > Linux-Bootloader-1.3 > Linux::Bootloader

Download:
Linux-Bootloader-1.3.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 1.2   Source  

NAME ^

Linux::Bootloader - Base class interacting with Linux bootloaders

SYNOPSIS ^

        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 ^

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

FUNCTIONS ^

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.

print_info()

        Prints information from config.
        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 ^

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

COPYRIGHT ^

Copyright (C) 2006 Open Source Development Labs All Rights Reserved.

This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO ^

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

syntax highlighting: