summaryrefslogtreecommitdiffstats
path: root/dhcp_wizard/scripts
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-12-09 17:24:23 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-12-09 17:24:23 +0000
commit8f5aea5c59228ff4e71ba8951313d59fbfd99723 (patch)
tree2e42ca12d617f961c424ec55e3eb15f16667f6ab /dhcp_wizard/scripts
parentcef4fffc8767d73ee93b8885a8615cbe5ef1b5d0 (diff)
downloaddrakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar
drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar.gz
drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar.bz2
drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar.xz
drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.zip
No more use of drakconnect_conf, use of IFCFG.pm instead of DrakconnectConf.pm
Diffstat (limited to 'dhcp_wizard/scripts')
-rw-r--r--dhcp_wizard/scripts/Dhcpconf.pm17
1 files changed, 8 insertions, 9 deletions
diff --git a/dhcp_wizard/scripts/Dhcpconf.pm b/dhcp_wizard/scripts/Dhcpconf.pm
index 4cb9a21a..d3504d5a 100644
--- a/dhcp_wizard/scripts/Dhcpconf.pm
+++ b/dhcp_wizard/scripts/Dhcpconf.pm
@@ -19,14 +19,14 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
package Dhcpconf;
-require "__WIZ_HOME__/common/scripts/Vareqval.pm";
-require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm";
+require "__WIZ_HOME__/common/scripts/IFCFG.pm";
+#require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm";
use MDK::Common;
use strict;
use standalone;
-my $o = DrakconnectConf->new();
-my $wiz_ip_server = $o->get_from_known_dev("IP");
+my $o = IFCFG->new();
+my $wiz_ip_server = $o->itf_get("IPADDR");
my $d = "$4" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
my $s = "$1.$2.$3" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
@@ -48,7 +48,6 @@ sub compute_range2 {
sub check {
# FIXME : see check_range.sh
- my $wiz_ip_server = $o->get_from_known_dev("IP");
my $r1_trunc = "$1.$2.$3" if $ENV{wiz_ip_range1} =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
my $r2_trunc = "$1.$2.$3" if $ENV{wiz_ip_range2} =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
my $d1 = "$4" if $ENV{wiz_ip_range1} =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
@@ -72,13 +71,13 @@ sub check_dhcp {
}
sub do_it {
- my $wiz_domain_name = $o->get("DomainName");
- my $wiz_host_name = $o->get("SystemName");
+ my $wiz_domain_name = $o->network_get("DOMAINNAME");
+ my $wiz_host_name = $o->network_get("HOSTNAME");
my $wiz_ip_net = "$1.$2.$3.0" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
my $wiz_ip_range1 = $ENV{wiz_ip_range1};
my $wiz_ip_range2 = $ENV{wiz_ip_range2};
- my $wiz_ip_netmask = $o->get_from_known_dev("Mask");
- my $wiz_device = $o->get_device();
+ my $wiz_ip_netmask = $o->itf_get("NETMASK");
+ my $wiz_device = $o->default_itf();
# patch to rewrite when got new file about dhcp with INTERFACES value
# currently, I put the device to configure as dhcp server
# in /etc/sysconfig/dhcpd