diff options
Diffstat (limited to 'drakpxelinux.pl')
-rw-r--r-- | drakpxelinux.pl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl index 094a8a6..c9dc153 100644 --- a/drakpxelinux.pl +++ b/drakpxelinux.pl @@ -135,8 +135,19 @@ use constant COLUMN_DISPLAY => 11; use constant COLUMN_OPTION => 12; use constant NUM_COLUMNS => 13; +my ($profile, $type); +foreach (@ARGV) { + if (/^--profile=(\w+)$/) { + $profile = $1; + } elsif (/^--type=(\w+)$/) { + $type = $1; + } +} + +my ($config_file, $help_file) = $profile && $type ? + network::pxe::get_pxelinux_profile_path($profile, $type) : + ($network::pxe::pxelinux_config_file, $network::pxe::pxelinux_help_file); -my ($config_file, $help_file) = ($network::pxe::pxelinux_config_file, $network::pxe::pxelinux_help_file); my $pxelinux_conf = network::pxe::read_pxelinux_conf($config_file, $help_file); sub write_conf() { |