diff options
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), |