diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-06-21 08:59:24 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-06-21 08:59:24 +0000 |
commit | a68f151e091330b852db2b25c8047a167225623e (patch) | |
tree | 926bc7dc631669706115ddf2dded107171008e85 /perl-install/network | |
parent | 0e984708ebb6e3b1d4c23664cb3b262bf646cf50 (diff) | |
download | drakx-a68f151e091330b852db2b25c8047a167225623e.tar drakx-a68f151e091330b852db2b25c8047a167225623e.tar.gz drakx-a68f151e091330b852db2b25c8047a167225623e.tar.bz2 drakx-a68f151e091330b852db2b25c8047a167225623e.tar.xz drakx-a68f151e091330b852db2b25c8047a167225623e.zip |
- give config file path as argument in network::pxe::{read,write}_pxelinux_conf
- add write_conf in drakpxelinux to ease profile handling
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/pxe.pm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/network/pxe.pm b/perl-install/network/pxe.pm index 90fb30fcc..0dd81a6d0 100644 --- a/perl-install/network/pxe.pm +++ b/perl-install/network/pxe.pm @@ -25,19 +25,21 @@ our %vga_bios_to_resolution = ( ); our %vga_resolution_to_bios = reverse %vga_bios_to_resolution; -sub read_pxelinux_help() { +sub read_pxelinux_help { + my ($help_file) = @_; my %info; - foreach (cat_($pxelinux_help_file)) { + foreach (cat_($help_file)) { /^(\w+)\s*:\s*(.*)$/ and $info{$1} = $2; } \%info; } -sub read_pxelinux_conf() { +sub read_pxelinux_conf { + my ($conf_file, $help_file) = @_; my (%conf); - my $info = read_pxelinux_help(); + my $info = read_pxelinux_help($help_file); my $entry = {}; - foreach (cat_($pxelinux_config_file)) { + foreach (cat_($conf_file)) { my $global = join('|', @global_pxelinux_settings); if (/^($global)\s+(.*)/) { $conf{lc($1)} = $2; @@ -81,9 +83,9 @@ sub list_pxelinux_labels { } sub write_pxelinux_conf { - my ($conf) = @_; + my ($conf, $conf_file) = @_; - output($pxelinux_config_file, + output($conf_file, join("\n", "# DO NOT EDIT auto_generated by drakpxelinux.pl", (map { $_ . ' ' . $conf->{lc($_)} } @global_pxelinux_settings), |