summaryrefslogtreecommitdiffstats
path: root/dhcp_wizard/scripts
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-09-03 13:28:28 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-09-03 13:28:28 +0000
commit2a0c44a89ff2ebd4e3de5fa7e3cfc82c23706eff (patch)
tree48996e6f444a404d4b9c7ed51e371024469af2df /dhcp_wizard/scripts
parent62086547910b4f73ae63c8c349a20f2718426e2f (diff)
downloaddrakwizard-2a0c44a89ff2ebd4e3de5fa7e3cfc82c23706eff.tar
drakwizard-2a0c44a89ff2ebd4e3de5fa7e3cfc82c23706eff.tar.gz
drakwizard-2a0c44a89ff2ebd4e3de5fa7e3cfc82c23706eff.tar.bz2
drakwizard-2a0c44a89ff2ebd4e3de5fa7e3cfc82c23706eff.tar.xz
drakwizard-2a0c44a89ff2ebd4e3de5fa7e3cfc82c23706eff.zip
some fillfunc
Diffstat (limited to 'dhcp_wizard/scripts')
-rw-r--r--dhcp_wizard/scripts/Dhcpconf.pm20
1 files changed, 19 insertions, 1 deletions
diff --git a/dhcp_wizard/scripts/Dhcpconf.pm b/dhcp_wizard/scripts/Dhcpconf.pm
index ad34c59a..8fd15aef 100644
--- a/dhcp_wizard/scripts/Dhcpconf.pm
+++ b/dhcp_wizard/scripts/Dhcpconf.pm
@@ -26,9 +26,27 @@ use strict;
use standalone;
my $o = DrakconnectConf->new();
+my $wiz_ip_server = $o->get_from_known_dev("IP");
+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})/;
+
+sub compute_range {
+ my $n;
+ if ($d <= 64) { $n = "65" }
+ elsif ($d <= 128) { $n = "129" }
+ else { $n = "1"}
+ "$s.$n";
+}
+
+sub compute_range2 {
+ my $n;
+ if ($d <= 128) { $n = "254" }
+ elsif ($d > 192) { $n = "192" }
+ else { $n = "128"}
+ "$s.$n";
+}
sub do_it {
- my $wiz_ip_server = $o->get_from_known_dev("IP");
my $wiz_domain_name = $o->get("DomainName");
my $wiz_host_name = $o->get("SystemName");
my $wiz_ip_net = "$1.$2.$3.0" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;