summaryrefslogtreecommitdiffstats
path: root/server_wizard/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'server_wizard/scripts')
-rw-r--r--server_wizard/scripts/Serverconf.pm9
1 files changed, 5 insertions, 4 deletions
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 (<OLD>) {
- if (/^\s*(?!\#)*\s*$old_ip.*$/) {
+ if (/^\s*(?!#)*\s*$old_ip/) {
print NEW "# removed by mdk_serv script on $date
#$_
$new_ip\t$hostname\n";