summaryrefslogtreecommitdiffstats
path: root/perl-install/handle_configs.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2003-02-13 02:16:18 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2003-02-13 02:16:18 +0000
commitaf269e66df35a62d822501f66421e11e89568f87 (patch)
tree1aea55ffd229aa3f438c9bbe68d559061b42ff4c /perl-install/handle_configs.pm
parent2314ca1d9dd8072d7288a622aabd2695142b81c9 (diff)
downloaddrakx-af269e66df35a62d822501f66421e11e89568f87.tar
drakx-af269e66df35a62d822501f66421e11e89568f87.tar.gz
drakx-af269e66df35a62d822501f66421e11e89568f87.tar.bz2
drakx-af269e66df35a62d822501f66421e11e89568f87.tar.xz
drakx-af269e66df35a62d822501f66421e11e89568f87.zip
Improved handling and structure of scanner database
- Scanners with multiple ports are supported now - Fully automatic build of the scanner database, including lines for configuration files - Fixed "SnapScan" <-> "snapscan" bug - Some HP scanners had no manufacturer field. Fixed.
Diffstat (limited to 'perl-install/handle_configs.pm')
-rw-r--r--perl-install/handle_configs.pm16
1 files changed, 6 insertions, 10 deletions
diff --git a/perl-install/handle_configs.pm b/perl-install/handle_configs.pm
index 185d45b38..df817aac0 100644
--- a/perl-install/handle_configs.pm
+++ b/perl-install/handle_configs.pm
@@ -129,12 +129,13 @@ sub set_directive {
# Set a directive, replace the old definition or a commented definition
- my ($lines_ptr, $directive) = @_;
+ my ($lines_ptr, $directive, $full_line) = @_;
- my $searchdirective = searchstr($directive);
- my $olddirective = $searchdirective;
- $olddirective =~ s/^\s*(\S+)\s+.*$/$1/s;
- $olddirective ||= $directive;
+ my $olddirective = $directive;
+ if (!$full_line) {
+ $olddirective =~ s/^\s*(\S+)\s+.*$/$1/s;
+ $olddirective ||= $directive;
+ }
my $success = (replace_directive($lines_ptr, $olddirective,
$directive) or
@@ -152,11 +153,6 @@ sub add_directive {
my ($lines_ptr, $directive) = @_;
- my $searchdirective = searchstr($directive);
- my $olddirective = $searchdirective;
- $olddirective =~ s/^\s*(\S+)\s+.*$/$1/s;
- $olddirective ||= $directive;
-
my $success = insert_directive($lines_ptr, $directive);
if ($success) {
move_directive_to_version_commented_out($lines_ptr, $directive,