summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-09-03 15:12:10 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-09-03 15:12:10 +0000
commitcbec6a11b4b0f12cfd025e7ac424e8aa67b4349d (patch)
treef6b0d25dd13d0d5ead8ed964b3a8edb5eac5af79
parent153426e066bf73504b59483727816bc8339616b9 (diff)
downloaddrakwizard-cbec6a11b4b0f12cfd025e7ac424e8aa67b4349d.tar
drakwizard-cbec6a11b4b0f12cfd025e7ac424e8aa67b4349d.tar.gz
drakwizard-cbec6a11b4b0f12cfd025e7ac424e8aa67b4349d.tar.bz2
drakwizard-cbec6a11b4b0f12cfd025e7ac424e8aa67b4349d.tar.xz
drakwizard-cbec6a11b4b0f12cfd025e7ac424e8aa67b4349d.zip
fill func
-rw-r--r--client_wizard/client.wiz4
-rw-r--r--client_wizard/scripts/Clientconf.pm11
-rw-r--r--news_wizard/news.wiz2
-rw-r--r--news_wizard/scripts/Newsconf.pm5
4 files changed, 19 insertions, 3 deletions
diff --git a/client_wizard/client.wiz b/client_wizard/client.wiz
index 560ce447..cc640354 100644
--- a/client_wizard/client.wiz
+++ b/client_wizard/client.wiz
@@ -4,7 +4,7 @@
<Wizard
name="general"
libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="Client wizard"
+ wizardTitle="DNS client wizard"
imagePosition="top"
defaultImage="__WIZ_HOME__/client_wizard/images/DNS"
perlModule="__WIZ_HOME__/client_wizard/scripts/Clientconf.pm"
@@ -126,6 +126,7 @@
name="wiz_client_name"
variableName="wiz_client_name"
helpText="Name of the machine:"
+ fillfunc="name"
editable="true"
>
</Freetext>
@@ -134,6 +135,7 @@
name="wiz_client_ip"
variableName="wiz_client_ip"
helpText="IP number of the machine:"
+ fillfunc="ip"
editable="true"
>
</Freetext>
diff --git a/client_wizard/scripts/Clientconf.pm b/client_wizard/scripts/Clientconf.pm
index 6c567a16..44a72482 100644
--- a/client_wizard/scripts/Clientconf.pm
+++ b/client_wizard/scripts/Clientconf.pm
@@ -11,6 +11,15 @@ my $o = DrakconnectConf->new();
my $wiz_domain_name = $o->get("DomainName");
my $wiz_ip_server = $o->get_from_known_dev("IP");
+sub name {
+ $o->get("SystemName");
+}
+
+sub ip {
+ $wiz_ip_server;
+}
+
+
sub up_serial {
my ($file) = @_;
@@ -43,7 +52,7 @@ sub test {
!$s_trunc and return 1;
($s_trunc != $sc_trunc) and return 1;
($dc == $ds || $dc < 0 || $dc > 255) and return 1;
- return 10;
+ 10;
}
sub do_it {
diff --git a/news_wizard/news.wiz b/news_wizard/news.wiz
index 3b2863b1..8cf5dcc5 100644
--- a/news_wizard/news.wiz
+++ b/news_wizard/news.wiz
@@ -14,7 +14,6 @@
name="newsServer"
comment="The host name of the news server"
shellVariable="wiz_news_server"
- defaultValue="news.provider.com"
valueIsTranslated="false"
>
</Variable>
@@ -86,6 +85,7 @@
name="freetext1"
comment="Host name input field"
variableName="newsServer"
+ fillfunc="get_server"
helpText="News Server Name:"
editable="true"
>
diff --git a/news_wizard/scripts/Newsconf.pm b/news_wizard/scripts/Newsconf.pm
index 2ec5675d..55e99729 100644
--- a/news_wizard/scripts/Newsconf.pm
+++ b/news_wizard/scripts/Newsconf.pm
@@ -20,6 +20,11 @@ sub normalize_freq {
$freq;
}
+sub get_server {
+ my %mdk = Vareqval->get("/etc/leafnode/config");
+ $mdk{server};
+}
+
sub normalize_server {
my ($server) = @_;