diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2003-09-17 21:21:26 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2003-09-17 21:21:26 +0000 |
commit | d321880a235fd73a3c2f5865b9cc03b9aec3865d (patch) | |
tree | f3cfa4c719723d32506e550f30d6fd672e3a8ef0 /perl-install | |
parent | 69787b63f5aa3e9cee4cc3d86b76c18b678db235 (diff) | |
download | drakx-d321880a235fd73a3c2f5865b9cc03b9aec3865d.tar drakx-d321880a235fd73a3c2f5865b9cc03b9aec3865d.tar.gz drakx-d321880a235fd73a3c2f5865b9cc03b9aec3865d.tar.bz2 drakx-d321880a235fd73a3c2f5865b9cc03b9aec3865d.tar.xz drakx-d321880a235fd73a3c2f5865b9cc03b9aec3865d.zip |
Fixed "Configure CUPS" function of printerdrake adding a second
"<Location />...</Location>" in /etc/cups/cupsd.conf instead of
replacing the existing one (fix of Titi's newly introduced bug from
May 19 14:17:58 2003 UTC).
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/printer/main.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm index 5bd467b03..87b5b0c6f 100644 --- a/perl-install/printer/main.pm +++ b/perl-install/printer/main.pm @@ -717,7 +717,7 @@ sub read_location { my $location_end = -1; # Go through all the lines, bail out when start and end line found for (my $i = 0; - $i <= $#{$cupsd_conf_ptr}; + $i <= $#{$cupsd_conf_ptr} and $location_end == -1; $i++) { if ($cupsd_conf_ptr->[$i] =~ m!^\s*<\s*Location\s+$path\s*>!) { # Start line of block @@ -760,7 +760,7 @@ sub rip_location { if (any { m!^\s*<Location\s+$path\s*>! } @$cupsd_conf_ptr) { # Go through all the lines, bail out when start and end line found for (my $i = 0; - $i <= $#{$cupsd_conf_ptr} == -1; + $i <= $#{$cupsd_conf_ptr} and $location_end == -1; $i++) { if ($cupsd_conf_ptr->[$i] =~ m!^\s*<\s*Location\s+$path\s*>!) { # Start line of block |