From 100b4731827c03739ee6b1d4ebb8924b303fb91d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 14 Nov 2003 13:32:27 +0000 Subject: perl_checker fixes --- server_wizard/scripts/Serverconf.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server_wizard/scripts') diff --git a/server_wizard/scripts/Serverconf.pm b/server_wizard/scripts/Serverconf.pm index 23a0eb91..0ef2267d 100644 --- a/server_wizard/scripts/Serverconf.pm +++ b/server_wizard/scripts/Serverconf.pm @@ -1,12 +1,13 @@ #!/usr/bin/perl package Serverconf; -require "/usr/share/wizards/common/scripts/Vareqval.pm"; -require "/usr/share/wizards/common/scripts/IFCFG.pm"; +use lib qw(/usr/lib/perl5/vendor_perl/5.8.1/MDK/Wizard/ /usr/share/wizards/common/scripts/); +require Vareqval; +require IFCFG; use MDK::Common; use strict; -my $o = IFCFG->new(); +my $o = IFCFG->new; sub get_hostname { my $host = $o->network_get("HOSTNAME"); @@ -133,7 +134,7 @@ sub do_it { open(OLD, "< $file") or die "can not open $file"; open(NEW, "> $tmp") or die "can not open $tmp"; while () { - if (/^\s*(?!\#)*\s*$old_ip.*$/) { + if (/^\s*(?!#)*\s*$old_ip/) { print NEW "# removed by mdk_serv script on $date #$_ $new_ip\t$hostname\n"; -- cgit v1.2.1