summaryrefslogtreecommitdiffstats
path: root/server_wizard
diff options
context:
space:
mode:
Diffstat (limited to 'server_wizard')
-rw-r--r--server_wizard/.perl_checker1
-rw-r--r--server_wizard/Makefile21
-rw-r--r--server_wizard/scripts/Serverconf.pm160
-rwxr-xr-xserver_wizard/scripts/check_config.sh50
-rwxr-xr-xserver_wizard/scripts/check_domain.sh59
-rwxr-xr-xserver_wizard/scripts/check_network.sh55
-rwxr-xr-xserver_wizard/scripts/check_server_ip.sh65
-rwxr-xr-xserver_wizard/scripts/compute_domain.sh38
-rwxr-xr-xserver_wizard/scripts/compute_ipnet.sh44
-rwxr-xr-xserver_wizard/scripts/compute_server_ip.sh39
-rwxr-xr-xserver_wizard/scripts/do_it_last.sh49
-rwxr-xr-xserver_wizard/scripts/do_it_net.sh207
-rwxr-xr-xserver_wizard/scripts/liste_device.sh48
-rwxr-xr-xserver_wizard/scripts/set_ip.sh40
-rw-r--r--server_wizard/scripts/test.pl3
-rwxr-xr-xserver_wizard/scripts/test.sh6
-rw-r--r--server_wizard/server.wiz725
17 files changed, 1610 insertions, 0 deletions
diff --git a/server_wizard/.perl_checker b/server_wizard/.perl_checker
new file mode 100644
index 00000000..725f44b4
--- /dev/null
+++ b/server_wizard/.perl_checker
@@ -0,0 +1 @@
+Basedir .. \ No newline at end of file
diff --git a/server_wizard/Makefile b/server_wizard/Makefile
new file mode 100644
index 00000000..5633aa06
--- /dev/null
+++ b/server_wizard/Makefile
@@ -0,0 +1,21 @@
+install2:
+ su -c 'make install'
+
+install:
+ mkdir -p --mode=u=rwx,g=rx,o=rx ${prefix}/share/wizards
+ mkdir -p --mode=u=rwx,g=rx,o=rx ${prefix}/share/wizards/server_wizard
+ mkdir -p --mode=u=rwx,g=rx,o=rx ${prefix}/share/wizards/server_wizard/scripts
+ mkdir -p --mode=u=rwx,g=rx,o=rx ${prefix}/share/wizards/server_wizard/images
+ install --mode=u=rw,g=r,o=r -p server.wiz ${prefix}/share/wizards/server_wizard
+ install --mode=a=r -p ./images/intranet.png ${prefix}/share/wizards/server_wizard/images
+ install --mode=u=rwx,g=rx,o=rx -p scripts/*.sh ${prefix}/share/wizards/server_wizard/scripts
+ install --mode=u=rw,g=r,o=r -p scripts/Serverconf.pm ${prefix}/share/wizards/server_wizard/scripts
+ find scripts -name "*.default" -exec cp '{}' ${prefix}/share/wizards/server_wizard/scripts \;
+ find scripts -name "*.patch" -exec cp '{}' ${prefix}/share/wizards/server_wizard/scripts \;
+
+run:
+ (su -c "make install; unset WIZPATH; export DEBUG_WIZ='/dev/pts/0'; wiz /usr/share/wizards/server_wizard/server.wiz")
+
+desktop:
+ cp -f desktop_data/server_wizard\ wiz ${HOME}/Desktop
+ cp -f desktop_data/util1.gif ${HOME}/.kde/share/icons/
diff --git a/server_wizard/scripts/Serverconf.pm b/server_wizard/scripts/Serverconf.pm
new file mode 100644
index 00000000..0ef2267d
--- /dev/null
+++ b/server_wizard/scripts/Serverconf.pm
@@ -0,0 +1,160 @@
+#!/usr/bin/perl
+
+package Serverconf;
+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;
+
+sub get_hostname {
+ my $host = $o->network_get("HOSTNAME");
+ return $host if $host;
+ "host.domain"
+}
+
+sub check_domain {
+ $ENV{wiz_host_name} =~ /\S+\.\S+/ and return 10;
+ 1
+}
+
+sub check_network {
+ print "$ENV{wiz_ip_net}\n";
+ foreach (split '\.', $ENV{wiz_ip_net}) {
+ $_ >= 0 && $_ < 256 or return 1
+ }
+ return 10
+}
+
+sub get_net {
+ $o->itf_get('NET_ADDR') or "192.168.1.0";
+}
+
+sub compute_server_ip {
+ $o->itf_get('ADDR') or "192.168.1.1"
+}
+
+sub set_ip {
+
+}
+
+sub check_server_ip {
+ my @net = split '\.', $ENV{wiz_ip_net};
+ my @ip = split '\.', $ENV{wiz_ip_server};
+ mapn { $_[0] == $_[1] || $_[0] == 0 or return 0 } \@net, \@ip;
+ return 10
+}
+
+sub do_it_last {
+ my $file = "/etc/sysconfig/mdk_serv";
+ MDK::Common::cp_af($file, $file.".orig");
+ my $date = `date`;
+ open(NEW, "> $file");
+ print NEW "#mdk server basic info $date
+mdk_serv_version=1.0
+wiz_device=$ENV{wiz_device}
+wiz_host_name=$ENV{wiz_host_name}
+wiz_domain_name=$ENV{wiz_domain_name}";
+}
+
+sub get_gateway_dev {
+ $o->network_get('GATEWAYDEV') or "eth0"
+}
+
+sub get_device {
+ "eth0"
+}
+
+sub get_gateway {
+ $o->network_get('GATEWAY')
+}
+
+sub do_it {
+ my $old_ip;
+ my $date = `date`;
+ my $file = "/etc/sysconfig/network";
+ MDK::Common::cp_af($file, $file . ".orig");
+ my %mdk = Vareqval->get($file);
+ my $wiz_ip_netmask = "255.255.255.0";
+ $mdk{FORWARD_IPV4} = "yes";
+ $mdk{HOSTNAME} = $ENV{wiz_host_name} if defined $ENV{wiz_host_name} or
+ die "wiz_host_name not in env";
+ my $hostname = $mdk{HOSTNAME};
+ $mdk{DOMAINNAME} = $ENV{wiz_domain_name} if defined $ENV{wiz_host_name} or
+ die "wiz_domain_name not in env";
+ $mdk{NETWORKING} = "yes";
+ $mdk{GATEWAYDEV} = $ENV{wiz_extn_device} if defined $ENV{wiz_extn_device} or
+ die "wiz_extn_device not in env";
+ $mdk{GATEWAY} = $ENV{wiz_extn_gateway} if defined $ENV{wiz_extn_gateway} or
+ die "wiz_extn_gateway not in env";
+ Vareqval->commit($file, \%mdk);
+ $file = "/etc/sysconfig/network-scripts/ifcfg-$ENV{wiz_device}" if defined $ENV{wiz_device} or
+ die "wiz_device not in env";
+ if (-f $file) {
+ MDK::Common::cp_af($file, "mdk_$file.orig");
+ %mdk = Vareqval->get($file);
+ $old_ip = $mdk{IPADDR} || $o->network_get('IPADDR')
+ }
+ else {
+ system("touch $file");
+ %mdk = Vareqval->get($file);
+ }
+# starting chg_val sequence
+ $mdk{DEVICE} = $ENV{wiz_device};
+ $mdk{BOOTPROTO} = "none";
+ $mdk{IPADDR} = $ENV{wiz_ip_server} if defined $ENV{wiz_ip_server} or
+ die "IPADDR not found in $file";
+ my $new_ip = $mdk{IPADDR};
+ $mdk{NETMASK} = $wiz_ip_netmask;
+ $mdk{NETWORK} = $ENV{wiz_ip_net} if defined $ENV{wiz_ip_net} or
+ die "NETWORK not found in $file";
+ $mdk{ONBOOT} = "yes";
+ $mdk{IPXNETNUM_802_2} = "";
+ $mdk{IPXPRIMARY_802_2} = "no";
+ $mdk{IPXACTIVE_802_2} = "no";
+ $mdk{IPXNETNUM_802_3} = "";
+ $mdk{IPXPRIMARY_802_3} = "no";
+ $mdk{IPXACTIVE_802_3} = "no";
+ $mdk{IPXNETNUM_ETHERII} = "";
+ $mdk{IPXPRIMARY_ETHERII} = "no";
+ $mdk{IPXACTIVE_ETHERII} = "no";
+ $mdk{IPXNETNUM_SNAP} = "";
+ $mdk{IPXPRIMARY_SNAP} = "no";
+ $mdk{IPXACTIVE_SNAP} = "no";
+# chg_val sequence ended
+ Vareqval->commit($file, \%mdk);
+
+ $file = "/etc/hosts";
+ MDK::Common::cp_af($file, $file . ".orig");
+ if (defined $old_ip && $old_ip ne $new_ip) {
+ my $tmp = `mktemp /tmp/Serverconf.XXXXXX`;
+ chomp($tmp);
+ 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/) {
+ print NEW "# removed by mdk_serv script on $date
+#$_
+$new_ip\t$hostname\n";
+ next;
+ }
+ print NEW $_;
+ }
+ close OLD;
+ close NEW;
+ system("mv $tmp $file");
+ }
+ else {
+ open(NEW, ">> $file");
+ print NEW "$new_ip\t$hostname\n";
+ close NEW;
+ }
+ do_it_last();
+ system("/etc/rc.d/init.d/network stop");
+ system("/etc/rc.d/init.d/network start");
+ 10;
+}
+
+1;
diff --git a/server_wizard/scripts/check_config.sh b/server_wizard/scripts/check_config.sh
new file mode 100755
index 00000000..512fd7da
--- /dev/null
+++ b/server_wizard/scripts/check_config.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard basic network configuration
+#
+# checking if the provided domain value is correct :
+# strip the @, need at least a dot
+
+echo_debug "$(/bin/date) begin $0"
+
+fic=/etc/sysconfig/mdk_serv
+if [ ! -f "$fic" ] ;then
+ . /etc/sysconfig/network
+ echo_debug "${HOSTNAME}"
+ echo_debug "${DOMAINNAME}"
+ echo -e "\
+# mdk server basic info $(date)\n\
+mdk_serv_version=1.0\n\
+wiz_device=eth0\n\
+wiz_host_name=${HOSTNAME}\n\
+wiz_domain_name=${DOMAINNAME}\n\
+" > ${fic}
+
+fi
+ echo_debug "${wiz_device}"
+ echo_debug "${wiz_host_name}"
+ echo_debug "${wiz_domain_name}"
+exit 1
diff --git a/server_wizard/scripts/check_domain.sh b/server_wizard/scripts/check_domain.sh
new file mode 100755
index 00000000..4575b069
--- /dev/null
+++ b/server_wizard/scripts/check_domain.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard basic network configuration
+#
+# checking if the provided domain value is correct :
+# strip the @, need at least a dot
+
+echo_debug "$(date) begin $0"
+
+if [ -z "${wiz_host_name}" ] ;then
+ echo_debug "wiz_host_name is empty, should not."
+ exit 1
+fi
+
+
+test=`echo ${wiz_host_name##*@} |sed -e 's/[^0-9a-zA-Z-\.]//g'|sed -n -e's/^[^.]*\.\(.*\)$/\1/p'|grep "\."`
+
+htest=`echo ${wiz_host_name##*@} |sed -e 's/[^0-9a-zA-Z-\.]//g'|sed -n -e's/^\([^.]*\)\..*$/\1/p'`
+
+echo_debug "test of host : ${htest}"
+
+if [ -z "${htest}" ] ;then
+ echo_debug "host empty, should not."
+ exit 1
+fi
+
+echo_debug "test of domain : ${test}"
+
+if [ -z "${test}" ] ;then
+ echo_debug "domain empty, should not."
+ exit 1
+fi
+
+# all seems to be ok
+exit 10
+
diff --git a/server_wizard/scripts/check_network.sh b/server_wizard/scripts/check_network.sh
new file mode 100755
index 00000000..6533dbb6
--- /dev/null
+++ b/server_wizard/scripts/check_network.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard basic network configuration
+#
+# assuming :
+# - C class network, mask 255.255.255.0
+#
+# checking if the provided network address is correct
+
+echo_debug "$(date) begin $0"
+# ip is tested as ip=a.b.c.d
+
+a=`echo ${wiz_ip_net}|sed -n -e 's/^\([0-9]\{1,3\}\)\..*$/\1/p'`
+b=`echo ${wiz_ip_net}|sed -n -e 's/^[0-9]\{1,3\}\.\([0-9]\{1,3\}\)\..*$/\1/p'`
+c=`echo ${wiz_ip_net}|sed -n -e 's/^[0-9]\{1,3\}\.[0-9]\{1,3\}\.\([0-9]\{1,3\}\)\..*$/\1/p'`
+d=`echo ${wiz_ip_net}|sed -n -e 's/^.*\.\([0-9]\{1,3\}\)$/\1/p'`
+
+echo_debug "ip -$a-$b-$c-$d-"
+
+if [ -z "$a" -o -z "$b" -o -z "$c" -o -z "$d" ]; then
+ echo_debug "incomplete ip"
+ exit 1
+fi
+
+if [ $a -gt 255 -o $b -gt 255 -o $c -gt 255 -o $d -ne 0 ]; then
+ echo_debug "not a network ip"
+ exit 1
+fi
+
+
+# all seems to be ok
+exit 10
diff --git a/server_wizard/scripts/check_server_ip.sh b/server_wizard/scripts/check_server_ip.sh
new file mode 100755
index 00000000..1b98fee0
--- /dev/null
+++ b/server_wizard/scripts/check_server_ip.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard basic network configuration
+#
+# assuming :
+# - C class network, mask 255.255.255.0
+#
+# checking if the provided server address is correct (belongs to network...)
+
+echo_debug "$(date) begin $0"
+#truncating addresses
+n_trunc=${wiz_ip_net%.*}
+s_trunc=${wiz_ip_server%.*}
+d=${wiz_ip_server##*.}
+
+
+echo_debug "_${wiz_ip_net}_ _${wiz_ip_server}_ ${s_trunc} $d"
+
+if [ -z "${s_trunc}" ]; then
+ echo_debug "incorrect address"
+ exit 1
+fi
+
+if [ "${s_trunc}" != "${n_trunc}" ]; then
+ echo_debug "server not in network"
+ exit 1
+fi
+
+if [ -z "$d" ]; then
+ echo_debug "not a server ip"
+ exit 1
+fi
+
+if [ $d -gt 254 -o $d -lt 1 ]; then
+ echo_debug "not a server ip"
+ exit 1
+fi
+
+
+# all seems to be ok
+exit 10
+
diff --git a/server_wizard/scripts/compute_domain.sh b/server_wizard/scripts/compute_domain.sh
new file mode 100755
index 00000000..18bf2b76
--- /dev/null
+++ b/server_wizard/scripts/compute_domain.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard basic network configuration
+#
+# return on stdout the domain name (computed from hostname)
+
+echo_debug "$(date) begin $0"
+test=`echo ${wiz_host_name##*@}|sed -e 's/[^0-9a-zA-Z-\.]//g'|sed -n -e's/^[^.]*\.\(.*\)$/\1/p'`
+
+echo_debug "computed domain: ${test}"
+
+echo ${test}
+
+exit 0
+
diff --git a/server_wizard/scripts/compute_ipnet.sh b/server_wizard/scripts/compute_ipnet.sh
new file mode 100755
index 00000000..98387e58
--- /dev/null
+++ b/server_wizard/scripts/compute_ipnet.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard basic network configuration
+#
+# return on stdout the default value for server ip address
+
+echo_debug "$(date) begin $0"
+echo_debug "$wiz_device"
+
+nfile="/etc/sysconfig/network-scripts/ifcfg-${wiz_device}"
+t=`get_val ${nfile} NETWORK`
+if [ -z "$t" ]; then
+ echo ${wiz_ip_net}
+else
+ echo "$t"
+fi
+
+echo_debug "net adr : ${t}"
+
+exit 0
+
diff --git a/server_wizard/scripts/compute_server_ip.sh b/server_wizard/scripts/compute_server_ip.sh
new file mode 100755
index 00000000..c16c9a80
--- /dev/null
+++ b/server_wizard/scripts/compute_server_ip.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard basic network configuration
+#
+# return on stdout the default value for server ip address
+
+echo_debug "$(date) begin $0"
+
+adr="${wiz_ip_net%.*}.1"
+
+echo_debug "serv adr : ${adr}"
+
+echo ${adr}
+
+exit 0
+
diff --git a/server_wizard/scripts/do_it_last.sh b/server_wizard/scripts/do_it_last.sh
new file mode 100755
index 00000000..479be201
--- /dev/null
+++ b/server_wizard/scripts/do_it_last.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard network configuration
+#
+# restarting all services
+
+# putting a few infos in /etc/sysconfig/mdk_serv file
+
+echo_debug "$(date) begin $0"
+fic=/etc/sysconfig/mdk_serv
+
+bck_file ${fic}
+
+echo_debug "saving server basic info"
+
+echo -e "\
+# mdk server basic info $(date)\n\
+mdk_serv_version=1.0\n\
+wiz_device=${wiz_device}\n\
+wiz_host_name=${wiz_host_name}\n\
+wiz_domain_name=${wiz_domain_name}\n\
+" > ${fic}
+
+
+# all is ok
+exit 10
diff --git a/server_wizard/scripts/do_it_net.sh b/server_wizard/scripts/do_it_net.sh
new file mode 100755
index 00000000..839dda54
--- /dev/null
+++ b/server_wizard/scripts/do_it_net.sh
@@ -0,0 +1,207 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard network configuration
+#
+# install default for network
+# change files :
+# /etc/sysconfig/network
+# /etc/sysconfig/network-cripts/ifcfg-ethx
+# /etc/hosts
+# /etc/HOSTNAME
+#
+
+echo_debug "$(date) begin $0"
+
+if [ ! -f /etc/sysconfig/network ]; then
+ [ -d /etc/sysconfig ] || exit 1
+ echo_debug "warning, no network file"
+ echo "# warning, this file was not create during install $(date)"\
+ > /etc/sysconfig/network
+fi
+
+bck_file /etc/sysconfig/network
+
+# first loading values
+. /etc/sysconfig/network
+
+# default value for netmask
+export wiz_ip_netmask=255.255.255.0
+
+# configuring /etc/sysconfig/network
+
+if [ "${FORWARD_IPV4}" = "false" ]; then
+ echo_debug "putting FORWARD_IPV4 to \"yes\""
+ chg_val /etc/sysconfig/network FORWARD_IPV4 yes
+fi
+
+if [ "${HOSTNAME}" != "${wiz_host_name}" ]; then
+ echo_debug "changing hostname from ${HOSTNAME} to ${wiz_host_name}"
+ chg_val /etc/sysconfig/network HOSTNAME ${wiz_host_name}
+fi
+
+if [ "${DOMAINNAME}" != "${wiz_domain_name}" ]; then
+ echo_debug "changing domain name from ${DOMAINNAME} to ${wiz_domain_name}"
+ chg_val /etc/sysconfig/network DOMAINNAME ${wiz_domain_name}
+fi
+
+if [ "${NETWORKING}" != "yes" ]; then
+ echo_debug "WARNING, NETWORKING was ${NETWORKING}"
+ chg_val /etc/sysconfig/network NETWORKING yes
+fi
+
+if [ "${GATEWAYDEV}" != "${wiz_extn_device}" ]; then
+ echo_debug "changing GATEWAYDEV name from ${GATEWAYDEV} to ${wiz_extn_device}"
+ chg_val /etc/sysconfig/network GATEWAYDEV ${wiz_extn_device}
+fi
+
+if [ "${GATEWAY}" != "${wiz_extn_gateway}" ]; then
+ echo_debug "changing GATEWAY name from ${GATEWAY} to ${wiz_extn_gateway}"
+ chg_val /etc/sysconfig/network GATEWAY ${wiz_extn_gateway}
+fi
+
+
+# now reloading
+echo_debug "reloading net params"
+. /etc/sysconfig/network
+
+# configuring /etc/sysconfig/network-scripts/.
+file="/etc/sysconfig/network-scripts/ifcfg-${wiz_device}"
+
+if [ -f ${file} ]; then
+ echo_debug "WARNING ${file} already exists, saved."
+ bck_file ${file}
+ oldip=`get_val ${file} IPADDR`
+else
+ oldip=""
+ touch ${file}
+fi
+
+
+echo_debug "starting chg_val sequence"
+
+chg_val ${file} DEVICE "${wiz_device}"
+chg_val ${file} BOOTPROTO none
+chg_val ${file} IPADDR "${wiz_ip_server}"
+# by default, just accept ../24 network :
+chg_val ${file} NETMASK "${wiz_ip_netmask}"
+chg_val ${file} NETWORK "${wiz_ip_net}"
+chg_val ${file} BROADCAST "${wiz_ip_net%.*}.255"
+chg_val ${file} ONBOOT yes
+chg_val ${file} IPXNETNUM_802_2 ""
+chg_val ${file} IPXPRIMARY_802_2 no
+chg_val ${file} IPXACTIVE_802_2 no
+chg_val ${file} IPXNETNUM_802_3 ""
+chg_val ${file} IPXPRIMARY_802_3 no
+chg_val ${file} IPXACTIVE_802_3 no
+chg_val ${file} IPXNETNUM_ETHERII ""
+chg_val ${file} IPXPRIMARY_ETHERII no
+chg_val ${file} IPXACTIVE_ETHERII no
+chg_val ${file} IPXNETNUM_SNAP ""
+chg_val ${file} IPXPRIMARY_SNAP no
+chg_val ${file} IPXACTIVE_SNAP no
+
+echo_debug "chg_val sequence ended"
+
+#loading new values
+. ${file}
+
+
+# now setup of /etc/hosts
+#
+# <warning> all this assumes that ip address of server is hard coded
+# in /etc/hosts, which may be wrong in some situations
+#
+
+
+
+# first, storing new hostname (/etc/sysconfig/network has been reloaded)
+bck_file /etc/HOSTNAME
+echo ${HOSTNAME} > /etc/HOSTNAME
+hostname ${HOSTNAME}
+echo_debug "done hostname"
+
+hostalias=`echo ${HOSTNAME} |sed -e 's|^\([^.]*\)\..*$|\1|'`
+
+# replacing . by \. for use in sed command
+chgipaddr=`echo ${IPADDR} |sed -e 's/\./\\./g'`
+
+TMPFILE=`mktemp /tmp/temp.XXXXXX` || exit 1
+TMPFIL2=`mktemp /tmp/temp.XXXXXX` || exit 1
+cat /etc/hosts > ${TMPFILE}
+bck_file /etc/hosts
+#cp -f /etc/hosts /var/tmp/wiz_bck/orig/
+
+cat ${TMPFILE}|sed -e '/^[[:space:]]*'"${chgipaddr}"'[[:space:]]\{1,\}.*$/{
+i \
+# removed by mdk_serv script on '"$(date)"'
+s//#&/
+a \
+'"${IPADDR} ${HOSTNAME} ${hostalias}"'
+}
+' > ${TMPFIL2}
+
+if [ -z "`grep -E "^[[:space:]]*${chipaddr}[[:space:]]+" ${TMPFIL2}`" ]; then
+ echo "${IPADDR} ${HOSTNAME} ${hostalias}" >> ${TMPFIL2}
+fi
+
+
+
+if [ -n "${oldip}" -a "${oldip}" != "${IPADDR}" ]; then
+ chgoldip=`echo ${oldip} |sed -e 's/\./\\./g'`
+ cat ${TMPFIL2}|sed -e '/^[[:space:]]*'"${chgoldip}"'[[:space:]]\{1,\}.*$/{
+i \
+# removed by mdk_serv script on '"$(date)"'
+s//#&/
+}
+' > /etc/hosts
+else
+ cat ${TMPFIL2} > /etc/hosts
+fi
+
+rm -f ${TMPFIL2}
+rm -f ${TMPFILE}
+
+echo_debug "done /etc/hosts"
+
+
+
+#
+# </warning> see above
+#
+
+# storing network values in /etc/sysconfig/mdk_serv
+echo_debug "storing network values"
+${CWD}/scripts/do_it_last.sh
+
+# restarting network
+echo_debug "restarting network"
+/etc/rc.d/init.d/network stop
+/etc/rc.d/init.d/network start
+echo_debug "done restarting network"
+
+# all is ok
+exit 10
+
diff --git a/server_wizard/scripts/liste_device.sh b/server_wizard/scripts/liste_device.sh
new file mode 100755
index 00000000..0dbdba9b
--- /dev/null
+++ b/server_wizard/scripts/liste_device.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard basic network configuration
+#
+# return on stdout the list of allowed devices for network interfaces
+
+# this script should be improved (use of detect)
+
+liste=""
+
+liste=$liste"`/sbin/ifconfig -a | /bin/awk ' /^eth/ { print $1"\n"$1, $4,":",$5 } '`\n"
+
+# display only configured device
+#for i in 0 1 2 3 ;do
+# liste=${liste}"eth$i\nethernet adapter \
+# `ifconfig -a | grep eth$i| sed -n -e '1{s/.*HWaddr \(.*\)$/\1/p;}'`\n"
+
+# liste=${liste}"eth$i\neth$i \
+# `dmesg | grep eth$i| sed -n -e '1{s/^[^:]*: *\(.*\)$/\1/p;}'`\n"
+#done
+
+echo -ne "${liste}"
+
+exit 0
+
diff --git a/server_wizard/scripts/set_ip.sh b/server_wizard/scripts/set_ip.sh
new file mode 100755
index 00000000..e5787e95
--- /dev/null
+++ b/server_wizard/scripts/set_ip.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+# script for wizard basic network configuration
+#
+# assuming :
+# - C class network, mask 255.255.255.0
+#
+# checking if the provided network address is correct
+
+# ip is tested as ip=a.b.c.d
+
+echo_debug "$(date) begin $0"
+echo_debug "$wiz_device"
+file=/etc/sysconfig/mdk_serv
+bck_file ${file}
+chg_val ${file} wiz_device ${wiz_device}
+exit 1
diff --git a/server_wizard/scripts/test.pl b/server_wizard/scripts/test.pl
new file mode 100644
index 00000000..f1c7c1da
--- /dev/null
+++ b/server_wizard/scripts/test.pl
@@ -0,0 +1,3 @@
+use Serverconf;
+
+Serverconf::do_it();
diff --git a/server_wizard/scripts/test.sh b/server_wizard/scripts/test.sh
new file mode 100755
index 00000000..dabc4f38
--- /dev/null
+++ b/server_wizard/scripts/test.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+#if [ -n "${oldip}" -a "${oldip}" != "${IPADDR}" ]; then
+if [ -f "/etc/motd" -a "${oldip}" != "${IPADDR}" ]; then
+echo "toto\n"
+fi \ No newline at end of file
diff --git a/server_wizard/server.wiz b/server_wizard/server.wiz
new file mode 100644
index 00000000..301d31fd
--- /dev/null
+++ b/server_wizard/server.wiz
@@ -0,0 +1,725 @@
+<?xml version="1.0"?>
+
+
+<Wizard
+ name="general"
+ libScript="__WIZ_HOME__/common/scripts/functions.sh"
+ wizardTitle="Server Wizard"
+ imagePosition="top"
+ defaultImage="__WIZ_HOME__/server_wizard/images/intranet.png"
+ perlModule="__WIZ_HOME__/server_wizard/scripts/Serverconf.pm"
+>
+
+ <Variable
+ name="hostname"
+ comment="The host name of the server"
+ shellVariable="wiz_host_name"
+ valueIsTranslated="false"
+ >
+ </Variable>
+
+ <Variable
+ name="domainname"
+ comment="Domain name, usually derived from the server"
+ shellVariable="wiz_domain_name"
+ defaultValue="domain"
+ valueIsTranslated="false"
+ >
+ </Variable>
+
+ <Variable
+ name="network_address"
+ comment="The network address"
+ shellVariable="wiz_ip_net"
+ valueIsTranslated="false"
+ >
+ </Variable>
+
+ <Variable
+ name="server_address"
+ comment="The server IP address"
+ shellVariable="wiz_ip_server"
+ valueIsTranslated="false"
+ >
+ </Variable>
+
+ <Variable
+ name="net_device"
+ comment="The device used to the network connection"
+ shellVariable="wiz_device"
+ valueIsTranslated="false"
+ >
+ </Variable>
+
+ <Variable
+ name="wiz_extn_device"
+ shellVariable="wiz_extn_device"
+ valueIsTranslated="false"
+ >
+ </Variable>
+
+ <Variable
+ name="wiz_extn_gateway"
+ shellVariable="wiz_extn_gateway"
+ valueIsTranslated="false"
+ >
+ </Variable>
+
+ <Page
+ name="Welcome"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ jumpScript="__WIZ_HOME__/common/scripts/check.sh root"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Target
+ targetName="error_need_root"
+ jumpIndex="1"
+ >
+ </Target>
+
+ <Target
+ targetName="Warning"
+ jumpIndex="0"
+ >
+ </Target>
+
+ <Info
+ helpText="Basic Network Configuration Wizard"
+ >
+ </Info>
+
+
+ <Info
+ helpText="This wizard will help you in configuring the basic networking services of your server."
+ >
+ </Info>
+
+ </Page>
+
+ <Page
+ name="Warning"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ jumpPage="Note"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Info
+ helpText="Warning"
+ >
+ </Info>
+
+
+ <Info
+ helpText="This wizard will set the basic networking parameters of your server."
+ >
+ </Info>
+
+
+ <Info
+ helpText="You should not run any other applications while running this wizard and at the end of the wizard you should exit your session and login again."
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="Note"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ jumpScript="__WIZ_HOME__/server_wizard/scripts/check_config.sh"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Info
+ helpText="Note about networking"
+ >
+ </Info>
+
+
+ <Info
+ helpText="In regards to these wizards, your computer is seen as a server managing his own local network (C class network)."
+ >
+ </Info>
+
+ <Info
+ helpText="So, it's very probable that domain name and IP adresses for this local network are DIFFERENT from the server \qexternal\q connection."
+ >
+ </Info>
+
+ <Info
+ helpText="External connection is a network from which the computer is client (Internet or upstream network), connected using another network card or a modem."
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="load_hostname_value"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ jumpPage="ask_hostname"
+ executionLevel="DEBUG"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Freetext
+ name="freetext"
+ variableName="hostname"
+ fillfunc="get_hostname"
+ editable="true"
+ >
+ </Freetext>
+ </Page>
+
+ <Page
+ name="ask_hostname"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ func="check_domain"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Target
+ targetName="error_in_hostname"
+ jumpIndex="1"
+ >
+ </Target>
+
+ <Target
+ targetName="choose_net_device"
+ jumpIndex="10"
+ >
+ </Target>
+
+ <Info
+ helpText="Host Name"
+ >
+ </Info>
+
+
+ <Info
+ helpText="The hostname is the name under which your server will be known from the other workstations in your network and maybe on the Internet (depending of your upstream configuration)."
+ >
+ </Info>
+
+
+ <Freetext
+ name="hostnameInput"
+ comment="Host name input field"
+ variableName="hostname"
+ fillfunc="get_hostname"
+ helpText="Host Name:"
+ editable="true"
+ >
+ </Freetext>
+
+ <Info
+ helpText="Host names must be in the form \qhost.domain.domaintype\q; if your server will be an Internet server, the domain name should be the name registered with your provider. If you will only have intranet any valid name is OK, like \qcompany.net\q."
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="choose_net_device"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ func="set_ip"
+ jumpPage="load_net_address"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Info
+ helpText="Network Device"
+ >
+ </Info>
+
+
+ <Info
+ helpText="Choose the network device (usually a card) the server should use to connect to your network. It's the device for the local network, probably not the same device used for internet access."
+ >
+ </Info>
+
+ <Chooser
+ name="deviceChooser"
+ variableName="net_device"
+ defaultOptionScript="__WIZ_HOME__/firewall_wizard/scripts/compute_ext_device.sh"
+ fillScript="__WIZ_HOME__/server_wizard/scripts/liste_device.sh"
+ helpText="Device:"
+ helpFontName="Default"
+ helpFontStyle="plain"
+ helpFontSize="12"
+ >
+ </Chooser>
+
+ <Info
+ helpText="Devices are presented with the Linux name and, if known, with the card description."
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="_compute_domainname"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ executionLevel="DEBUG"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Info
+ helpText="This page computes the domainname; it should be invisible"
+ >
+ </Info>
+ <Freetext
+ name="net_deviceField"
+ variableName="net_device"
+ fillfunc="get_device"
+ helpText="net device"
+ editable="false"
+ >
+ </Freetext>
+
+ <Freetext
+ name="domainnameField"
+ variableName="domainname"
+ fillScript="__WIZ_HOME__/server_wizard/scripts/compute_domain.sh"
+ helpText="Computed domain Name"
+ editable="false"
+ >
+ </Freetext>
+ </Page>
+
+ <Page
+ name="load_net_address"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ executionLevel="DEBUG"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Freetext
+ name="freetext1"
+ variableName="network_address"
+ fillfunc="get_net"
+ editable="true"
+ >
+ </Freetext>
+ </Page>
+
+ <Page
+ name="ask_network_address"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ func="check_network"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Target
+ targetName="error_in_network_address"
+ jumpIndex="1"
+ >
+ </Target>
+
+ <Target
+ targetName="_compute_server_address"
+ jumpIndex="10"
+ >
+ </Target>
+
+ <Info
+ helpText="Network Address"
+ >
+ </Info>
+
+
+ <Info
+ helpText="The network address is a number identifying your network; the proposed value is designed for a configuration not connected to Internet, or connected using IP masquerading; unless you know what you are doing, accept the default value."
+ >
+ </Info>
+
+
+ <Freetext
+ name="freetext2"
+ variableName="network_address"
+ fillfunc="get_net"
+ helpText="IP net address:"
+ editable="true"
+ >
+ </Freetext>
+
+
+ <Info
+ helpText="Network addresses are a list of four numbers smaller than 256, separated by dots; the last number of the list must be zero."
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="error_in_network_address"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ jumpPage="load_net_address"
+ nextButtonText="Fix it"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Info
+ helpText="The network address is wrong"
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="_compute_server_address"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ executionLevel="DEBUG"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Info
+ helpText="This page computes the default server address; it should be invisible."
+ >
+ </Info>
+
+ <Freetext
+ name="freetext3"
+ variableName="server_address"
+ fillfunc="compute_server_ip"
+ editable="false"
+ >
+ </Freetext>
+ </Page>
+
+ <Page
+ name="read_gatewaydev"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ executionLevel="DEBUG"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Freetext
+ name="freetext4"
+ variableName="wiz_extn_device"
+ fillScript="echo `get_var wiz_extn_device`"
+ editable="true"
+ >
+ </Freetext>
+ </Page>
+
+ <Page
+ name="read_gatewayip"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ executionLevel="DEBUG"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Freetext
+ name="freetext5"
+ variableName="wiz_extn_gateway"
+ fillScript="echo `get_var wiz_extn_gateway`"
+ editable="true"
+ >
+ </Freetext>
+ </Page>
+
+ <Page
+ name="ask_server_address"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ func="check_server_ip"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Target
+ targetName="error_in_server_address"
+ jumpIndex="1"
+ >
+ </Target>
+
+ <Target
+ targetName="external_gateway"
+ jumpIndex="10"
+ >
+ </Target>
+
+ <Info
+ helpText="Server Address"
+ >
+ </Info>
+
+
+ <Info
+ helpText="The server IP address is a number identifing your server in your network; the proposed value designed for a private network , with no internet visibility, or connected using IP masquerading; unless you know what you are doing, accept the default value."
+ >
+ </Info>
+
+
+ <Freetext
+ name="serverAddressInput"
+ variableName="server_address"
+ fillfunc="compute_server_ip"
+ helpText="Server IP address:"
+ editable="true"
+ >
+ </Freetext>
+
+
+ <Info
+ helpText="IP addresses are a dotted list of four numbers smaller than 256."
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="error_in_server_address"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ jumpPage="ask_server_address"
+ nextButtonText="Fix It"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Info
+ helpText="The Server IP address is incorrect"
+ >
+ </Info>
+ </Page>
+
+
+ <Page
+ name="external_gateway"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Info
+ helpText="External gateway"
+ >
+ </Info>
+
+
+ <Info
+ helpText="Here is your current value for the external gateway (value specified during the initial installation). The device (network card or modem) should be different from the one used for the internal network."
+ >
+ </Info>
+
+ <Info
+ helpText="Note: the gateway IP address should be non empty if you want an access to outside world."
+ >
+ </Info>
+
+ <Info
+ helpText="(you can change here these values if you know exactly what you're doing)"
+ >
+ </Info>
+
+
+ <Freetext
+ name="get_gatewaydev"
+ variableName="wiz_extn_device"
+ helpText="Gateway device:"
+ fillfunc="get_gateway_dev"
+ editable="true"
+ >
+ </Freetext>
+
+ <Freetext
+ name="get_ipgateway"
+ variableName="wiz_extn_gateway"
+ fillfunc="get_gateway"
+ helpText="Gateway IP:"
+ editable="true"
+ >
+ </Freetext>
+ </Page>
+
+ <Page
+ name="doit"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ func="do_it"
+ nextButtonText="Configure"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Target
+ targetName="done"
+ jumpIndex="10"
+ >
+ </Target>
+
+ <Info
+ helpText="Configuring your network"
+ >
+ </Info>
+
+
+ <Info
+ helpText="The wizard collected the following parameters needed to configure your network"
+ >
+ </Info>
+
+
+ <Freetext
+ name="serverNameConfirm"
+ variableName="hostname"
+ helpText="Server Name:"
+ editable="false"
+ >
+ </Freetext>
+
+ <Freetext
+ name="networkIPConfirm"
+ variableName="network_address"
+ helpText="Network Address:"
+ editable="false"
+ >
+ </Freetext>
+
+ <Freetext
+ name="serverIPConfirm"
+ variableName="server_address"
+ fillfunc="compute_server_ip"
+ helpText="Server Address:"
+ editable="false"
+ >
+ </Freetext>
+
+ <Freetext
+ name="deviceConfirm"
+ variableName="net_device"
+ helpText="Device:"
+ editable="false"
+ >
+ </Freetext>
+
+ <Freetext
+ name="gatewayip_confirm"
+ variableName="wiz_extn_gateway"
+ helpText="Gateway IP:"
+ editable="false"
+ >
+ </Freetext>
+
+ <Freetext
+ name="gatewaydev_confirm"
+ variableName="wiz_extn_device"
+ helpText="Gateway device:"
+ editable="false"
+ >
+ </Freetext>
+
+
+ <Info
+ helpText="To accept these values, and configure your server, click the Next button or use the Back button to correct them."
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="catastrophic_exit1"
+ comment="Exit in case of catastrophhic system error"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ nextButtonText="Exit"
+ executionLevel="NORMAL"
+ nextFinish="true"
+ canBack="false"
+ canCancel="false"
+ >
+
+ <Info
+ helpText="Wizard Error."
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="done"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ nextButtonText="Quit"
+ executionLevel="NORMAL"
+ nextFinish="true"
+ canBack="false"
+ canCancel="false"
+ >
+
+ <Info
+ helpText="Congratulations"
+ >
+ </Info>
+
+
+ <Info
+ helpText="The wizard successfully configured the basic networking services of your server."
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="error_need_root"
+ comment="Error: this wizard must run as root."
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ nextButtonText="OK"
+ executionLevel="NORMAL"
+ nextFinish="true"
+ canBack="false"
+ canCancel="false"
+ >
+
+ <Info
+ helpText="This Wizard needs to run as root"
+ >
+ </Info>
+ </Page>
+
+ <Page
+ name="error_in_hostname"
+ comment="Error message for an incorrect hostname"
+ helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-basics.html"
+ jumpPage="load_hostname_value"
+ nextButtonText="Fix it"
+ executionLevel="NORMAL"
+ nextFinish="false"
+ canBack="true"
+ canCancel="true"
+ >
+
+ <Info
+ helpText="The host name is not correct"
+ >
+ </Info>
+ </Page>
+
+</Wizard>