summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Wizard.dtd118
-rwxr-xr-xclient_wizard/Bind_client.pm6
-rw-r--r--client_wizard/client.wiz368
-rw-r--r--client_wizard/scripts/Clientconf.pm116
-rwxr-xr-xclient_wizard/scripts/do_it_client.sh80
-rw-r--r--common/IFCFG.pm4
-rw-r--r--common/Varspaceval.pm8
-rw-r--r--common/Wizcommon.pm6
-rw-r--r--common/scripts/DrakconnectConf.pm71
-rw-r--r--common/scripts/IFCFG.pm88
-rwxr-xr-xcommon/scripts/Vareqval.pm89
-rw-r--r--common/scripts/Varspaceval.pm88
-rwxr-xr-xcommon/scripts/check.sh64
-rwxr-xr-xcommon/scripts/check_root.sh51
-rwxr-xr-xcommon/scripts/functions.sh534
-rw-r--r--common/scripts/test.pl12
-rwxr-xr-xdhcp_wizard/Dhcp.pm11
-rw-r--r--dhcp_wizard/dhcp.wiz324
-rw-r--r--dhcp_wizard/scripts/Dhcpconf.pm158
-rwxr-xr-xdhcp_wizard/scripts/do_it_dhcp.sh124
-rw-r--r--dns_wizard/dns.wiz288
-rw-r--r--dns_wizard/scripts/Dnsconf.pm174
-rwxr-xr-xdrakwizard.pl4
-rwxr-xr-xftp_wizard/Proftpd.pm4
-rw-r--r--ftp_wizard/ftp.wiz229
-rw-r--r--ftp_wizard/scripts/ProFtpconf.pm163
-rwxr-xr-xnews_wizard/Inn.pm4
-rw-r--r--news_wizard/news.wiz283
-rw-r--r--news_wizard/scripts/Newsconf.pm77
-rwxr-xr-xpostfix_wizard/Postfix.pm6
-rw-r--r--postfix_wizard/postfix.wiz323
-rwxr-xr-xproxy_wizard/Squid.pm6
-rw-r--r--proxy_wizard/proxy.wiz758
-rw-r--r--proxy_wizard/scripts/Squidconf.pm121
-rwxr-xr-xsamba_wizard/Samba.pm7
-rw-r--r--samba_wizard/samba.wiz778
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm339
-rw-r--r--time_wizard/scripts/NTPConf.pm70
-rwxr-xr-xtime_wizard/scripts/compute_liste.sh36
-rw-r--r--time_wizard/time.wiz647
-rwxr-xr-xweb_wizard/Apache.pm6
-rw-r--r--web_wizard/apache2.wiz379
-rw-r--r--web_wizard/scripts/Apache2conf.pm120
-rw-r--r--web_wizard/scripts/Webconf.pm119
-rwxr-xr-xweb_wizard/scripts/mytest.pl28
-rw-r--r--web_wizard/web.wiz379
46 files changed, 47 insertions, 7621 deletions
diff --git a/Wizard.dtd b/Wizard.dtd
deleted file mode 100644
index 4121cdf5..00000000
--- a/Wizard.dtd
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml encoding="US-ASCII"?>
-
-<!ENTITY % fontStyles "(bold | plain | italic)" >
-<!ENTITY % boolean "(true | false)" >
-<!ENTITY % alignements "(Center | East | West | Fill | VFill)" >
-
-<!ELEMENT Boolean EMPTY>
-<!ATTLIST Boolean
- guiType ( checkbox | choice ) "checkbox"
- helpText CDATA #IMPLIED
- fontStyle %fontStyles; "plain"
- ratio CDATA #IMPLIED
- forceDisabled CDATA #IMPLIED
- name CDATA #IMPLIED
- forceEnabled CDATA #IMPLIED
- fontName CDATA "Default"
- fontSize CDATA "12"
- proportional CDATA "true"
- variableName CDATA #IMPLIED
->
-<!ELEMENT Chooser (Option*)>
-<!ATTLIST Chooser
- guiType (choice | list | checkbox) "choice"
- helpFontStyle %fontStyles; "plain"
- helpText CDATA #IMPLIED
- fontStyle %fontStyles; "plain"
- fillScript CDATA #IMPLIED
- ratio CDATA #IMPLIED
- helpFontName CDATA "Default"
- helpFontSize CDATA "12"
- name CDATA #IMPLIED
- alignement %alignements; "Center"
- defaultOptionScript CDATA #IMPLIED
- fontName CDATA "Default"
- fontSize CDATA #IMPLIED
- proportional %boolean; "true"
- editable %boolean; "true"
- variableName CDATA #IMPLIED
->
-<!ELEMENT Freetext EMPTY>
-<!ATTLIST Freetext
- guiType (textfield | textarea) "textfield"
- variableName CDATA #IMPLIED
- helpText CDATA #IMPLIED
- fontStyle %fontStyles; "plain"
- fillScript CDATA #IMPLIED
- name CDATA #IMPLIED
- alignement %alignements; "Center"
- ratio CDATA #IMPLIED
- length CDATA #IMPLIED
- proportional %boolean; "true"
- editable %boolean; "true"
- fontName CDATA "Default"
- fontSize CDATA #IMPLIED
->
-<!ELEMENT Info EMPTY>
-<!ATTLIST Info
- fontName CDATA "Default"
- fontSize CDATA #IMPLIED
- guiType CDATA "label"
- helpText CDATA #IMPLIED
- fontStyle %fontStyles; "plain"
- alignement %alignements; "Center"
- name CDATA #IMPLIED
->
-<!ELEMENT Option EMPTY>
-<!ATTLIST Option
- value CDATA #IMPLIED
- description CDATA #IMPLIED
->
-<!ELEMENT Page (Target*, (Info* | Freetext* | Boolean* | TDLine* | Chooser*)*)>
-<!ATTLIST Page
- jumpScript CDATA #IMPLIED
- executionLevel (AUTO | NORMAL | SHORT | DETAILED | DEBUG) "NORMAL"
- canCancel %boolean; "true"
- helpURL CDATA #IMPLIED
- comment CDATA #IMPLIED
- canBack %boolean; "true"
- subWizard CDATA #IMPLIED
- nextButtonText CDATA #IMPLIED
- image CDATA #IMPLIED
- name CDATA #IMPLIED
- nextFinish %boolean; "false"
- jumpPage CDATA #IMPLIED
->
-<!ELEMENT TDline EMPTY>
-<!ATTLIST TDline
- name CDATA #IMPLIED
->
-<!ELEMENT Target EMPTY>
-<!ATTLIST Target
- targetName CDATA #IMPLIED
- jumpIndex CDATA #IMPLIED
->
-<!ELEMENT Variable EMPTY>
-<!ATTLIST Variable
- persistent %boolean; "true"
- shellVariable CDATA #IMPLIED
- key %boolean; #IMPLIED
- dbPosition CDATA #IMPLIED
- comment CDATA #IMPLIED
- defaultValue CDATA #IMPLIED
- name CDATA #IMPLIED
->
-<!ELEMENT Wizard (Variable*,Page+)>
-<!ATTLIST Wizard
- referenceLength CDATA #IMPLIED
- libScript CDATA #IMPLIED
- width CDATA #IMPLIED
- height CDATA #IMPLIED
- referenceHeight CDATA #IMPLIED
- hasDb CDATA #IMPLIED
- defaultImage CDATA #IMPLIED
- dbPositions CDATA #IMPLIED
- dbFilename CDATA #IMPLIED
- name CDATA #IMPLIED
- wizardTitle CDATA #IMPLIED
->
diff --git a/client_wizard/Bind_client.pm b/client_wizard/Bind_client.pm
index 9bf84eaa..b7d065a9 100755
--- a/client_wizard/Bind_client.pm
+++ b/client_wizard/Bind_client.pm
@@ -2,8 +2,10 @@
# Drakwizard
-# Copyright (C) 2002 Arnaud Desmons <adesmons@mandrakesoft.com>
-# 2003 Florent Villard <warly@mandrakesoft.com>
+# Copyright (C) 2002,2003 Mandrakesoft
+#
+# Authors: Arnaud Desmons <adesmons@mandrakesoft.com>
+# Florent Villard <warly@mandrakesoft.com>
#
# 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
diff --git a/client_wizard/client.wiz b/client_wizard/client.wiz
deleted file mode 100644
index e0695bce..00000000
--- a/client_wizard/client.wiz
+++ /dev/null
@@ -1,368 +0,0 @@
-<?xml version="1.0"?>
-
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="DNS Wizard (add client)"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/client_wizard/images/DNS.png"
- perlModule="__WIZ_HOME__/client_wizard/scripts/Clientconf.pm"
- rpm="bind"
->
-
- <Variable
- name="wiz_client_ip"
- shellVariable="wiz_client_ip"
- >
- </Variable>
-
- <Variable
- name="wiz_client_name"
- shellVariable="wiz_client_name"
- >
- </Variable>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz.html"
- name="Welcome"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- func="check"
- >
-
- <Target
- targetName="CLIENT"
- jumpIndex="0"
- >
- </Target>
-
- <Target
- targetName="error_need_root"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="error_dhcp"
- jumpIndex="2"
- >
- </Target>
-
- <Info
- helpText="DNS Client Wizard"
- >
- </Info>
-
-
- <Info
- helpText="A client of your local network is a machine connected to the network having its own name and IP number."
- >
- </Info>
-
-
- <Info
- helpText="This wizard will help you in adding a new client in your local DNS."
- >
- </Info>
-
- <Info
- helpText="The server will use the informations you enter here to make the name of the client available to other machines into your network."
- >
- </Info>
-
- <Info
- helpText="Press next to begin, or Cancel to leave this wizard."
- >
- </Info>
- </Page>
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="error_dhcp"
- jumpPage="CLIENT"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Warning\nYou are in dhcp, server may not work with your configuration."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz.html"
- name="CLIENT"
- func="test"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="doit"
- jumpIndex="10"
- >
- </Target>
-
- <Target
- targetName="Error"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="warning"
- jumpIndex="2"
- >
- </Target>
-
- <Info
- helpText="Client identification:"
- >
- </Info>
-
-
- <Info
- helpText="Your client on the network will be identified by name, as in clientname.company.net. Every machine on the network must have a (unique) IP address, in the usual dotted syntax."
- >
- </Info>
-
- <Info
- helpText="(you don't need to type the domain after the name)"
- >
- </Info>
-
-
- <Freetext
- name="wiz_client_name"
- variableName="wiz_client_name"
- helpText="Name of the machine:"
- fillfunc="name"
- editable="true"
- >
- </Freetext>
-
- <Freetext
- name="wiz_client_ip"
- variableName="wiz_client_ip"
- helpText="IP number of the machine:"
- fillfunc="ip"
- editable="true"
- >
- </Freetext>
-
-
- <Info
- helpText="Note that the given IP number and client name should be unique in the network."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz.html"
- name="warning"
- jumpPage="doit"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Warning:"
- >
- </Info>
-
-
- <Info
- helpText="You have entered a machine name or an IP number already used."
- >
- </Info>
-
- <Info
- helpText="Press next if you want to change the already existing value, or back to correct your choice."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz.html"
- name="Error"
- jumpPage="CLIENT"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
-
- <Info
- helpText="This is not a valid address... press next to continue"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz.html"
- name="error_need_net"
- subWizard="__WIZ_HOME__/server_wizard/server.wiz"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="false"
- canCancel="true"
- >
-
- <Info
- helpText="Network not configured yet"
- >
- </Info>
-
-
- <Info
- helpText="You have to configure the basic network parameters before launching this wizard."
- >
- </Info>
-
- <Info
- helpText="Press next to configure these parameters now, or Cancel to exit this wizard."
- >
- </Info>
-
-
- <Info
- helpText="If you choose to configure now, you will automatically continue with the Client configuration"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz.html"
- name="server launcher"
- jumpPage="CLIENT"
- executionLevel="DEBUG"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz.html"
- name="doit"
- func="do_it"
- nextButtonText="Configure"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="done"
- jumpIndex="10"
- >
- </Target>
-
- <Target
- targetName="system_error"
- jumpIndex="1"
- >
- </Target>
-
- <Info
- helpText="Adding a new client to your network"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters
-needed to add a client to your network:"
- >
- </Info>
-
-
- <Freetext
- name="wiz_client_name"
- variableName="wiz_client_name"
- helpText="Client name"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="wiz_client_ip"
- variableName="wiz_client_ip"
- helpText="Client IP:"
- editable="false"
- >
- </Freetext>
-
-
- <Info
- helpText="To accept these values, and add your client, click the Next button or use the Back button to correct them."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz.html"
- name="done"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Congratulations"
- >
- </Info>
-
-
- <Info
- helpText="The wizard successfully added the client."
- >
- </Info>
-
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz.html"
- name="error_need_root"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="true"
- >
-
- <Info
- helpText="You need to be root to run this wizard"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz.html"
- name="system_error"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="true"
- >
-
- <Info
- helpText="System error, no configuration done"
- >
- </Info>
- </Page>
-</Wizard>
diff --git a/client_wizard/scripts/Clientconf.pm b/client_wizard/scripts/Clientconf.pm
deleted file mode 100644
index b148cec8..00000000
--- a/client_wizard/scripts/Clientconf.pm
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/perl
-
-# Drakwizard
-
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons <adesmons@mandrakesoft.com>
-#
-# 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, or (at your option)
-# any later version.
-#
-# 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.
-
-package Clientconf;
-require "__WIZ_HOME__/common/scripts/Vareqval.pm";
-require "__WIZ_HOME__/common/scripts/IFCFG.pm";
-use MDK::Common;
-use strict;
-use standalone;
-
-my $o = IFCFG->new();
-my $wiz_domain_name = $o->network_get("DOMAINNAME");
-my $wiz_ip_server = $o->itf_get("IPADDR");
-
-sub name {
- $o->network_get("HOSTNAME");
-}
-
-sub ip {
- $wiz_ip_server;
-}
-
-sub check {
- $> and return 1;
- $o->is_dhcp() and return 2;
- 0;
-}
-
-sub get_root {
- my $file = "/etc/sysconfig/named";
- if (-f $file) {
- my %mdk = Vareqval->get($file);
- return $mdk{ROOTDIR};
- }
- "";
-}
-
-sub up_serial {
- my ($file) = @_;
-
- my (undef, undef, undef, $mday, $mon, $year) = gmtime(time);
- $year += 1900;
- my $serial_nbm = sprintf "%4dY%2dm%2d00", $year, $mon, $mday;
- output($file, map {
- my $line = $_;
- if (/^(\s*)(\d*)(\s*;\s*Serial.*)$/) {
- my $serial_f = $2;
- $serial_f++;
- if ($serial_f <= $serial_nbm) {
- $serial_f = $serial_nbm;
- chomp($serial_f);
- $line = "$1$serial_f$3\n";
- }
- }
- $line;
- } cat_($file));
-}
-
-sub test {
- !$ENV{wiz_client_name} and return 1;
- !$ENV{wiz_client_ip} and return 1;
- my $s_trunc = "$1.$2.$3" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $ds = "$4" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $dc = "$4" if $ENV{wiz_client_ip} =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $sc_trunc = "$1.$2.$3" if $ENV{wiz_client_ip} =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- !$sc_trunc and return 1;
- !$dc and return 1;
- !$ds and return 1;
- !$s_trunc and return 1;
- ($s_trunc != $sc_trunc) and return 1;
- ($dc == $ds || $dc < 0 || $dc > 255) and return 1;
- 10;
-}
-
-sub do_it {
- my $date = `date`;
- chomp($date);
- 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 $s_trunc = "$1.$2.$3" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $ds = "$4" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $dc = "$4" if $ENV{wiz_client_ip} =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
-
- my $file="/var/named/$wiz_domain_name.db";
- MDK::Common::cp_af($file, $file.".orig");
- open(NEW, ">> $file") or die "can not open $file";
- print NEW "\n$ENV{wiz_client_name} IN A $ENV{wiz_client_ip} ; $date";
- close(NEW) or die "can not close $file";
- up_serial($file);
-
- my $file="/var/named/$s_trunc.rev";
- MDK::Common::cp_af($file, $file.".orig");
- open(NEW, ">> $file") or die "can not open $file";
- print NEW "\n$dc IN PTR $ENV{wiz_client_name}. ; $date";
- close(NEW) or die "can not close $file";
- up_serial($file);
- system("/etc/rc.d/init.d/named restart");
- 10;
-}
-1;
diff --git a/client_wizard/scripts/do_it_client.sh b/client_wizard/scripts/do_it_client.sh
deleted file mode 100755
index 4a2ec587..00000000
--- a/client_wizard/scripts/do_it_client.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/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
-
-echo_debug "in $0"
-
-wiz_ip_net=`get_var wiz_ip_net`
-wiz_ip_server=`get_var wiz_ip_server`
-wiz_domain_name=`get_var wiz_domain_name`
-s_trunc=${wiz_ip_net%.*}
-ds=${wiz_ip_server##*.}
-sc_trunc=${wiz_client_ip%.*}
-dc=${wiz_client_ip##*.}
-
-wiz_client_name=${wiz_client_name%%.*}
-
-# change serial number
-# $1 : file
-up_serial(){
-TMPFILE=`mktemp /tmp/temp.XXXXXX` || exit 1
-cat $1 > ${TMPFILE}
-serial_nbm=$(date "+%Y%m%d00")
-serial_f=`sed -ne "s/^\([[:space:]]*\)\([0-9]*\)\([[:space:]]*;[[:space:]]*Serial.*$\)/\2/p" ${TMPFILE}`
-serial_f=$((${serial_f}+1))
-if [ ${serial_f} -le ${serial_nbm} ]; then
- serial_f=${serial_nbm}
-fi
-
-cat ${TMPFILE}\
-|sed -e "s/^\([[:space:]]*\)\([0-9]*\)\([[:space:]]*;[[:space:]]*Serial.*$\)/\1${serial_f}\3/"\
-> $1
-rm -f ${TMPFILE}
-}
-
-
-
-file="/var/named/${wiz_domain_name}.db"
-
-bck_file ${file}
-
-echo "${wiz_client_name} IN A ${wiz_client_ip} ; $(date)" >> ${file}
-
-up_serial ${file}
-
-
-
-file="/var/named/${s_trunc}.rev"
-
-bck_file ${file}
-
-echo "${dc} IN PTR ${wiz_client_name}. ; $(date)" >> ${file}
-
-up_serial ${file}
-
-
-/etc/rc.d/init.d/named restart
-
-# all seems to be ok
-exit 10
diff --git a/common/IFCFG.pm b/common/IFCFG.pm
index 81b7f0e5..24441494 100644
--- a/common/IFCFG.pm
+++ b/common/IFCFG.pm
@@ -2,7 +2,9 @@
# Interfaces Conf Parser
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons <adesmons@mandrakesoft.com>
+# Copyright (C) 2002,2003 Mandrakesoft
+#
+# Author: Arnaud Desmons <adesmons@mandrakesoft.com>
#
# 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
diff --git a/common/Varspaceval.pm b/common/Varspaceval.pm
index fd5500d1..2f087f03 100644
--- a/common/Varspaceval.pm
+++ b/common/Varspaceval.pm
@@ -1,8 +1,10 @@
#!/usr/bin/perl -w
-# Author Philippe Hétroy, phetroy@mandrakesoft.com
-# $Id: Varspaceval.pm,v 1.2 2003-08-22 21:29:12 warly Exp $
-
+# Copyright (C) 2002,2003 Mandrakesoft
+#
+# Author: Philippe Hétroy, phetroy@mandrakesoft.com
+#
+# $Id: Varspaceval.pm,v 1.3 2003-10-20 10:51:59 warly Exp $
# Module for loding and committing informations in a VAR = value file type
package MDK::Wizard::Varspaceval;
diff --git a/common/Wizcommon.pm b/common/Wizcommon.pm
index 6b7c172d..b06838eb 100644
--- a/common/Wizcommon.pm
+++ b/common/Wizcommon.pm
@@ -1,8 +1,8 @@
#!/usr/bin/perl
-# Interfaces Conf Parser
-
-# Copyright (C) 2003 Florent Villard <warly@mandrakesoft.com>
+# Copyright (C) 2003 Mandrakesoft
+#
+# Author: Florent Villard <warly@mandrakesoft.com>
#
# 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
diff --git a/common/scripts/DrakconnectConf.pm b/common/scripts/DrakconnectConf.pm
deleted file mode 100644
index a1b4fbf8..00000000
--- a/common/scripts/DrakconnectConf.pm
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/perl
-
-# Drakconnect Conf Parser
-
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons <adesmons@mandrakesoft.com>
-#
-# 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, or (at your option)
-# any later version.
-#
-# 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.
-
-package DrakconnectConf;
-require "__WIZ_HOME__/common/scripts/Vareqval.pm";
-use strict;
-
-my $file = "/etc/sysconfig/network-scripts/drakconnect_conf";
-!-f $file and die "no such $file";
-sub new {
- my $self = {};
-
- my %mdk = Vareqval->get($file);
- $self->{mdk} = \%mdk;
- foreach (keys %{$self->{mdk}}) {
- if (/.*(Eth\d)Known.*/) {
- my $device = $1;
- $self->{mdk}{$_} =~ /.*true.*/ and $self->{device} = $device;
- }
- }
- !$self->{device} and return -1;
- bless $self;
-}
-
-sub get_device {
- my $self = shift;
-
- $self->{device};
-}
-
-sub is_dhcp {
- my $self = shift;
-
- $self->get_from_known_dev("BootProto") =~ /.*dhcp.*/;
-}
-
-sub get {
- my $self = shift;
- my $key = shift;
-
- exists $self->{mdk}->{$key} or die "no $key field in $file";
- $self->{mdk}->{$key};
-}
-
-sub get_from_known_dev {
- my $self = shift;
- my $arg = shift;
-
- my $device = $self->{device};
- exists $self->{mdk}{$device.$arg} or die "no $arg for $device in $file";
- $self->{mdk}{$device.$arg};
-}
-
-10;
diff --git a/common/scripts/IFCFG.pm b/common/scripts/IFCFG.pm
deleted file mode 100644
index e86128d1..00000000
--- a/common/scripts/IFCFG.pm
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/perl
-
-# Interfaces Conf Parser
-
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons <adesmons@mandrakesoft.com>
-#
-# 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, or (at your option)
-# any later version.
-#
-# 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.
-
-package IFCFG;
-use strict;
-use lib qw(/usr/lib/libDrakX);
-use Data::Dumper;
-use MDK::Common;
-use network::network;
-
-#my $file = "/etc/sysconfig/network-scripts/drakconnect_conf";
-#!-f $file and die "no such $file";
-sub new {
- my $self = {};
-
- $ENV{PATH} = "";
- my $ifconfig = `LC_ALL=C /sbin/ifconfig -a`;
- my $device = 'NONE';
- my @interfaces;
- foreach (split('\n', $ifconfig)) {
- my ($temp) = /(^eth[0-9]*:?[0-9]*).*/;
- $device = $temp if defined $temp;
- my ($ip, $bcast, $netmask) = /\s*inet addr:([0-9\.]*)\s*Bcast:([0-9\.]*)\s*Mask:([0-9\.]*).*/;
- if (defined $ip && defined $bcast && defined $netmask) {
- $self->{itf}{$device} = {IPADDR => $ip, BROADCAST => $bcast, NETMASK => $netmask};
- my %conf = getVarsFromSh("/etc/sysconfig/network-scripts/ifcfg-$device");
- $self->{itf}{$device}{$_} = $conf{$_} foreach ('BOOTPROTO');
- }
- }
- %{$self->{network}} = getVarsFromSh("/etc/sysconfig/network");
- my $r = read_resolv_conf();
- foreach my $k (keys %$r) {
- $self->{network}{$k} ||= $r->{$k}
- }
- $self->{network}{HOSTNAME} ||= `/bin/hostname` and chomp $self->{network}{HOSTNAME};
- ($self->{network}{DOMAINNAME}) = $self->{network}{HOSTNAME} =~ /\.(.*)/;
- $self->{network}{DOMAINNAME} ||= `/bin/dnsdomainname` and chomp $self->{network}{DOMAINNAME};
- bless $self;
-}
-
-sub is_dhcp {
- my $self = shift;
- my ($itf) = @_;
-
- $itf ||= default_itf();
- $self->{itf}{$itf}{BOOTPROTO} eq 'dhcp';
-}
-
-#- TODO : return the main interface
-sub default_itf {
- "eth0";
-}
-
-sub itf_get {
- my $self = shift;
- my ($key, $itf) = @_;
-
- $itf ||= default_itf;
- exists $self->{itf}{$itf}{$key} or die "no $key field in $itf hash";
- $self->{itf}{$itf}{$key}
-}
-
-sub network_get {
- my $self = shift;
- my ($key) = @_;
-
- exists $self->{network}{$key} or die "no $key field in network hash";
- $self->{network}{$key};
-}
-
-10;
diff --git a/common/scripts/Vareqval.pm b/common/scripts/Vareqval.pm
deleted file mode 100755
index 110ad4ec..00000000
--- a/common/scripts/Vareqval.pm
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/perl -w
-
-# Author Philippe Hétroy, phetroy@mandrakesoft.com
-# $Id: Vareqval.pm,v 1.3 2002-09-03 15:11:43 adesmons Exp $
-
-# Module for loding and committing informations in a VAR = value file type
-
-package Vareqval;
-use lib('./');
-use strict;
-use Data::Dumper;
-
-
-# Get all useful content of the config file
-# Return a hash containg the key and the value
-# ATTENTION : in the conf file, an empty value is returnes as a spaced value (mandatory because of XML compatibility)
-sub get {
- my $self = shift;
- my $file = shift;
- my %l;
- local *F; open F, $file or return;
- local $_;
-
- while (<F>) {
-
- my ($v, $val, $val2) =
- /^\s* # leading space
- (\w+)\s*=\s* # variable
- (
- "(.*)" # double-quoted text
- | '(.*)' # single-quoted text
- | [^'"\s]* # normal text
- )
- \s*$ # end of line
- /x;
- no warnings;
- next if (!defined $v || $v eq "");
- $l{$v} = defined $val2 ? $val2 : $val;
- }
-
- %l;
-}
-
-# Commits changes in conf files and ifconfig
-sub commit {
- my $self = shift;
- my ($file, $hash) = @_;
- local *F;
-
- my $output = "";
- if (open(F, $file)) {
- local $_;
-
- while (<F>) {
- my ($pre, $key, $eq, $val, $rest) = /(^\s*)(\w+)(\s*=\s*"*'*)([^'"\s]*)(.*)/x;
-
- if (!defined $key) {
- $output .= $_;
- next;
- };
- next if (!exists $hash->{$key}); #Elt has been removed
- no warnings;
- $val = $hash->{$key};
- delete $hash->{$key};
- $output .= defined $val ? $pre . $key . $eq . $val . $rest . "\n" : $pre . $key . $eq . $val . $rest;
-# $output .= $pre . $key . $eq . $val . $rest . "\n";
- }
- #appending added parameters
- foreach (keys %$hash) {
- $output .= $_ . "=" . $hash->{$_} . "\n";
- }
-
- } else { #the file does not exist
- print STDERR "File $file will be created\n";
- foreach (keys %$hash) {
- $output .= defined $hash->{$_} ? $_ . "=" . $hash->{$_} . "\n" : $_ . "=\n";
- }
- }
-
-#print $output;
-#print "\n------------------\n";
-
- # outputing the new conf
- open(F, "> $file") or return;
- print F $output;
- close(F);
-}
-
-1;
diff --git a/common/scripts/Varspaceval.pm b/common/scripts/Varspaceval.pm
deleted file mode 100644
index 7e385d8a..00000000
--- a/common/scripts/Varspaceval.pm
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/perl -w
-
-# Author Philippe Hétroy, phetroy@mandrakesoft.com
-# $Id: Varspaceval.pm,v 1.1 2002-07-26 09:19:56 adesmons Exp $
-
-# Module for loding and committing informations in a VAR = value file type
-
-package Varspaceval;
-use lib('./');
-use strict;
-use Data::Dumper;
-
-
-# Get all useful content of the config file
-# Return a hash containg the key and the value
-# ATTENTION : in the conf file, an empty value is returnes as a spaced value (mandatory because of XML compatibility)
-sub get {
- my $self = shift;
- my $file = shift;
- my %l;
- local *F; open F, $file or return;
- local $_;
-
- while (<F>) {
-
- my ($v, $val, $val2) =
- /^\s* # leading space
- (\w+)\s* # variable
- (
- "(.*)" # double-quoted text
- | '(.*)' # single-quoted text
- | [^'"\s]* # normal text
- )
- \s*$ # end of line
- /x;
- no warnings;
- $l{$v} = defined $val2 ? $val2 : $val;
- }
-
- %l;
-}
-
-# Commits changes in conf files and ifconfig
-sub commit {
- my $self = shift;
- my ($file, $hash) = @_;
- local *F;
-
- my $output = "";
- if (open(F, $file)) {
- local $_;
-
- while (<F>) {
- my ($pre, $key, $eq, $val, $rest) = /(^\s*)(\w+)(\s*"*'*)([^'"\s]*)(.*)/x;
-
- if (!defined $key) {
- $output .= $_;
- next;
- };
- next if (!exists $hash->{$key}); #Elt has been removed
- no warnings;
- $val = $hash->{$key};
- delete $hash->{$key};
- $output .= defined $val ? $pre . $key . $eq . $val . $rest . "\n" : $pre . $key . $eq . $val . $rest;
-# $output .= $pre . $key . $eq . $val . $rest . "\n";
- }
- #appending added parameters
- foreach (keys %$hash) {
- $output .= $_ . " " . $hash->{$_} . "\n";
- }
-
- } else { #the file does not exist
- print STDERR "File $file will be created\n";
- foreach (keys %$hash) {
- $output .= defined $hash->{$_} ? $_ . "=" . $hash->{$_} . "\n" : $_ . "=\n";
- }
- }
-
-#print $output;
-#print "\n------------------\n";
-
- # outputing the new conf
- open(F, "> $file") or return;
- print F $output;
- close(F);
-}
-
-1;
diff --git a/common/scripts/check.sh b/common/scripts/check.sh
deleted file mode 100755
index 1a96052e..00000000
--- a/common/scripts/check.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/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 configuration
-#
-# $1, $2, ... : root wiz_ip_net wiz_...
-#
-# exit 0 if all is ok, else exit nb , where nb is the arg number that fails
-
-typeset -i cpt
-cpt=0
-
-for test in $@ ; do
-
- cpt=$cpt+1
-
- case "$test" in
-
- root)
- if [ ! -z "${_WIZ_DO_AS_ROOT}" ]; then
- echo_debug "Emulating Root login , no problem"
- else
- if [ `id|sed 's/^uid=\([0-9]*\)[^0-9]*.*$/\1/'` -ne 0 ]; then
- echo_debug "need to be root, exit $cpt"
- exit $cpt
- fi
- fi
- ;;
- *)
- ret=`get_var ${test}`
- if [ -z "$ret" ]; then
- echo_debug "no value for $test , exit $cpt"
- exit $cpt
- fi
- ;;
- esac
-
-done
-
-# all seems to be ok
-exit 0
-
diff --git a/common/scripts/check_root.sh b/common/scripts/check_root.sh
deleted file mode 100755
index 98ae2839..00000000
--- a/common/scripts/check_root.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/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
-#
-# are we root ?
-
-if [ ! -z "${_WIZ_DO_AS_ROOT}" ]; then
- echo_debug "Emulating Root login"
- exit 10
-fi
-
-if [ `id|sed 's/^uid=\([0-9]*\)[^0-9]*.*$/\1/'` -ne 0 ]; then
- echo_debug "need to be root"
- exit 1
-fi
-
-file=/etc/sysconfig/system
-if [ ! -f ${file} ]; then
- echo_debug "no ${file} ... not Mandrake system"
- exit 1
-fi
-
-
-
-
-# all seems to be ok
-exit 10
-
diff --git a/common/scripts/functions.sh b/common/scripts/functions.sh
deleted file mode 100755
index deca8a0a..00000000
--- a/common/scripts/functions.sh
+++ /dev/null
@@ -1,534 +0,0 @@
-#!/bin/bash
-#
-# Wizard
-#
-# Copyright (C) 2000,2001 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
-
-# include for a few functions used in various scripts
-#
-# - this should be loaded at the beginning of every wizard -
-# (wiz load it for you)
-
-
-#[ "${wiz_loaded_function}" = "yes" ] && return 0
-
-
-# assume not multi line values
-#(sed -e :a -e '/\\$/N; s/\\\n//; ta')
-#debug function
-# $1 : message
-echo_debug () {
-([ -n "${DEBUG_VAL}" ] && echo $1 >> ${DEBUG_VAL})||:
-}
-
-
-# back up the specified file
-bck_file(){
-# $1 file
-fic=$1
-if [ -f ${fic} ]; then
- j=3
- for i in 2 1 ; do
- [ -f ${fic}.mdk_orig.$i ] && mv -f ${fic}.mdk_orig.$i ${fic}.mdk_orig.$j
- j=$i
- done
- cp -f ${fic} ${fic}.mdk_orig.1
-fi
-}
-
-
-rm_val(){
- grep -v -E "^[[:space:]]*$1[[:space:]]*="
-}
-
-
-# retrive a value from config file
-get_val(){
-# $1 : config file
-# $2 : variable
-if [ ! -f "${1}" -o -z "$2" ]; then
- return 1
-fi
-sed -n "s£^[[:space:]]*$2[[:space:]]*=[[:space:]]*\(.*\)[[:space:]]*$£\1£p" $1 2>/dev/null\
-|sed 's£^\"\(.*\)\"$£\1£'
-}
-
-# retrive a value from config file, other version without "="
-get_val2(){
-# $1 : config file
-# $2 : variable
-if [ ! -f "${1}" -o -z "$2" ]; then
- return 1
-fi
-sed -n "s£^[[:space:]]*$2[[:space:]]\+\(.*\)[[:space:]]*$£\1£p" $1 2>/dev/null\
-|sed 's£^\"\(.*\)\"$£\1£'
-}
-
-
-
-comment_val(){
-sed "s/^[[:space:]]*$1[[:space:]]*=.*$/#&/"
-}
-
-
-mod_val(){
-sed -e '\£^[[:space:]]*'"$1"'[[:space:]]*=.*$£{
-i \
-# removed by mdk_serv script on '"$(date)"'
-s££#&£
-a \
-'"$1=\"$2\""'
-}
-'
-}
-
-mod_val2(){
-# same as chg_val, but without "=" symbol neither ""
-sed -e '\£^[[:space:]]*'"$1"'[[:space:]]\+.*$£{
-i \
-# removed by mdk_serv script on '"$(date)"'
-s££#&£
-a \
-'"$1 $2"'
-}
-'
-}
-
-
-chg_val(){
-# $1 : config file
-# $2 : variable
-# $3 : new value
-# $4 : "s" : silent mode
-
-[ -f "$1" ] || exit 1
-
-#if [ -n "`grep -E \"^\[\[:space:\]\]*$2\[\[:space:\]\]*=\" \"$1\"`" ]; then
-
-t=`grep -c -E "^[[:space:]]*$2[[:space:]]*=" $1`
-
-if [ $t -ge 1 ]; then
- TMPFILE=`mktemp /tmp/temp.XXXXXX` || exit 1
- cat "$1" > ${TMPFILE}
- (cat ${TMPFILE}|mod_val "$2" "$3" > "$1") && rm -f ${TMPFILE}
-else
- if [ "$4" = "s" ]; then
- echo -e "\
-$2=\"$3\"\n\
-" >> "$1"
- else
- echo -e "\
-# added by mdk_serv script on $(date)\n\
-$2=\"$3\"\n\
-" >> "$1"
- fi
-fi
-}
-
-chg_val2(){
-# same as chg_val, but without "=" symbol neither ""
-
-# $1 : config file
-# $2 : variable
-# $3 : new value
-# $4 : "s" : silent mode
-
-[ -f "$1" ] || exit 1
-
-t=`grep -c -E "^[[:space:]]*$2[[:space:]]+" $1`
-if [ $t -ge 1 ]; then
- TMPFILE=`mktemp /tmp/temp.XXXXXX` || exit 1
- cat "$1" > ${TMPFILE}
- (cat ${TMPFILE}|mod_val2 "$2" "$3" > "$1") && rm -f ${TMPFILE}
-else
- if [ "$4" = "s" ]; then
- echo -e "\
-$2 $3\n\
-" >> "$1"
- else
- echo -e "\
-# added by mdk_serv script on $(date)\n\
-$2 $3\n\
-" >> "$1"
- fi
-fi
-}
-
-
-# get_var $1 : function to retrieve stored value of wiz_variables
-# - if $2 is provided, returns $2 (ok, it's a hack)
-# - if the stored value is empty, returns the current one (in memory)
-# - this function may return a null string if value is really not found -
-get_var(){
-# $1 : name of the variable
-# $2 : forcing value
-
-[ -z "$1" ] && return 1
-
-if [ -n "$2" ]; then
- echo "$2"
- return 0
-fi
-
-file=/etc/sysconfig/mdk_serv
-
-case "$1" in
- wiz_host_name)
- t=`get_val ${file} wiz_host_name`
- if [ -z "$t" ]; then
- echo ${wiz_host_name}
- else
- echo "$t"
- fi
- ;;
- wiz_domain_name)
- t=`get_val ${file} wiz_domain_name`
- if [ -z "$t" ]; then
- echo ${wiz_domain_name}
- else
- echo "$t"
- fi
- ;;
- wiz_device)
- t=`get_val ${file} wiz_device`
- if [ -z "$t" ]; then
- echo ${wiz_device}
- else
- echo "$t"
- fi
- ;;
- wiz_ext_dns1)
- t=`get_val ${file} wiz_ext_dns1`
- if [ -z "$t" ]; then
- echo ${wiz_ext_dns1}
- else
- echo "$t"
- fi
- ;;
- wiz_ext_dns2)
- t=`get_val ${file} wiz_ext_dns2`
- if [ -z "$t" ]; then
- echo ${wiz_ext_dns2}
- else
- echo "$t"
- fi
- ;;
- wiz_web_internal)
- t=`get_val ${file} wiz_web_internal`
- if [ -z "$t" ]; then
- echo ${wiz_web_internal}
- else
- echo "$t"
- fi
- ;;
- wiz_web_external)
- t=`get_val ${file} wiz_web_external`
- if [ -z "$t" ]; then
- echo ${wiz_web_external}
- else
- echo "$t"
- fi
- ;;
- wiz_ftp_internal)
- t=`get_val ${file} wiz_ftp_internal`
- if [ -z "$t" ]; then
- echo ${wiz_ftp_internal}
- else
- echo "$t"
- fi
- ;;
- wiz_ftp_external)
- t=`get_val ${file} wiz_ftp_external`
- if [ -z "$t" ]; then
- echo ${wiz_ftp_external}
- else
- echo "$t"
- fi
- ;;
- wiz_news_freq)
- t=`get_val ${file} wiz_news_freq`
- if [ -z "$t" ]; then
- echo ${wiz_news_freq}
- else
- echo "$t"
- fi
- ;;
- wiz_news_server)
- t=`get_val ${file} wiz_news_server`
- if [ -z "$t" ]; then
- echo ${wiz_news_server}
- else
- echo "$t"
- fi
- ;;
- wiz_banner)
- t=`get_val ${file} wiz_banner`
- if [ -z "$t" ]; then
- echo ${wiz_banner}
- else
- echo "$t"
- fi
- ;;
- wiz_workgroup)
- t=`get_val ${file} wiz_workgroup`
- if [ -z "$t" ]; then
- echo ${wiz_workgroup}
- else
- echo "$t"
- fi
- ;;
- wiz_do_printer_sharing)
- t=`get_val ${file} wiz_do_printer_sharing`
- if [ -z "$t" ]; then
- echo ${wiz_do_printer_sharing}
- else
- echo "$t"
- fi
- ;;
- wiz_do_file_sharing)
- t=`get_val ${file} wiz_do_file_sharing`
- if [ -z "$t" ]; then
- echo ${wiz_do_file_sharing}
- else
- echo "$t"
- fi
- ;;
- wiz_ip_net)
- wdevice=`get_val ${file} wiz_device`
- nfile="/etc/sysconfig/network-scripts/ifcfg-${wdevice}"
- t=`get_val ${nfile} NETWORK`
- if [ -z "$t" ]; then
- echo ${wiz_ip_net}
- else
- echo "$t"
- fi
- ;;
- wiz_ip_netmask)
- wdevice=`get_val ${file} wiz_device`
- nfile="/etc/sysconfig/network-scripts/ifcfg-${wdevice}"
- t=`get_val ${nfile} NETMASK`
- if [ -z "$t" ]; then
- echo ${wiz_ip_netmask}
- else
- echo "$t"
- fi
- ;;
- wiz_ip_server)
- wdevice=`get_val ${file} wiz_device`
- nfile="/etc/sysconfig/network-scripts/ifcfg-${wdevice}"
- t=`get_val ${nfile} IPADDR`
- if [ -z "$t" ]; then
- echo ${wiz_ip_server}
- else
- echo "$t"
- fi
- ;;
- wiz_ip_range1)
- wdevice=`get_val ${file} wiz_device`
- nfile="/etc/sysconfig/network-scripts/ifcfg-${wdevice}"
- twnet=`get_val ${nfile} NETWORK`
- nfile=/etc/dhcpd.conf
- rnge=
- if [ -f ${nfile} ]; then
- rnge=`sed -n -e 's/^[[:space:]]*range[[:space:]]*\([1-9\.]*\)[[:space:]].*$/\1/p' ${nfile}`
- fi
- [ "${rnge%.*}" == "${twnet%.*}" ] || rnge=""
- if [ -z "$rnge" ]; then
- echo ${wiz_ip_range1}
- else
- echo "$rnge"
- fi
- ;;
- wiz_ip_range2)
- wdevice=`get_val ${file} wiz_device`
- nfile="/etc/sysconfig/network-scripts/ifcfg-${wdevice}"
- twnet=`get_val ${nfile} NETWORK`
- nfile=/etc/dhcpd.conf
- rnge=
- if [ -f ${nfile} ]; then
- rnge=`sed -n -e 's/^[[:space:]]*range[[:space:]]*[1-9\.]*[[:space:]]*\([1-9\.]*\)[^1-9\.].*$/\1/p' ${nfile}`
- fi
- [ "${rnge%.*}" == "${twnet%.*}" ] || rnge=""
- if [ -z "$rnge" ]; then
- echo ${wiz_ip_range2}
- else
- echo "$rnge"
- fi
- ;;
- wiz_ext_device)
- t=`get_val ${file} wiz_ext_device`
- if [ -z "$t" ]; then
- echo ${wiz_ext_device}
- else
- echo "$t"
- fi
- ;;
- wiz_extn_device)
- t=`get_val /etc/sysconfig/network GATEWAYDEV`
- if [ -z "$t" ]; then
- echo ${wiz_extn_device}
- else
- echo "$t"
- fi
- ;;
- wiz_extn_gateway)
- t=`get_val /etc/sysconfig/network GATEWAY`
- if [ -z "$t" ]; then
- echo ${wiz_extn_gateway}
- else
- echo "$t"
- fi
- ;;
- wiz_firewall_level)
- t=`get_val ${file} wiz_firewall_level`
- if [ -z "$t" ]; then
- echo ${wiz_firewall_level}
- else
- echo "$t"
- fi
- ;;
- wiz_ext_mail_relay)
- postconf -h relayhost
- ;;
- wiz_mail_masquerade)
- nfile=/etc/postfix/canonical
- wdname=`get_val ${file} wiz_domain_name`
- t=""
- if [ -f ${nfile} ]; then
- t=`sed -n -e 's/^[[:space:]]*@'"${wdname}"'[[:space:]]*@\([^[:space:]]*\)[[:space:]]*$/\1/p' ${nfile}`
- fi
- if [ -z "$t" -o -z "wdname" ]; then
- echo ${wiz_mail_masquerade}
- else
- echo "$t"
- fi
- ;;
- wiz_timezone)
- nfile=/etc/sysconfig/clock
- t=`get_val ${nfile} ZONE`
- if [ -z "$t" ]; then
- echo ${wiz_timezone}
- else
- echo "$t"
- fi
- ;;
- wiz_squid_port)
- nfile=/etc/squid/squid.conf
- t=`get_val2 ${nfile} http_port`
- if [ -z "$t" ]; then
- echo ${wiz_squid_port}
- else
- echo "$t"
- fi
- ;;
- wiz_squid_mem)
- nfile=/etc/squid/squid.conf
- t=`get_val2 ${nfile} cache_mem`
- if [ -z "$t" ]; then
- echo ${wiz_squid_mem}
- else
- t1=`echo $t|awk '{print $1}'`
- t2=`echo $t|awk '{print $2}'`
- if [ "$t2" == "MB" ]; then
- echo $t1
- else
- echo ${wiz_squid_mem}
- fi
- fi
- ;;
- wiz_squid_disk)
- nfile=/etc/squid/squid.conf
- # nota : only one dir : wiz_squid_defdir
- export wiz_squid_defdir=`get_var wiz_squid_defdir`
- t=`sed -n "s£^[[:space:]]*cache_dir[[:space:]]\+[a-z]\+[[:space:]]\+$wiz_squid_defdir[[:space:]]\+\([0-9]\+\)[[:space:]]*.*$£\1£p" $nfile 2>/dev/null`
- if [ -z "$t" ]; then
- echo ${wiz_squid_disk}
- else
- echo $t
- fi
- ;;
- wiz_squid_level)
- t=`get_val ${file} wiz_squid_level`
- if [ -z "$t" ]; then
- echo ${wiz_squid_level}
- else
- echo "$t"
- fi
- ;;
- wiz_squid_defdir)
- t=`get_val ${file} wiz_squid_defdir`
- if [ -z "$t" ]; then
- [ -z "${wiz_squid_defdir}" ] && wiz_squid_defdir="/var/spool/squid"
- echo ${wiz_squid_defdir}
- else
- echo "$t"
- fi
- ;;
- wiz_squid_mynetw)
- nfile=/etc/squid/squid.conf
- t=`get_val2 ${nfile} "acl mynetwork src"`
- if [ -z "$t" ]; then
- echo `get_var wiz_ip_net`"/"`get_var wiz_ip_netmask`
- else
- echo $t
- fi
- ;;
- wiz_squid_cachepeer)
- nfile=/etc/squid/squid.conf
- t=`get_val2 ${nfile} "cache_peer"`
- if [ -z "$t" ]; then
- echo ${wiz_squid_cachepeer}
- else
- echo $t|awk '{print $1}'
- fi
- ;;
- wiz_squid_peerport)
- nfile=/etc/squid/squid.conf
- t=`get_val2 ${nfile} "cache_peer"`
- if [ -z "$t" ]; then
- echo ${wiz_squid_peerport}
- else
- echo $t|awk '{print $3}'
- fi
- ;;
-
- *)
- return 1
- ;;
-esac
-}
-
-
-
-
-export -f echo_debug
-export -f rm_val
-export -f get_val
-export -f get_val2
-export -f mod_val
-export -f mod_val2
-export -f chg_val
-export -f chg_val2
-export -f bck_file
-
-export -f get_var
-#export wiz_loaded_function=yes
diff --git a/common/scripts/test.pl b/common/scripts/test.pl
deleted file mode 100644
index 5fbba3cb..00000000
--- a/common/scripts/test.pl
+++ /dev/null
@@ -1,12 +0,0 @@
-use lib qw(/usr/lib/libDrakX);
-package Dhcpconf;
-require "IFCFG.pm";
-#require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm";
-use MDK::Common;
-use strict;
-use standalone;
-
-my $o = IFCFG->new();
-print $o->is_dhcp() ? "toto\n" : "tata\n";
-print $o->itf_get("IPADDR");
-print $o->network_get("DOMAINNAME");
diff --git a/dhcp_wizard/Dhcp.pm b/dhcp_wizard/Dhcp.pm
index b38ba025..3bb73ef1 100755
--- a/dhcp_wizard/Dhcp.pm
+++ b/dhcp_wizard/Dhcp.pm
@@ -2,8 +2,10 @@
# Drakwizard
-# Copyright (C) 2002 Arnaud Desmons <adesmons@mandrakesoft.com>
-# 2003 Florent Villard <warly@mandrakesoft.com>
+# Copyright (C) 2002, 2003 Mandrakesoft
+#
+# Authors: Arnaud Desmons <adesmons@mandrakesoft.com>
+# Florent Villard <warly@mandrakesoft.com>
#
# 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
@@ -37,7 +39,8 @@ my $o = {
var => {
ip1 => '',
ip2 => '',
- interface => $wiz->{net}->default_itf()
+ wiz_authoritative => 0,
+ einterface => $wiz->{net}->default_itf()
},
needed_rpm => [ 'dhcp-server' ],
defaultimage => "$ENV{__WIZ_HOME__}dhcp_wizard/images/DHCP.png"
@@ -217,7 +220,7 @@ mask = $wiz_ip_netmask, rng1 = $wiz_ip_range1, rng2 = $wiz_ip_range2, dname = $w
$mdk{interfaces} = $wiz_device;
standalone::explanations("$file: lease_file = $mdk{lease_file}, interfaces = $mdk{interfaces}");
MDK::Wizard::Varspaceval->commit($file, \%mdk);
- !$ENV{wiz_authoritative} and output($file, map {
+ !$o-{var}{wiz_authoritative} and output($file, map {
s|^\s*not\s*authoritative.*|\#$&|i;
$_
} cat_ ("/etc/dhcpd.conf"));
diff --git a/dhcp_wizard/dhcp.wiz b/dhcp_wizard/dhcp.wiz
deleted file mode 100644
index 93164559..00000000
--- a/dhcp_wizard/dhcp.wiz
+++ /dev/null
@@ -1,324 +0,0 @@
-<?xml version="1.0"?>
-
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="DHCP Wizard"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/dhcp_wizard/images/DHCP.png"
- perlModule="__WIZ_HOME__/dhcp_wizard/scripts/Dhcpconf.pm"
- rpm="dhcp-server"
- summaryFunc="do_it"
->
-
- <Variable
- name="dhcp_range_low"
- comment="Low end of the DHCP server IP range"
- shellVariable="wiz_ip_range1"
- defaultValue="192.168.0.100"
- >
- </Variable>
-
- <Variable
- name="dhcp_range_high"
- comment="High end of the DHCP server IP range"
- shellVariable="wiz_ip_range2"
- defaultValue="192.168.0.254"
- >
- </Variable>
-
- <Variable
- name="varIsAuthoritative"
- shellVariable="wiz_authoritative"
- >
- </Variable>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dhcp.html"
- name="welcome"
- func="check_dhcp"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- <Target
- targetName="ask_dhcp_ip_range"
- jumpIndex="0"
- >
- </Target>
-
- <Target
- targetName="error_dhcp"
- jumpIndex="1"
- >
- </Target>
-
- <Info
- helpText="DHCP Configuration Wizard"
- >
- </Info>
-
-
- <Info
- helpText="DHCP is a service that automatically assigns networking addresses to your workstations."
- >
- </Info>
-
- <Info
- helpText="This wizard will help you configuring the DHCP services of your server."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dhcp.html"
- name="ask_dhcp_ip_range"
- comment="Ask the dhcp ip range"
- func="check"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="error_in_dhcp_ip_range"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="range_not_in_network"
- jumpIndex="2"
- >
- </Target>
-
- <Target
- targetName="server_in_range"
- jumpIndex="3"
- >
- </Target>
-
-
- <Target
- targetName="doit"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="Range of addresses used by dhcp"
- >
- </Info>
-
-
- <Info
- helpText="Select the range of addresses assigned to the workstations by the DHCP service; unless you have special needs, you can safely accept the proposed values."
- >
- </Info>
-
- <Freetext
- name="dhcpIpLow"
- variableName="dhcp_range_low"
- fillfunc="compute_range"
- helpText="Lowest IP Address:"
- editable="true"
- >
- </Freetext>
-
- <Freetext
- name="dhcpIpHigh"
- variableName="dhcp_range_high"
- fillfunc="compute_range2"
- helpText="Highest IP Address:"
- editable="true"
- >
- </Freetext>
-
- <Boolean
- variableName="varIsAuthoritative"
- helpText="Is the server authoritative ? Ask your system administrator."
- >
- </Boolean>
-
- <Info
- helpText="IP addresses are a dotted list of four numbers smaller than 256."
- >
- </Info>
- </Page>
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="error_dhcp"
- jumpPage="ask_dhcp_ip_range"
- executionLevel="NORMAL"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Warning\nYou are in dhcp, server may not work with your configuration."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dhcp.html"
- name="error_in_dhcp_ip_range"
- jumpPage="ask_dhcp_ip_range"
- nextButtonText="Fix it"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="The IP range specified is not correct"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dhcp.html"
- name="range_not_in_network"
- jumpPage="ask_dhcp_ip_range"
- nextButtonText="Fix it"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="The IP range specified is not in server network address range"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dhcp.html"
- name="server_in_range"
- jumpPage="ask_dhcp_ip_range"
- nextButtonText="Fix it"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="The IP of the server must not be in range"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dhcp.html"
- name="doit"
- func="do_it"
- nextButtonText="Configure"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="done"
- jumpIndex="10"
- >
- </Target>
-
- <Target
- targetName="system_error"
- jumpIndex="1"
- >
- </Target>
-
- <Info
- helpText="Configuring the DHCP Server"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters
-needed to configure your DHCP service:"
- >
- </Info>
-
-
- <Freetext
- name="freetext"
- variableName="dhcp_range_low"
- helpText="Lowest IP Address:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext1"
- variableName="dhcp_range_high"
- helpText="Highest IP Address:"
- 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
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dhcp.html"
- name="done"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Congratulations"
- >
- </Info>
-
-
- <Info
- helpText="The wizard successfully configured the DHCP services of your server."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dhcp.html"
- name="server launcher"
- jumpPage="ask_dhcp_ip_range"
- executionLevel="DEBUG"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dhcp.html"
- name="system_error"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="true"
- >
-
- <Info
- helpText="System error, no configuration done"
- >
- </Info>
- </Page>
-</Wizard>
diff --git a/dhcp_wizard/scripts/Dhcpconf.pm b/dhcp_wizard/scripts/Dhcpconf.pm
deleted file mode 100644
index e75cd855..00000000
--- a/dhcp_wizard/scripts/Dhcpconf.pm
+++ /dev/null
@@ -1,158 +0,0 @@
-#!/usr/bin/perl
-
-# DHCP Conf Parser
-
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons <adesmons@mandrakesoft.com>
-#
-# 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, or (at your option)
-# any later version.
-#
-# 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.
-
-package Dhcpconf;
-require "__WIZ_HOME__/common/scripts/IFCFG.pm";
-#require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm";
-use MDK::Common;
-use strict;
-use standalone;
-
-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})/;
-
-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 check {
-# FIXME : see check_range.sh
- my $r1_trunc = "$1.$2.$3" if $o->{var}{ip1} =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $r2_trunc = "$1.$2.$3" if $o->{var}{ip2} =~ /(\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})/;
- my $d2 = "$4" if $ENV{wiz_ip_range2} =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $s_trunc = "$1.$2.$3" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $ds = "$4" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- if (!$r1_trunc) { standalone::explanations("DHCP wizard : incorrect adress range 1"); return 1}
- if (!$r2_trunc) { standalone::explanations("DHCP wizard : incorrect adress range 2"); return 1}
- if ($r1_trunc ne $s_trunc || $r2_trunc ne $s_trunc) {
- standalone::explanations("DHCP wizard : range not in network");
- return 2;
- }
- if (!$d1 || !$d2 || $d1 > $d2) { standalone::explanations("DHCP wizard : bad range"); return 1}
- if ($ds >= $d1 && $ds <= $d2) { standalone::explanations("DHCP wizard : server in range"); return 3}
- 10;
-}
-
-sub check_dhcp {
- $o->is_dhcp() and return 1;
- 0;
-}
-
-sub do_it {
- my $wiz_domain_name = $o->network_get("DOMAINNAME");
- my $wiz_host_name = $o->network_get("HOSTNAME");
- my $wiz_gateway = $o->network_get("GATEWAY");
- my $wiz_dns = $o->network_get("dnsServer");
- if ($wiz_dns eq '127.0.0.1') {
- $wiz_dns = $wiz_ip_server
- }
- if (!$wiz_gateway) {
- my $t = `LC_ALL=C /sbin/ip route list scope global`;
- ($wiz_gateway) = $t =~ /default via (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) dev/;
- }
- 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 $err = check();
- return $err if $err != 10;
- my $wiz_ip_range1 = $ENV{wiz_ip_range1};
- my $wiz_ip_range2 = $ENV{wiz_ip_range2};
- 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
-
-#[ -f /etc/sysconfig/dhcpd ] && cp -f /etc/sysconfig/dhcpd /var/tmp/wiz_bck/orig/dhcpd
- my $file = "/etc/sysconfig/dhcpd";
- -f $file and MDK::Common::cp_af($file, $file.".orig");
-
- $file = "/etc/rc.d/init.d/dhcpd";
-# now patching etc/rc.d/init.d/dhcpd
- standalone::explanations("now patching etc/rc.d/init.d/dhcpd");
- if (!`grep INTERFACES $file`){
- MDK::Common::append_to_file($file, "\nINTERFACES=$wiz_device");
- MDK::Common::cp_af($file, $file . ".orig");
- my $tmp = `/bin/mktemp /tmp/Dhcpconf.XXXXXX` or die "can't make a temp file: $!";
- open(NEW, "> $tmp") or die "can't open $tmp: $!";
- open(OLD, "< $file") or die "can't open default: $!";
- while (<OLD>) {
- if (m|daemon\s*/usr/sbin/dhcp|) {
- print NEW "\tif [ -f /etc/sysconfig/dhcpd ]; then
-\t\t. /etc/sysconfig/dhcpd
-\t\tDEV=\$INTERFACES
-\tfi\n";
- }
- print NEW $_;
- }
- close(OLD);
- close(NEW);
- chomp($tmp);
- system("mv $tmp $file");
- }
- $file = "/etc/dhcpd.conf";
- -f $file and MDK::Common::cp_af($file, $file.".orig");
- output($file, map {
- s|__hname__|$wiz_host_name|g;
- s|__dns__|$wiz_dns|g;
- s|__net__|$wiz_ip_net|g;
- s|__ip__|$wiz_ip_server|g;
- s|__mask__|$wiz_ip_netmask|g;
- s|__rng1__|$wiz_ip_range1|g;
- s|__rng2__|$wiz_ip_range2|g;
- s|__dname__|$wiz_domain_name|g;
- s|__gateway__|$wiz_gateway|g;
- $_;
- } cat_ ("__WIZ_HOME__/dhcp_wizard/scripts/dhcpd.conf.default"));
- standalone::explanations("$file: hname = $wiz_host_name, net = $wiz_ip_net, ip = $wiz_ip_server,
-mask = $wiz_ip_netmask, rng1 = $wiz_ip_range1, rng2 = $wiz_ip_range2, dname = $wiz_domain_name");
- MDK::Common::touch("/var/dhcpd/dhcpd.leases");
-# modifying webmin config
- $file="/etc/webmin/dhcpd/config";
- if (-f $file) {
- my %mdk = Vareqval->get($file);
- $mdk{lease_file} = "/var/dhcpd/dhcpd.leases";
- $mdk{interfaces} = $wiz_device;
- standalone::explanations("$file: lease_file = $mdk{lease_file}, interfaces = $mdk{interfaces}");
- Vareqval->commit($file, \%mdk);
- !$ENV{wiz_authoritative} and output($file, map {
- s|^\s*not\s*authoritative.*|\#$&|i;
- $_
- } cat_ ("/etc/dhcpd.conf"));
- }
-
- system("/etc/rc.d/init.d/dhcpd restart");
- 10;
-}
-1;
-
diff --git a/dhcp_wizard/scripts/do_it_dhcp.sh b/dhcp_wizard/scripts/do_it_dhcp.sh
deleted file mode 100755
index 5141b8c0..00000000
--- a/dhcp_wizard/scripts/do_it_dhcp.sh
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/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 dhcpd configuration for dhcp server
-# assuming all dependencies are ok
-
-echo_debug "in $0"
-
-cfg_file=/etc/sysconfig/mdk_serv
-# loading var
-wiz_device=`get_var wiz_device`
-echo_debug "wiz_device=$wiz_device"
-wiz_host_name=`get_var wiz_host_name`
-echo_debug "wiz_host_name=$wiz_host_name"
-wiz_ip_net=`get_var wiz_ip_net`
-echo_debug "wiz_ip_net=$wiz_ip_net"
-wiz_ip_netmask=`get_var wiz_ip_netmask`
-echo_debug "wiz_ip_netmask=$wiz_ip_netmask"
-wiz_domain_name=`get_var wiz_domain_name`
-echo_debug "wiz_domain_name=$wiz_domain_name"
-wiz_ip_server=`get_var wiz_ip_server`
-echo_debug "=wiz_ip_server=$wiz_ip_server"
-
-echo_debug "wiz_ip_range1 is $wiz_ip_range1"
-echo_debug "wiz_ip_range2 is $wiz_ip_range2"
-chg_val ${cfg_file} wiz_ip_range1 "${wiz_ip_range1}" s
-chg_val ${cfg_file} wiz_ip_range2 "${wiz_ip_range2}" s
-
-# 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
-
-# ok, the new init.d/dhcp is not as wanted, still need a patch
-
-#[ -f /etc/sysconfig/dhcpd ] && cp -f /etc/sysconfig/dhcpd /var/tmp/wiz_bck/orig/dhcpd
-bck_file /etc/sysconfig/dhcpd
-echo "INTERFACES=${wiz_device}" > /etc/sysconfig/dhcpd
-
-# ok, the new init.d/dhcp is not as wanted, still need a patch
-# now patching /etc/rc.d/init.d/dhcpd if needed
-
-if [ -z "`grep INTERFACES /etc/rc.d/init.d/dhcpd`" ]; then
- echo_debug "now patching etc/rc.d/init.d/dhcpd"
- bck_file /etc/rc.d/init.d/dhcpd
- cat /etc/rc.d/init.d/dhcpd.mdk_orig.1 \
-|sed -e '/daemon \/usr\/sbin\/dhcpd/{
-i \
- if [ -f /etc/sysconfig/dhcpd ]; then\
- . /etc/sysconfig/dhcpd\
- DEV=$INTERFACES\
- fi
- }' > /etc/rc.d/init.d/dhcpd
-
-#old version patch /etc/rc.d/init.d/dhcpd < ${CWD}/scripts/dhcpd.patch
-
-fi
-
-
-# dhcpd.conf
-
-bck_file /etc/dhcpd.conf
-
-echo_debug "now putting dhcpd config file"
-
-cat ${CWD}/scripts/dhcpd.conf.default \
-|sed "s|__hname__|${wiz_host_name}|g" \
-|sed "s|__net__|${wiz_ip_net}|g" \
-|sed "s|__ip__|${wiz_ip_server}|g" \
-|sed "s|__mask__|${wiz_ip_netmask}|g" \
-|sed "s|__rng1__|${wiz_ip_range1}|g" \
-|sed "s|__rng2__|${wiz_ip_range2}|g" \
-|sed "s|__dname__|${wiz_domain_name}|g" \
-> /etc/dhcpd.conf
-
-touch /var/dhcpd/dhcpd.leases
-
-
-# modifying webmin config
-
-echo_debug "modifying webmin config"
-
-file="/etc/webmin/dhcpd/config"
-if [ -f ${file} ]; then
- chg_val ${file} lease_file "/var/dhcpd/dhcpd.leases"
- chg_val ${file} interfaces "${wiz_device}"
-fi
-
-
-# this part of script to be played at the very end
-
-echo_debug "restarting services"
-
-/etc/rc.d/init.d/dhcpd restart
-
-
-# all is ok
-exit 10
-
-
-
diff --git a/dns_wizard/dns.wiz b/dns_wizard/dns.wiz
deleted file mode 100644
index b4a0b3ef..00000000
--- a/dns_wizard/dns.wiz
+++ /dev/null
@@ -1,288 +0,0 @@
-<?xml version="1.0"?>
-
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="DNS Wizard (configuration)"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/dns_wizard/images/DNS.png"
- perlModule="__WIZ_HOME__/dns_wizard/scripts/Dnsconf.pm"
- rpm="bind"
->
-
- <Variable
- name="wiz_ext_dns1"
- shellVariable="wiz_ext_dns1"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Variable
- name="wiz_ext_dns2"
- shellVariable="wiz_ext_dns2"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Page
- name="Welcome"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dns.html"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- <Info
- helpText="DNS Configuration Wizard"
- >
- </Info>
-
-
- <Info
- helpText="DNS (Domain Name Server) is the service that maps an IP address of a machine with an internet host name."
- >
- </Info>
-
-
- <Info
- helpText="This wizard will help you configuring the DNS services of your server. This configuration will provide a local DNS service for local computers names, with non-local requests forwarded to an outside DNS."
- >
- </Info>
- </Page>
-
- <Page
- name="DNS"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dns.html"
- jumpScript="__WIZ_HOME__/dns_wizard/scripts/check_ext_dns.sh"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="doit"
- jumpIndex="10"
- >
- </Target>
-
- <Target
- targetName="Error"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="warning"
- jumpIndex="2"
- >
- </Target>
-
- <Info
- helpText="DNS Server Addresses"
- >
- </Info>
-
-
- <Info
- helpText="DNS will allow your network to communicate with the Internet using standard internet host names. In order to configure DNS, you must provide the IP address of primary and secondary DNS server; usually this address are given by your Internet provider."
- >
- </Info>
-
- <Freetext
- name="wiz_ext_dns1"
- variableName="wiz_ext_dns1"
- helpText="Primary DNS Address:"
- fillfunc="get_dns1"
- editable="true"
- >
- </Freetext>
-
- <Freetext
- name="wiz_ext_dns2"
- variableName="wiz_ext_dns2"
- helpText="Secondary DNS Address:"
- fillfunc="get_dns2"
- editable="true"
- >
- </Freetext>
-
- <Info
- helpText="IP addresses are a dotted list of four numbers smaller than 256."
- >
- </Info>
- </Page>
-
- <Page
- name="warning"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dns.html"
- jumpPage="doit"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Warning:"
- >
- </Info>
-
-
-
- <Info
- helpText="You have entered an empty address for the DNS server."
- >
- </Info>
-
- <Info
- helpText="Your setting could be accepted, but you will not be able to identify machine names outside your local network."
- >
- </Info>
-
- <Info
- helpText="Press next to leave these values empty, or back to enter a value."
- >
- </Info>
- </Page>
-
- <Page
- name="Error"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dns.html"
- jumpPage="DNS"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
-
- <Info
- helpText="This is not a valid address... press next to continue"
- >
- </Info>
-
- </Page>
-
- <Page
- name="server launcher"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dns.html"
- jumpPage="DNS"
- executionLevel="DEBUG"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- </Page>
-
- <Page
- name="doit"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dns.html"
- func="do_it"
- nextButtonText="Configure"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="done"
- jumpIndex="10"
- >
- </Target>
-
- <Target
- targetName="system_error"
- jumpIndex="1"
- >
- </Target>
-
- <Info
- helpText="Configuring the DNS Server"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters
-needed to configure your DNS service:"
- >
- </Info>
-
- <Freetext
- helpText="Primary DNS Address:"
- name="wiz_ext_dns1"
- variableName="wiz_ext_dns1"
- editable="false"
- >
- </Freetext>
- <Freetext
- helpText="Secondary DNS Address:"
- name="wiz_ext_dns2"
- variableName="wiz_ext_dns2"
- 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="done"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dns.html"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Congratulations"
- >
- </Info>
-
-
- <Info
- helpText="The wizard successfully configured the DNS services of your server."
- >
- </Info>
- </Page>
-
- <Page
- name="error_need_root"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dns.html"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="true"
- >
-
- <Info
- helpText="You need to be root to run this wizard"
- >
- </Info>
- </Page>
-
- <Page
- name="system_error"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-dns.html"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="true"
- >
-
- <Info
- helpText="System error, no configuration done"
- >
- </Info>
- </Page>
-</Wizard>
diff --git a/dns_wizard/scripts/Dnsconf.pm b/dns_wizard/scripts/Dnsconf.pm
deleted file mode 100644
index 4b8b66b0..00000000
--- a/dns_wizard/scripts/Dnsconf.pm
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/usr/bin/perl
-
-# DNS Config Parser
-
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons <adesmons@mandrakesoft.com>
-#
-# 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, or (at your option)
-# any later version.
-#
-# 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.
-
-package Dnsconf;
-require "__WIZ_HOME__/common/scripts/Vareqval.pm";
-require "__WIZ_HOME__/common/scripts/IFCFG.pm";
-use MDK::Common;
-use strict;
-use standalone;
-
-my $o = IFCFG->new();
-
-my $dns1;
-my $dns2;
-
-sub get_root {
- my $file = "/etc/sysconfig/named";
- if (-f $file) {
- my %mdk = Vareqval->get($file);
- return $mdk{ROOTDIR};
- }
- "";
-}
-
-my $file = "/etc/named.conf";
-if (-f $file) {
- open (NEW, "< $file");
- DNS : while (<NEW>) {
- $dns2 = "";
- if (m/^\s*options\s*\{/s...m/^\s*\}\;/s ) {
- if (m/^\s*forwarders\s*\{/s...m/^\s*\}\;/s ) {
- if (/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/) {
- $dns2 = "$1.$2.$3.$4";
- $dns1 and next DNS;
- $dns1 = $dns2;
- }
- }
- }
- }
- close (NEW);
-}
-
-sub get_dns1 {
- $dns1;
-}
-
-sub get_dns2 {
- $dns2;
-}
-
-sub up_serial {
- my ($file) = @_;
-
- my (undef, undef, undef, $mday, $mon, $year) = gmtime(time);
- $year += 1900;
- my $serial_nbm = sprintf "%4dY%2dm%2d00", $year, $mon, $mday;
- output($file, map {
- my $line = $_;
- if (/^(\s*)(\d*)(\s*;\s*Serial.*)$/) {
- my $serial_f = $2;
- $serial_f++;
- if ($serial_f <= $serial_nbm) {
- $serial_f = $serial_nbm;
- chomp($serial_f);
- $line = "$1$serial_f$3\n";
- }
- }
- $line;
- } cat_($file));
-}
-
-sub do_it {
- my $wiz_ip_server = $o->itf_get("IPADDR");
- my $wiz_domain_name = $o->network_get("DOMAINNAME");
- my $wiz_host_name = $o->network_get("HOSTNAME");
- my $s_trunc = "$1.$2.$3" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $ds = "$4" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $host = "$1" if $wiz_host_name =~ /(.*?)\..*/;
- my $reversnet = "$3$2$1" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
- my $file = "/etc/host.conf";
-
- MDK::Common::cp_af($file, $file.".orig");
- MDK::Common::cp_af("__WIZ_HOME__/dns_wizard/scripts/host.conf.default", $file);
-
- $file = "/etc/named.conf";
- -f $file and MDK::Common::cp_af($file, $file.".orig");
-
- my $ispns1 = $ENV{wiz_ext_dns1} || "// __ISPN1__";
- my $ispns2 = $ENV{wiz_ext_dns2} || "// __ISPN2__";
-
- output($file, map {
- s|__ISPNS1__|$ispns1|g;
- s|__ISPNS2__|$ispns2|g;
- s|__dname__|$wiz_domain_name|g;
- s|__revnet__|$reversnet|g;
- s|__net__|$s_trunc|g;
- $_;
- } cat_("__WIZ_HOME__/dns_wizard/scripts/named.conf.default"));
-
- standalone::explanations("$file : DNS1: $ispns1 DNS2: $ispns2");
-# Bug fix for bind 9:
- if (! -f "/etc/rndc.key") { system("touch /etc/rndc.key") or die "can not touch /etc/rndc.key"};
-
-# root.hints
- $file="/var/named/root.hints";
- -f $file and MDK::Common::cp_af($file, $file . ".orig");
- MDK::Common::cp_af("__WIZ_HOME__/dns_wizard/scripts/root.hints.default", $file);
- standalone::explanations("$file clobbered");
-# 127.0.0.rev
- $file="/var/named/127.0.0.rev";
- -f $file and MDK::Common::cp_af($file, $file . ".orig");
- output($file, map {
- s|__hname__|$wiz_host_name|g;
- $_;
- } cat_("__WIZ_HOME__/dns_wizard/scripts/127.0.0.rev.default"));
- standalone::explanations("$file : hostname: $wiz_host_name");
- up_serial($file);
-
-# $ipnet.rev
- $file = "/var/named/$s_trunc.rev";
- -f $file and MDK::Common::cp_af($file, $file.".orig");
- output($file, map {
- s|__dname__|$wiz_domain_name|g;
- s|__hname__|$wiz_host_name|g;
- s|__revnet__|$reversnet|g;
- s|__nb__|$ds|g;
- $_;
- } cat_("__WIZ_HOME__/dns_wizard/scripts/ipnet.rev.default"));
- up_serial($file);
- standalone::explanations("$file : domain: $wiz_domain_name hostname: $wiz_host_name revnet: $reversnet
-nb: $ds");
-# $domain.db
- $file = "/var/named/$wiz_domain_name.db";
- -f $file and MDK::Common::cp_af($file, $file.".orig");
- output($file, map {
- s|__dname__|$wiz_domain_name|g;
- s|__hname__|$wiz_host_name|g;
- s|__ip__|$wiz_ip_server|g;
- s|__host__|$host|g;
- s|__nb__|$ds|g;
- $_;
- } cat_("__WIZ_HOME__/dns_wizard/scripts/domain.db.default"));
- up_serial($file);
- standalone::explanations("$file : domain: $wiz_domain_name hostname: $wiz_host_name revnet: $reversnet
-nb: $ds");
-# resolv.conf
- $file = "/etc/resolv.conf";
- -f $file and MDK::Common::cp_af($file, $file.".orig");
- open(NEW, "> $file");
- print NEW "domain $wiz_domain_name\n";
- print NEW "nameserver $wiz_ip_server\n";
- standalone::explanations("$file : domain: $wiz_domain_name nameserver: $wiz_ip_server");
- system("/sbin/chkconfig --level 235 named on");
- system("/etc/rc.d/init.d/named restart");
- 10;
-}
-1;
diff --git a/drakwizard.pl b/drakwizard.pl
index 093a39bf..69f9220a 100755
--- a/drakwizard.pl
+++ b/drakwizard.pl
@@ -2,7 +2,9 @@
# Drakwizard
-# Copyright (C) 2003 Florent Villard <warly@mandrakesoft.com>
+# Copyright (C) 2003 Mandrakesoft
+#
+# Author: Florent Villard <warly@mandrakesoft.com>
#
# 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
diff --git a/ftp_wizard/Proftpd.pm b/ftp_wizard/Proftpd.pm
index 45247a33..c4bb6b0c 100755
--- a/ftp_wizard/Proftpd.pm
+++ b/ftp_wizard/Proftpd.pm
@@ -2,7 +2,9 @@
# Drakwizard
-# Copyright (C) 2003 Florent Villard <warly@mandrakesoft.com>
+# Copyright (C) 2003 Mandrakesoft
+#
+# Author: Florent Villard <warly@mandrakesoft.com>
#
# 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
diff --git a/ftp_wizard/ftp.wiz b/ftp_wizard/ftp.wiz
deleted file mode 100644
index 5c7a055c..00000000
--- a/ftp_wizard/ftp.wiz
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0"?>
-
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="FTP wizard"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/ftp_wizard/images/FTP.png"
- perlModule="__WIZ_HOME__/ftp_wizard/scripts/ProFtpconf.pm"
- rpm="proftpd"
- summaryFunc="do_it"
->
-
- <Variable
- name="wiz_ftp_internal"
- shellVariable="wiz_ftp_internal"
- >
- </Variable>
-
- <Variable
- name="wiz_ftp_external"
- shellVariable="wiz_ftp_external"
- >
- </Variable>
-
- <Variable
- name="wiz_ftp_anon"
- shellVariable="wiz_ftp_external"
- >
- </Variable>
-
- <Variable
- name="wiz_ftp_home"
- shellVariable="wiz_ftp_external"
- >
- </Variable>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-ftp.html"
- name="welcome"
- func="check"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="false"
- canCancel="true"
- >
-
- <Target
- targetName="must be root"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="ftp connections"
- jumpIndex="0"
- >
- </Target>
-
- <Target
- targetName="error_dhcp"
- jumpIndex="2"
- >
- </Target>
-
- <Info
- helpText="FTP Server Configuration Wizard"
- >
- </Info>
-
-
- <Info
- helpText="This wizard will help you configuring the FTP Server for your network."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-ftp.html"
- name="must be root"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Sorry, you must be root to do this..."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="error_dhcp"
- jumpPage="ftp connections"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Warning\nYou are in dhcp, server may not work with your configuration."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-ftp.html"
- name="ftp connections"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="FTP Server"
- >
- </Info>
-
-
- <Info
- helpText="Your server can act as an FTP Server toward your internal network (intranet) and as an FTP Server for the Internet."
- >
- </Info>
-
-
- <Info
- helpText="Select the kind of FTP service you want to activate:"
- >
- </Info>
-
-
- <Boolean
- name="wiz_ftp_internal"
- variableName="wiz_ftp_internal"
- forceEnabled="1"
- forceDisabled="0"
- helpText="Enable the FTP Server for the Intranet"
- >
- </Boolean>
-
-
- <Boolean
- name="wiz_ftp_external"
- variableName="wiz_ftp_external"
- forceEnabled="1"
- forceDisabled="0"
- helpText="Enable the FTP Server for the Internet"
- >
- </Boolean>
-
-
- <Info
- helpText="Don't check any box if you don't want to activate your FTP Server."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-ftp.html"
- name="confirmation"
- func="do_it"
- jumpPage="congratulations"
- nextButtonText="Configure"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Configuring the FTP Server"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters
-needed to configure your FTP Server"
- >
- </Info>
-
- <Freetext
- variableName="wiz_ftp_internal"
- helpText="Intranet FTP Server:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- variableName="wiz_ftp_external"
- helpText="Internet FTP Server:"
- 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
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-ftp.html"
- name="congratulations"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Congratulations"
- >
- </Info>
-
-
- <Info
- helpText="The wizard successfully configured your Intranet/Internet FTP Server"
- >
- </Info>
- </Page>
-</Wizard>
diff --git a/ftp_wizard/scripts/ProFtpconf.pm b/ftp_wizard/scripts/ProFtpconf.pm
deleted file mode 100644
index 854245cc..00000000
--- a/ftp_wizard/scripts/ProFtpconf.pm
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/perl
-
-# Drakwizard
-
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons (adesmons@mandrakesoft.com)
-#
-# 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, or (at your option)
-# any later version.
-#
-# 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.
-
-package ProFtpconf;
-require "__WIZ_HOME__/common/scripts/IFCFG.pm";
-use MDK::Common;
-use strict;
-require "__WIZ_HOME__/common/scripts/Vareqval.pm";
-
-sub true {
- my ($val) = @_;
-
- $val eq "1" || $val eq "\'1\'" || $val eq "\"1\"" ||
- $val eq "true" || $val eq "\'true\'" || $val eq "\"true\"" and
- return 1;
- 0;
-}
-
-sub check_dir {
- -d $ENV{wiz_dir} and return 10;
- 1;
-}
-
-sub get_dir {
- my $file = "/etc/proftpd.conf";
- die "no ftp configuration file found ! warning." if (!-f $file);
- open(NEW, "< $file") or die "error while opening $file: $!";
-
- while (<NEW>) { # we need 3 elements to consider section as known
- if (m/^\s*<drakwizard>/s...m/^\s*<\/drakwizard>/s ) {
- if (m/^\s*<Anonymous\s*(.*)>/s ) {
- return $1;
- }
- }
- }
- return "";
-}
-
-my $o = IFCFG->new();
-
-sub check {
- $> and return 1;
- $o->is_dhcp() and return 2;
- 0;
-}
-
-sub print_anonymous() {
- print '
-#<drakwizard>
-<Anonymous '.$_[0].'>
- User ftp
- Group ftp
- UserAlias anonymous ftp
- MaxClients 10
- <Limit WRITE>
- DenyAll
- </Limit>
-</Anonymous>
-#</drakwizard>
-';
-}
-
-sub do_it {
- my $wiz_ftp_internal = $ENV{wiz_ftp_external} ? 1 : true $ENV{wiz_ftp_internal};
- my $wiz_ftp_external = true $ENV{wiz_ftp_external};
- my $file = "/etc/proftpd.conf";
- die "no ftp configuration file found ! warning." if (!-f $file);
- MDK::Common::cp_af($file, $file . ".orig");
- open(NEW, "< $file") or die "error while opening $file: $!";
- my $allow = "all";
- if ($wiz_ftp_internal && !$wiz_ftp_external) {
- ($allow) = $o->itf_get("IPADDR") =~ qr/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.)\d{1,3}$/;
- $allow .= " 127.0.0.1";
- }
- elsif (!$wiz_ftp_external) {
- $allow = "none";
- }
- my $file = "/etc/proftpd.conf";
- open (NEW, "< $file");
- my $exist = 0;
- while (<NEW>) { # we need 3 elements to consider section as known
- if (m/^\s*<Global>/s...m/^\s*<\/Global>/s ) {
- if (m/^\s*<Limit LOGIN>/s...m/^\s*<\/Limit>/s ) {
- if (/^\s*(?!\#)\s*Order .*$/) {
- $exist++;
- }
- if (/^\s*(?!\#)\s*Allow .*$/) {
- $exist++;
- }
- if (/^\s*(?!\#)\s*Deny .*$/) {
- $exist++;
- }
- }
- }
- }
- close (NEW);
- if ($exist < 3) { # Odd parameters are commented if exists to then add a known section
- substInFile {
- if (m/^\s*<Global>/s...m/^\s*<\/Global>/s ) {
- if (m/^\s*<Limit LOGIN>/s...m/^\s*<\/Limit>/s ) {
- s/^\s*(?!\#)\s*Order .*$/\#$&\n/s;
- s/^\s*(?!\#)\s*Allow .*$/\#$&\n/s;
- s/^\s*(?!\#)\s*Deny .*$/\#$&\n/s;
- }
- }
- } $file;
- open (NEW, ">> $file");
- print NEW '
-#<drakwizard>
-<Global>
- <Limit LOGIN>
- Order allow,deny
- Allow from '.$allow.'
- Deny from all
- </Limit>
-</Global>
-#</drakwizard>';
- close NEW;
- }
- else { # the known section (3 parameters ) is replaced with our needs
- substInFile {
- if (m/^\s*<Global>/s...m/^\s*<\/Global>/s ) {
- if (m/^\s*<Limit LOGIN>/s...m/^\s*<\/Limit>/s ) {
- if (/^\s*(?!\#)\s*Order .*$/i) {
- if (!/\s*Order\s*allow,\s*deny\s*$/) {
- s//\#$&\n Order allow,deny\n/;
- }
- }
- if (/^\s*(?!\#)\s*Allow .*$/i) {
- if (!/\s*Allow\s*from\s*$allow\s*$/) {
- s//\#$&\n Allow from $allow/;
- }
- }
- if (/^\s*(?!\#)\s*Deny .*$/i) {
- if (!/\s*Deny\s*from\s*all\s*$/) {
- s//\#$&\n Deny from all\n/;
- }
- }
- }
- }
- } $file;
- }
- system("/etc/rc.d/init.d/proftpd restart");
- 10;
-}
-1;
diff --git a/news_wizard/Inn.pm b/news_wizard/Inn.pm
index 92779f1d..76ebf4e3 100755
--- a/news_wizard/Inn.pm
+++ b/news_wizard/Inn.pm
@@ -2,7 +2,9 @@
# Drakwizard
-# Copyright (C) 2003 Florent Villard <warly@mandrakesoft.com>
+# Copyright (C) 2003 Mandrakesoft
+#
+# Author: Florent Villard <warly@mandrakesoft.com>
#
# 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
diff --git a/news_wizard/news.wiz b/news_wizard/news.wiz
deleted file mode 100644
index 1a56faf2..00000000
--- a/news_wizard/news.wiz
+++ /dev/null
@@ -1,283 +0,0 @@
-<?xml version="1.0"?>
-
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="News Wizard"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/news_wizard/images/news.png"
- perlModule="__WIZ_HOME__/news_wizard/scripts/Newsconf.pm"
- rpm="leafnode"
- summaryFunc="do_it"
->
-
- <Variable
- name="newsServer"
- comment="The host name of the news server"
- shellVariable="wiz_news_server"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Variable
- name="newsFreq"
- comment="The frequency of the news server polling"
- shellVariable="wiz_news_freq"
- defaultValue="12"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Page
- name="Welcome"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-news.html"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- <Info
- helpText="Welcome to the News Wizard"
- >
- </Info>
-
-
- <Info
- helpText="This wizard will help you configuring the Internet News services for your network."
- >
- </Info>
- </Page>
-
- <Page
- name="ask_news_server"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-news.html"
- jumpScript="__WIZ_HOME__/news_wizard/scripts/check_news_server.sh"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="error_in_news_server"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="ask_news_freq"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="News Server"
- >
- </Info>
-
-
- <Info
- helpText="The news server name is the name of the host providing the Internet news to your network; the name is usually provided by your provider."
- >
- </Info>
-
-
- <Freetext
- name="freetext1"
- comment="Host name input field"
- variableName="newsServer"
- fillfunc="get_server"
- helpText="News Server Name:"
- editable="true"
- >
- </Freetext>
-
-
- <Info
- helpText="Internet host names must be in the form \qhost.domain.domaintype\q; for example, if your provider is \qprovider.com\q, the internet news server is usually \qnews.provider.com\q."
- >
- </Info>
- </Page>
-
- <Page
- name="error_in_news_server"
- comment="Error message for an incorrect hostname"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-news.html"
- jumpPage="ask_news_server"
- nextButtonText="Fix it"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="The news server name is not correct"
- >
- </Info>
- </Page>
-
- <Page
- name="ask_news_freq"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-news.html"
- jumpScript="__WIZ_HOME__/news_wizard/scripts/check_valid_hours.sh"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="error_in_news_freq"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="doit"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="Polling Period"
- >
- </Info>
-
-
- <Info
- helpText="Your server will regularly poll the News Server for obtaning the latest Internet News; the polling period set the interval between two consecutive polling."
- >
- </Info>
-
- <Freetext
- name="freetext2"
- variableName="newsFreq"
- helpText="Polling Period (Hours):"
- editable="true"
- >
- </Freetext>
-
-
- <Info
- helpText="Depending on the kind of internet connection you have, an appropriate polling period can change between 6 and 24 hours."
- >
- </Info>
- </Page>
-
- <Page
- name="error_in_news_freq"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-news.html"
- jumpPage="ask_news_freq"
- nextButtonText="Fix it"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="The polling period is not correct"
- >
- </Info>
- </Page>
-
- <Page
- name="doit"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-news.html"
- func="do_it"
- nextButtonText="Configure"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="catastrophic_exit"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="done"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="Configuring the Internet News"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters
-needed to configure your Internet News Service:"
- >
- </Info>
-
-
- <Freetext
- name="freetext"
- variableName="newsServer"
- helpText="News Server:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext2"
- variableName="newsFreq"
- helpText="Polling Interval:"
- 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="done"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-news.html"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Congratulations"
- >
- </Info>
-
-
- <Info
- helpText="The wizard successfully configured your Internet News service of your server."
- >
- </Info>
- </Page>
-
- <Page
- name="catastrophic_exit"
- comment="Exit in case of catastrophhic system error"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-news.html"
- nextButtonText="Exit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Something terrible happened"
- >
- </Info>
- </Page>
-</Wizard>
diff --git a/news_wizard/scripts/Newsconf.pm b/news_wizard/scripts/Newsconf.pm
deleted file mode 100644
index 10b6bfa6..00000000
--- a/news_wizard/scripts/Newsconf.pm
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/perl
-
-# Drakwizard
-
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons <adesmons@mandrakesoft.com>
-#
-# 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, or (at your option)
-# any later version.
-#
-# 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.
-
-
-package Newsconf;
-require "__WIZ_HOME__/common/scripts/Vareqval.pm";
-use MDK::Common;
-use strict;
-
-sub normalize_freq {
- my ($freq) = @_;
-
- if ($freq =~ /(\d*)/) {
- $freq = $1;
- }
- if ($freq <= 0) {
- $freq = 0;
- }
- if ($freq >= 24) {
- $freq = 24;
- }
- $freq;
-}
-
-sub get_server {
- my %mdk = Vareqval->get("/etc/leafnode/config");
- $mdk{server};
-}
-
-sub normalize_server {
- my ($server) = @_;
-
- $server;
-}
-
-sub do_it {
- $ENV{wiz_news_freq} and my $freq = normalize_freq($ENV{wiz_news_freq}) or
- die "freq not defined: $!";
- $ENV{wiz_news_server} and my $server = normalize_server($ENV{wiz_news_server}) or
- die "server not defined: $!";
- my $file = "/etc/leafnode/config";
- output($file, map {
- s|__server__|$server|g;
- $_;
- } cat_("__WIZ_HOME__/news_wizard/scripts/config.default"));
- $file = "/var/spool/cron/news";
- my $file_c = "/etc/leafnode/crontab";
- if (-f $file) {
- MDK::Common::cp_af($file, $file_c);
- MDK::Common::cp_af($file, $file . ".orig");
- }
- output($file_c, map {
- s|__freq__|$freq|g;
- $_;
- } cat_("__WIZ_HOME__/news_wizard/scripts/news.cron"));
- system("crontab -u news /etc/leafnode/crontab");
- 10;
-}
-
-1;
diff --git a/postfix_wizard/Postfix.pm b/postfix_wizard/Postfix.pm
index 980bc5ee..c5f28f3d 100755
--- a/postfix_wizard/Postfix.pm
+++ b/postfix_wizard/Postfix.pm
@@ -2,8 +2,10 @@
# Drakwizard
-# Copyright (C) 2002 Arnaud Desmons <adesmons@mandrakesoft.com>
-# 2003 Florent Villard <warly@mandrakesoft.com>
+# Copyright (C) 2002, 2003 Mandrakesoft
+#
+# Authors: Arnaud Desmons <adesmons@mandrakesoft.com>
+# Florent Villard <warly@mandrakesoft.com>
#
# 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
diff --git a/postfix_wizard/postfix.wiz b/postfix_wizard/postfix.wiz
deleted file mode 100644
index 45954c12..00000000
--- a/postfix_wizard/postfix.wiz
+++ /dev/null
@@ -1,323 +0,0 @@
-<?xml version="1.0"?>
-
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="Postfix wizard"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/postfix_wizard/images/courrier.png"
- perlModule="__WIZ_HOME__/postfix_wizard/scripts/Postfixconf.pm"
- rpm="postfix"
- summaryFunc="do_it"
->
-
- <Variable
- name="wiz_mail_masquerade"
- shellVariable="wiz_mail_masquerade"
- >
- </Variable>
-
- <Variable
- name="wiz_ext_mail_relay"
- shellVariable="wiz_ext_mail_relay"
- >
- </Variable>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
- name="welcome"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- <Info
- helpText="Internet Mail Configuration Wizard"
- >
- </Info>
-
-
- <Info
- helpText="This wizard will help you configuring the Internet Mail services for your network."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
- name="Form_of_address"
- func='check_masquerade'
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="Masquerade_not_good"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="ISP"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="Outgoing Mail Address"
- >
- </Info>
-
-
- <Info
- helpText="You can select the kind of address that outgoing mail will show in the \qFrom:\q and \qReply-to\q field."
- >
- </Info>
-
-
- <Freetext
- name="wiz_mail_masquerade"
- variableName="wiz_mail_masquerade"
- fillfunc="get_mail_masquerade"
- helpText="Mail Address:"
- editable="true"
- >
- </Freetext>
-
-
- <Info
- helpText="This should be chosen consistently with the address you use for incoming mail."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
- name="Masquerade_not_good"
- jumpPage="Form_of_address"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Masquerade not good!"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
- name="ISP"
- func='check_relay'
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="Confirmation"
- jumpIndex="10"
- >
- </Target>
-
- <Target
- targetName="warning"
- jumpIndex="1"
- >
- </Target>
-
- <Info
- helpText="Internet Mail Gateway"
- >
- </Info>
-
-
- <Info
- helpText="Your server will send the outgoing through a mail gateway, that will take care of the final delivery."
- >
- </Info>
-
-
- <Freetext
- name="wiz_ext_mail_relay"
- variableName="wiz_ext_mail_relay"
- helpText="Mail Server Name:"
- editable="true"
- fillfunc="get_mail_relay"
- >
- </Freetext>
-
-
- <Info
- helpText="Internet host names must be in the form \qhost.domain.domaintype\q; for example, if your provider is \qprovider.com\q, the internet mail server is usually \qsmtp.provider.com\q."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
- name="warning"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Warning:"
- >
- </Info>
-
-
- <Info
- helpText="You entered an empty address for the mail gateway."
- >
- </Info>
-
- <Info
- helpText="Your choice can be accepted, but this will not allow you to send mail outside your local network. Press next to continue, or back to enter a value."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
- name="Confirmation"
- func="do_it"
- nextButtonText="Do It"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="Congratulations"
- jumpIndex="10"
- >
- </Target>
-
- <Target
- targetName="Big problem"
- jumpIndex="1"
- >
- </Target>
-
- <Info
- helpText="Configuring the Internet Mail"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters
-needed to configure your Internet Mail Service:"
- >
- </Info>
-
-
- <Freetext
- name="freetext1"
- variableName="wiz_ext_mail_relay"
- helpText="Internet Mail Gateway"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext2"
- variableName="wiz_mail_masquerade"
- helpText="Form of the Address"
- 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
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
- name="Big problem"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Hmmm"
- >
- </Info>
-
-
- <Info
- helpText="There seems to be a problem..."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
- name="error_need_net"
- subWizard="__WIZ_HOME__/server_wizard/server.wiz"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="false"
- canCancel="true"
- >
-
- <Info
- helpText="Network not configured yet"
- >
- </Info>
-
-
- <Info
- helpText="You have to configure the basic network parameters before launching this wizard."
- >
- </Info>
-
- <Info
- helpText="Press next to configure these parameters now, or Cancel to exit this wizard."
- >
- </Info>
-
-
- <Info
- helpText="If you choose to configure now, you will automatically continue with the POSTFIX configuration"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
- name="Congratulations"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Congratulations"
- >
- </Info>
-
-
- <Info
- helpText="The wizard successfully configured your Internet Mail service of your server."
- >
- </Info>
- </Page>
-</Wizard>
diff --git a/proxy_wizard/Squid.pm b/proxy_wizard/Squid.pm
index 89f4cee6..f7287e49 100755
--- a/proxy_wizard/Squid.pm
+++ b/proxy_wizard/Squid.pm
@@ -2,8 +2,10 @@
# Drakwizard
-# Copyright (C) 2002 Arnaud Desmons <adesmons@mandrakesoft.com>
-# Copyright (C) 2003 Florent Villard <warly@mandrakesoft.com>
+# Copyright (C) 2002,2003 Mandrakesoft
+#
+# Authors: Arnaud Desmons <adesmons@mandrakesoft.com>
+# Florent Villard <warly@mandrakesoft.com>
#
# 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
diff --git a/proxy_wizard/proxy.wiz b/proxy_wizard/proxy.wiz
deleted file mode 100644
index d4f61e4a..00000000
--- a/proxy_wizard/proxy.wiz
+++ /dev/null
@@ -1,758 +0,0 @@
-<?xml version="1.0"?>
-
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="Squid wizard"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/proxy_wizard/images/proxy.png"
- perlModule="__WIZ_HOME__/proxy_wizard/scripts/Squidconf.pm"
- rpm="squid"
- summaryFunc="do_it_squid"
->
- <Variable
- name="var_wiz_squid_level"
- comment="The proxy access control level"
- shellVariable="wiz_squid_level"
- defaultValue="2"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Variable
- name="wiz_squid_port"
- shellVariable="wiz_squid_port"
- valueIsTranslated="false"
- defaultValue="3128"
- >
- </Variable>
-
- <Variable
- name="wiz_squid_mem"
- shellVariable="wiz_squid_mem"
- defaultValue="16"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Variable
- name="wiz_squid_disk"
- shellVariable="wiz_squid_disk"
- defaultValue="200"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Variable
- name="wiz_squid_mynetw"
- shellVariable="wiz_squid_mynetw"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Variable
- name="wiz_squid_defdir"
- shellVariable="wiz_squid_defdir"
- defaultValue="/var/spool/squid"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Variable
- name="wiz_squid_cachepeer"
- shellVariable="wiz_squid_cachepeer"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Variable
- name="wiz_squid_peerport"
- shellVariable="wiz_squid_peerport"
- defaultValue="3128"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Variable
- name="wiz_squid_menupeer"
- shellVariable="wiz_squid_menupeer"
- defaultValue="1"
- valueIsTranslated="false"
- >
- </Variable>
-
- <Page
- name="Welcome"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Proxy Configuration Wizard"
- >
- </Info>
-
-
- <Info
- helpText="Squid is a web caching proxy server, it allows faster web access for your local network."
- >
- </Info>
-
- <Info
- helpText="This wizard will help you in configuring your proxy server."
- >
- </Info>
- </Page>
-
- <Page
- name="port"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- func="testport"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="warningport"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="errorlow"
- jumpIndex="2"
- >
- </Target>
-
- <Target
- targetName="memory"
- jumpIndex="0"
- >
- </Target>
-
- <Info
- helpText="Proxy Port"
- >
- </Info>
-
-
- <Info
- helpText="Proxy port value sets what port the proxy server will listen on for http requests. Default is 3128, other common value can be 8080, the port value needs to be greater than 1024."
- >
- </Info>
-
-
- <Freetext
- variableName="wiz_squid_port"
- helpText="Proxy port:"
- editable="true"
- >
- </Freetext>
-
- </Page>
-
- <Page
- name="memory"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- jumpPage="ask_level"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Proxy Cache Size"
- >
- </Info>
-
-
- <Info
- helpText="Memory Cache is the amount of RAM dedicated to cache memory operations (note that actual memory usage of the whole squid process is bigger)."
- >
- </Info>
-
- <Info
- helpText="Disk Cache is the amount of disk space that can be used for caching on disk."
- >
- </Info>
-
-
- <Freetext
- name="wiz_squid_mem"
- variableName="wiz_squid_mem"
- helpText="Memory cache (MB):"
- editable="true"
- >
- </Freetext>
-
- <Freetext
- name="wiz_squid_disk"
- variableName="wiz_squid_disk"
- helpText="Disk space (MB):"
- editable="true"
- >
- </Freetext>
-
-
- <Info
- helpText="For your information, here is /var/spool/squid space on disk:"
- >
- </Info>
-
- <Info
- helpText="Filesystem Size Used Avail Use% Mounted on"
- >
- </Info>
-
- <Info
- comment="free space on disk"
- fillScript="__WIZ_HOME__/proxy_wizard/scripts/dfh.sh"
- >
- </Info>
-
- </Page>
-
- <Page
- name="ask_level"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- jumpScript="__WIZ_HOME__/proxy_wizard/scripts/echolevel.sh $wiz_squid_level"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="cachepeer"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="shownet"
- jumpIndex="2"
- >
- </Target>
-
- <Target
- targetName="cachepeer"
- jumpIndex="3"
- >
- </Target>
-
- <Info
- helpText="Access Control"
- >
- </Info>
-
-
- <Info
- helpText="The proxy can be configured to use different access control levels."
- >
- </Info>
-
- <Info
- helpText="Choose the level that suits your needs. If you don't know, the Local Network level is usually the most appropriate. Beware that the All level may be not secure."
- >
- </Info>
-
- <Chooser
- name="chooser1"
- variableName="var_wiz_squid_level"
- helpFontName="Default"
- helpFontStyle="plain"
- helpFontSize="12"
- editable="false"
- >
-
- <Option
- value="1"
- description="All - No access restriction"
- >
- </Option>
-
- <Option
- value="2"
- description="Local Network - access for local network (recommended)"
- >
- </Option>
-
- <Option
- value="3"
- description="Localhost - access restricted to this server only"
- >
- </Option>
- </Chooser>
- </Page>
-
- <Page
- name="warningport"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- jumpPage="memory"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Warning:"
- >
- </Info>
-
-
- <Info
- helpText="You have entered a port that may be useful for this service:"
- >
- </Info>
- <Info
- helpText="Press Next if you want to keep this value, or Back to correct your choice."
- >
- </Info>
-
- <Freetext
- fillfunc="port"
- helpText="/etc/services:"
- editable="false"
- >
- </Freetext>
- </Page>
-
- <Page
- name="shownet"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- jumpPage="cachepeer"
- executionLevel="NORMAL"
- is="var_wiz_squid_level=2"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Grant access on local network"
- >
- </Info>
-
-
- <Info
- helpText="Access will be allowed for hosts on the network. Here is the information found about your current local network, you can modify it if needed."
- >
- </Info>
-
- <Info
- helpText="You can use either a numeric format like \q192.168.1.0/255.255.255.0\q or a text format like \q.domain.net\q"
- >
- </Info>
-
-
- <Freetext
- name="f_wiz_squid_mynetw"
- variableName="wiz_squid_mynetw"
- fillfunc="network_mask"
- helpText="Authorized network:"
- editable="true"
- help="Use numeric format like \q192.168.1.0/255.255.255.0\q or a text format like \q.domain.net\q"
- >
- </Freetext>
-
- </Page>
-
- <Page
- name="cachepeer"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- jumpScript="__WIZ_HOME__/proxy_wizard/scripts/echolevel.sh $wiz_squid_menupeer"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- <Target
- targetName="doit2"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="valcachepeer"
- jumpIndex="2"
- >
- </Target>
- <Info
- helpText="Cache hierarchy"
- >
- </Info>
-
-
- <Info
- helpText="As an option, Squid can be configured in proxy cascading. You can add a new upper level proxy by specifying its hostname and port."
- >
- </Info>
-
- <Info
- helpText="You can safely select \qNo upper level proxy\q if you don't need this feature."
- >
- </Info>
-
-
- <Chooser
- name="chooser4"
- variableName="wiz_squid_menupeer"
- helpFontName="Default"
- helpFontStyle="plain"
- helpFontSize="12"
- editable="false"
- >
-
- <Option
- value="1"
- description="No upper level proxy (recommended)"
- >
- </Option>
-
- <Option
- value="2"
- description="Define an upper level proxy"
- >
- </Option>
-
- </Chooser>
-
-
- </Page>
-
-
- <Page
- name="valcachepeer"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- jumpPage="doit"
- executionLevel="NORMAL"
- nextFinish="false"
- is="wiz_squid_menupeer=2"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Cache hierarchy"
- >
- </Info>
-
-
- <Info
- helpText="Enter the qualified hostname (like \qcache.domain.net\q) and the port of the proxy to use."
- >
- </Info>
-
-
- <Freetext
- name="_wiz_squid_cachepeer"
- variableName="wiz_squid_cachepeer"
- helpText="Upper level proxy hostname:"
- editable="true"
- >
- </Freetext>
-
- <Freetext
- name="_wiz_squid_peerport"
- variableName="wiz_squid_peerport"
- helpText="Upper level proxy port:"
- editable="true"
- >
- </Freetext>
-
- </Page>
-
- <Page
- name="doit"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- func="do_it_squid"
- nextButtonText="Configure"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="catastrophic_exit"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="done"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="Configuring the Proxy"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters needed to configure your proxy:"
- >
- </Info>
-
- <Freetext
- name="s_port"
- variableName="wiz_squid_port"
- helpText="Port:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="s_mem"
- variableName="wiz_squid_mem"
- helpText="Memory cache (MB):"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="s_disk"
- variableName="wiz_squid_disk"
- helpText="Disk space (MB):"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="s_level"
- fillScript="__WIZ_HOME__/proxy_wizard/scripts/showlevel.sh $wiz_squid_level"
- helpText="Access Control:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="s_peer"
- variableName="wiz_squid_cachepeer"
- helpText="Upper level proxy hostname:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="s_peerport"
- variableName="wiz_squid_peerport"
- helpText="Upper level proxy port:"
- 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="doit2"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- func="do_it_squid"
- nextButtonText="Configure"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="catastrophic_exit"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="done"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="Configuring the Proxy"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters needed to configure your proxy:"
- >
- </Info>
-
-
-
- <Freetext
- name="s_port"
- variableName="wiz_squid_port"
- helpText="Port:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="s_mem"
- variableName="wiz_squid_mem"
- helpText="Memory cache (MB):"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="s_disk"
- variableName="wiz_squid_disk"
- helpText="Disk space (MB):"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="s_level"
- variableName="wiz_squid_mynetw"
- fillScript="__WIZ_HOME__/proxy_wizard/scripts/showlevel.sh $wiz_squid_level"
- helpText="Access Control:"
- 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="done"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Congratulations"
- >
- </Info>
-
-
- <Info
- helpText="The wizard successfully configured your proxy server."
- >
- </Info>
- </Page>
-
- <Page
- name="catastrophic_exit"
- comment="Exit in case of catastrophhic system error"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- nextButtonText="Exit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Something terrible happened"
- >
- </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-proxy.html"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="This Wizard needs to run as root"
- >
- </Info>
- </Page>
-
- <Page
- name="errorlow"
- comment="lt 1024"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- jumpPage="port"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="false"
- >
-
- <Info
- helpText="Warning:"
- >
- </Info>
-
-
- <Info
- helpText="You must choose a port greater than 1024 and lower than 65535"
- >
- </Info>
-
-
-
- <Info
- helpText="Press back to change the value."
- >
- </Info>
-
- </Page>
-
- <Page
- name="error_need_net"
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-proxy.html"
- subWizard="__WIZ_HOME__/server_wizard/server.wiz"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="false"
- canCancel="true"
- >
-
- <Info
- helpText="Network not configured yet"
- >
- </Info>
-
-
- <Info
- helpText="You have to configure the basic network parameters before launching this wizard."
- >
- </Info>
-
- <Info
- helpText="Press next to configure these parameters now, or Cancel to exit this wizard."
- >
- </Info>
-
-
- <Info
- helpText="If you choose to configure now, you will automatically continue with the Proxy configuration."
- >
- </Info>
- </Page>
-</Wizard>
diff --git a/proxy_wizard/scripts/Squidconf.pm b/proxy_wizard/scripts/Squidconf.pm
deleted file mode 100644
index 56548652..00000000
--- a/proxy_wizard/scripts/Squidconf.pm
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/usr/bin/perl
-
-# Drakwizard
-
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons (adesmons@mandrakesoft.com)
-#
-# 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, or (at your option)
-# any later version.
-#
-# 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.
-
-
-package Squidconf;
-use lib '/usr/lib/libDrakX';
-require "__WIZ_HOME__/common/scripts/Vareqval.pm";
-require "__WIZ_HOME__/common/scripts/Varspaceval.pm";
-require "__WIZ_HOME__/common/scripts/IFCFG.pm";
-use MDK::Common;
-use services;
-use strict;
-use standalone;
-
-sub network_mask {
- my $o = IFCFG->new();
- my $wiz_ip_server = $o->itf_get("IPADDR");
- my $mask = $o->itf_get("NETMASK");
- "$1.$2.$3.0/$mask" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
-}
-
-sub testport {
- if ($ENV{wiz_squid_port} == 3128 || $ENV{wiz_squid_port} == 8080) {
- return 0;
- }
- elsif ($ENV{wiz_squid_port} <= 1024 || $ENV{wiz_squid_port} >= 65536) {
- return 2;
- }
- 1;
-}
-
-sub port {
- my $ret;
- my @lines = grep(/$ENV{wiz_squid_port}\/tcp/, cat_("/etc/services"));
- foreach (@lines) {
- s/\t/ /g;
- $ret .= "\n$_";
- }
- $ret;
-}
-
-sub do_it_squid {
- my $file="/etc/squid/squid.conf";
- -f $file and MDK::Common::cp_af($file, $file.".orig");
- MDK::Common::cp_af("__WIZ_HOME__/proxy_wizard/scripts/squid.conf.default", $file);
- substInFile {
- s|^\s*\#?\s*(cache_dir.*$ENV{wiz_squid_defdir}\s*)\d*(.*)|$1$ENV{wiz_squid_disk}$2|;
- s|^\s*\#?\s*(acl\s*mynetwork\s*src\s*).*$|$1$ENV{wiz_squid_mynetw}\n|;
- s|^\s*\#?\s*(cache_mem\s*)\d*(\s*MB.*)|$1$ENV{wiz_squid_mem}$2|;
- s|^\s*\#?\s*(http_port\s*)\d*(.*)|$1$ENV{wiz_squid_port}$2|;
- } $file;
- print "LEVEL $ENV{'wiz_squid_level'}\n\n";
- exit;
- standalone::explanations("$file: cache_dir = $ENV{wiz_squid_defdir} $ENV{wiz_squid_disk}
-mynetw = $ENV{wiz_squid_mynetw} cache_mem = $ENV{wiz_squid_mem} http_port = $ENV{wiz_squid_port}
-level = $ENV{wiz_squid_level}");
- if ($ENV{wiz_squid_level} == 1) {
- substInFile {
- s|^\s*\#?\s*(http_access\s*)deny(\s*all.*)|\#$&\n$1allow$2|;
- } $file;
- }
- elsif ($ENV{wiz_squid_level} == 2) {
- substInFile {
- s|^\s*\#?\s*(http_access\s*)allow(\s*all.*)|\#$&\n$1deny$2|;
- s|^\s*\#?\s*(http_access\s*allow\s*)localhost|\#$&\n$1mynetwork|;
- } $file;
- }
- elsif ($ENV{wiz_squid_level} == 3) {
- substInFile {
- s|^\s*\#?\s*(http_access\s*)allow(\s*all.*)|\#$&\n$1deny$2|;
- s|^\s*\#?\s*(http_access\s*allow\s*)mynetwork|\#$&\n$1localhost|;
- } $file;
- } else { # should not happen
- die "wiz_squid_level error";
- }
- my $t = 0;
- foreach (cat_($file)) {
- if (/^\s*cache_peer.*/) {
- $t = $_;;
- last;
- }
- }
- if ($ENV{wiz_squid_menupeer} == 1 && length $t) {
- substInFile {
- s|^\s*!\#\s*(cache_peer.*)|\#$&|;
- } $file;
- }
- elsif ($ENV{wiz_squid_menupeer} == 2 && length $ENV{wiz_squid_cachepeer}) {
- if (lenght $t) {
- substInFile {
- s|^\s*\#?\s*(cache_peer.*)|\#$&|;
- } $file;
- }
- append_to_file($file, "cache_peer $ENV{wiz_squid_cachepeer} parent $ENV{wiz_squid_peerport} 3130");
- }
- system("/sbin/chkconfig --level 345 squid on");
- if (services::is_service_running('squid')) {
- services::restart('squid')
- } else {
- services::start('squid')
- }
- 10;
-}
-1;
diff --git a/samba_wizard/Samba.pm b/samba_wizard/Samba.pm
index ffd79c3f..b2c2f3e2 100755
--- a/samba_wizard/Samba.pm
+++ b/samba_wizard/Samba.pm
@@ -1,9 +1,10 @@
#!/usr/bin/perl
# Drakwizard
-
-# Copyright (C) 2002 Arnaud Desmons <adesmons@mandrakesoft.com>
-# Copyright (C) 2003 Florent Villard <warly@mandrakesoft.com>
+# Copyright (C) 2002,2003 Mandrakesoft
+#
+# Authors: Arnaud Desmons <adesmons@mandrakesoft.com>
+# Florent Villard <warly@mandrakesoft.com>
#
# 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
diff --git a/samba_wizard/samba.wiz b/samba_wizard/samba.wiz
deleted file mode 100644
index b802677c..00000000
--- a/samba_wizard/samba.wiz
+++ /dev/null
@@ -1,778 +0,0 @@
-<?xml version="1.0"?>
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="Samba wizard"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/samba_wizard/images/samba.png"
- perlModule="__WIZ_HOME__/samba_wizard/scripts/Smbconf.pm"
- rpm="samba-server"
- summaryFunc="do_it"
->
- <Variable
- name="box_list"
- shellVariable="wiz_box_list"
- >
- </Variable>
- <Variable
- name="hosts_allow"
- shellVariable="wiz_hosts_allow"
- >
- </Variable>
- <Variable
- name="hosts_deny"
- shellVariable="wiz_hosts_deny"
- >
- </Variable>
- <Variable
- name="doFileSharing"
- comment="true if we do file sharing, false otherwise"
- shellVariable="wiz_do_file_sharing"
- >
- </Variable>
- <Variable
- name="level"
- shellVariable="wiz_level"
- >
- </Variable>
- <Variable
- name="all_printers"
- shellVariable="wiz_all_printers"
- >
- </Variable>
- <Variable
- name="wiz_printers"
- shellVariable="wiz_printers"
- >
- </Variable>
- <Variable
- name="doPrinterSharing"
- comment="true if samba do printer sharing"
- shellVariable="wiz_do_printer_sharing"
- >
- </Variable>
- <Variable
- name="doHomes"
- comment="true if samba do printer sharing"
- shellVariable="wiz_do_homes"
- >
- </Variable>
- <Variable
- name="workgroup"
- comment="The workgroup name"
- shellVariable="wiz_workgroup"
- >
- </Variable>
-
- <Variable
- name="shared_dir"
- comment="The workgroup name"
- shellVariable="wiz_dir"
- >
- </Variable>
-
- <Variable
- name="banner"
- comment="The samba server banner name"
- shellVariable="wiz_banner"
- >
- </Variable>
-
- <Variable
- name="write_list"
- shellVariable="wiz_write_list"
- >
- </Variable>
-
- <Variable
- name="read_list"
- shellVariable="wiz_read_list"
- >
- </Variable>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="Welcome"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- <Info
- helpText="Samba Configuration Wizard"
- >
- </Info>
-
-
- <Info
- helpText="Samba allows your server to behave as a file and print server for workstations running non-Linux systems."
- >
- </Info>
-
- <Info
- helpText="This wizard will help you configuring the Samba services of your server."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="ask_workgroup"
- func="check_workgroup"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="error_in_workgroup"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="ask_banner"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="Workgroup"
- >
- </Info>
-
- <Info
- helpText="Samba needs to know the Windows Workgroup it will serve."
- >
- </Info>
- <Freetext
- name="freetext2"
- variableName="workgroup"
- helpText="Workgroup:"
- editable="true"
- fillfunc="get_workgroup"
- >
- </Freetext>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="error_in_workgroup"
- jumpPage="ask_workgroup"
- nextButtonText="Fix it"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- <Info
- helpText="The Workgroup is wrong"
- >
- </Info>
- </Page>
-
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="ask_banner"
- func="check_banner"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="error_in_banner"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="ask_net"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="Server Banner."
- >
- </Info>
-
-
- <Info
- helpText="The banner is the way this server will be described in the Windows workstations."
- >
- </Info>
-
-
- <Freetext
- name="serverBannerInput"
- variableName="banner"
- helpText="Banner:"
- editable="true"
- fillfunc="get_banner"
- >
- </Freetext>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="error_in_banner"
- jumpPage="ask_banner"
- nextButtonText="Fix It"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="The Server Banner is incorrect"
- >
- </Info>
- </Page>
- <Page
- name="ask_net"
- func="chk_level"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- <Target
- targetName="ask_services"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="ask_netmask"
- jumpIndex="2"
- >
- </Target>
- <Info
- helpText="Access control"
- >
- </Info>
-
- <Chooser
- name="chooser1"
- variableName="level"
- helpText="Access level :"
- >
- <Option
- value="1"
- description="All - No access restriction"
- >
- </Option>
-
- <Option
- value="2"
- description="My rules - Ask me allowed and denied hosts"
- >
- </Option>
- </Chooser>
- </Page>
- <Page
- name="ask_netmask"
- jumpPage="ask_services"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- is="level=2"
- >
- <Info
- helpText="Access control"
- >
- </Info>
-
- <Info
- helpText="* Example 1: allow all IPs in 150.203.*.*; except one\nhosts allow = 150.203. EXCEPT 150.203.6.66"
- >
- </Info>
- <Info
- helpText="* Example 2: allow hosts that match the given network/netmask\nhosts allow = 150.203.15.0/255.255.255.0"
- >
- </Info>
- <Info
- helpText="* Example 3: allow a couple of hosts\nhosts allow = lapland, arvidsjaur"
- >
- </Info>
- <Info
- helpText="* Example 4: allow only hosts in NIS netgroup \qfoonet\q, but deny access from one particular host\nhosts allow = @foonet\nhosts deny = pirate"
- >
- </Info>
- <Info
- helpText="Note that access still requires suitable user-level passwords."
- >
- </Info>
-
- <Freetext
- variableName="hosts_allow"
- helpText="Allow hosts:"
- editable="true"
- fillfunc="get_allow_host"
- refresh="true"
- >
- </Freetext>
- <Freetext
- variableName="hosts_deny"
- helpText="Deny hosts:"
- editable="true"
- fillfunc="get_deny_host"
- refresh="true"
- >
- </Freetext>
- </Page>
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="ask_services"
- func="check_services"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="warn_smbpasswd"
- jumpIndex="3"
- >
- </Target>
-
- <Target
- targetName="ask_dir"
- jumpIndex="2"
- >
- </Target>
-
- <Target
- targetName="ask_printers"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="doit"
- jumpIndex="0"
- >
- </Target>
-
- <Info
- helpText="Enabled Samba Services"
- >
- </Info>
-
-
- <Info
- helpText="Samba can provide a common file sharing area to your Windows workstation, and can also provide printer sharing for the printers connected to your server."
- >
- </Info>
-
-
- <Boolean
- name="fileSharingBoolean"
- variableName="doFileSharing"
- forceEnabled="true"
- forceDisabled="false"
- helpText="Enable file sharing area"
- fillfunc="get_file_sharing"
- >
- </Boolean>
-
- <Boolean
- name="printerSharingBoolean"
- variableName="doPrinterSharing"
- forceEnabled="true"
- forceDisabled="false"
- helpText="Enable Server Printer Sharing"
- >
- </Boolean>
- <Boolean
- name="homesSharingBoolean"
- variableName="doHomes"
- forceEnabled="true"
- forceDisabled="false"
- helpText="Make home directories available for their owners"
- fillfunc="get_home_sharing"
- >
- </Boolean>
-
- </Page>
-
- <Page
- name="warn_smbpasswd"
- comment="Warning"
- func="ask_dir"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="ask_dir"
- jumpIndex="2"
- >
- </Target>
-
- <Target
- targetName="ask_printers"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="doit"
- jumpIndex="0"
- >
- </Target>
-
- <Info
- helpText="You have selected to allow user access their home directories via samba but you/they must use smbpasswd to set a password."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="ask_dir"
- is="doFileSharing"
- func="check_dir"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="error_in_dir"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="ask_access"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="Shared directory:"
- >
- </Info>
-
-
- <Info
- helpText="Type the path of the directory you want being shared."
- >
- </Info>
-
- <Freetext
- name="freetext_dir"
- variableName="shared_dir"
- helpText="Shared directory:"
- editable="true"
- fillfunc="get_dir"
- >
- </Freetext>
- </Page>
-
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="ask_access"
- is="doFileSharing"
- func="check_users"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- <Target
- targetName="error_in_acces"
- jumpIndex="2"
- >
- </Target>
-
-
- <Target
- targetName="ask_printers"
- jumpIndex="1"
- >
- </Target>
-
-
- <Target
- targetName="doit"
- jumpIndex="0"
- >
- </Target>
-
- <Info
- helpText="File permissions"
- >
- </Info>
-
-
- <Info
- helpText="Type users or group separated by a comma (groups must be preceded by a \'@\') like this :\nroot, fred, @users, @wheel for each kind of permission."
- >
- </Info>
-
- <Freetext
- variableName="read_list"
- helpText="read list:"
- editable="true"
- fillfunc="get_read"
- help="root, fred, @users, @wheel"
- >
- </Freetext>
- <Freetext
- variableName="write_list"
- helpText="write list:"
- editable="true"
- fillfunc="get_write"
- help="root, fred, @users, @wheel"
- >
- </Freetext>
- </Page>
-
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="ask_printers"
- jumpPage="doit"
- is="doPrinterSharing"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
- <Info
- helpText="Select which printers you want to be accessible from known users"
- >
- </Info>
- <Boolean
- variableName="all_printers"
- helpText="Enable all printers"
- >
- </Boolean>
- <Boolean
- is="all_printers=0"
- variableName="box_list"
- listfunc="list_printers"
- >
- </Boolean>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="error_in_dir"
- jumpPage="ask_dir"
- nextButtonText="Fix it"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="The path you entered does not exist."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="doit"
- func="do_it"
- nextButtonText="Configure"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="catastrophic_exit"
- jumpIndex="2"
- >
- </Target>
-
- <Target
- targetName="done"
- jumpIndex="10"
- >
- </Target>
-
- <Info
- helpText="Configuring Samba"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters
-needed to configure Samba."
- >
- </Info>
-
- <Freetext
- name="freetext3"
- variableName="workgroup"
- helpText="Workgroup:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext4"
- variableName="banner"
- helpText="Server Banner:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext"
- variableName="doFileSharing"
- helpText="File Sharing:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext"
- variableName="shared_dir"
- helpText="Shared directory:"
- editable="false"
- >
- </Freetext>
-
-
- <Freetext
- name="freetext1"
- variableName="doPrinterSharing"
- helpText="Print Server:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext2"
- variableName="doHomes"
- helpText="Home:"
- editable="false"
- >
- </Freetext>
-
-
- <Freetext
- name="freetext5"
- helpText="Printers:"
- editable="false"
- fillfunc="get_printers"
- >
- </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
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="done"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Congratulations"
- >
- </Info>
-
-
- <Info
- helpText="The wizard successfully configured your Samba server."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="catastrophic_exit"
- comment="Exit in case of catastrophic system error"
- nextButtonText="Exit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Something terrible happened"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="error_need_root"
- comment="Error: this wizard must run as root."
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="This Wizard needs to run as root"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="error_need_net"
- subWizard="__WIZ_HOME__/server_wizard/server.wiz"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="false"
- canCancel="true"
- >
-
- <Info
- helpText="Network not configured yet"
- >
- </Info>
-
-
- <Info
- helpText="You have to configure the basic network parameters before launching this wizard."
- >
- </Info>
-
- <Info
- helpText="Press next to configure these parameters now, or Cancel to exit this wizard."
- >
- </Info>
-
-
- <Info
- helpText="If you choose to configure now, you will automatically continue with the SAMBA configuration"
- >
- </Info>
- </Page>
-</Wizard>
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm
deleted file mode 100755
index 253b9c0c..00000000
--- a/samba_wizard/scripts/Smbconf.pm
+++ /dev/null
@@ -1,339 +0,0 @@
-#!/usr/bin/perl
-
-# Drakwizard
-
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons (adesmons@mandrakesoft.com)
-#
-# 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, or (at your option)
-# any later version.
-#
-# 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.
-
-package Smbconf;
-use lib '/usr/lib/libDrakX';
-require "__WIZ_HOME__/common/scripts/Vareqval.pm";
-require "__WIZ_HOME__/common/scripts/IFCFG.pm";
-use MDK::Common;
-use strict;
-use services;
-use Data::Dumper;
-
-# All possibilies in the config file must be precedeed by ";"
-# This script can just comment, uncomment or/and change values
-# but can not add anything.
-# so one variable cannot be commented and not in the same file.
-
-my $o = IFCFG->new();
-
-sub check {
- $> and return 1;
- $o->is_dhcp() and return 2;
- 0;
-}
-
-sub check_services {
- $ENV{wiz_do_homes} and return 3;
- $ENV{wiz_do_file_sharing} and return 2;
- $ENV{wiz_do_printer_sharing} and return 1;
- 0;
-}
-
-sub check_dir {
- -d ($ENV{wiz_dir}) and return 10;
- 1;
-}
-
-# the "__" before comment is to avoid conflicts with possible "comment" variable
-# for variables value is in value key and comment idem (no risque of conflict)
-
-sub read_conf {
- my $self = {};
- my ($file) = @_;
- my $menu;
- my @tab;
- my %conf;
-
- open(FH, $file) or die "$! ($file)";
- while (<FH>) {
- if (/^(\s*\;?\s*)\[(.*)\].*/) {
- $menu = $2;
- $conf{$menu}{__comment} = $1;
- }
- elsif (/^(?!\#)(\s*\;*\s*)(.*?)\s*=\s*(.*)\s*$/) {
- $conf{$menu}{$2}{value} = $3;
- $conf{$menu}{$2}{comment} = $1;
- }
- push @tab, $_;
- }
- $self->{conf} = \%conf;
- $self->{tab} = \@tab;
- bless $self;
-}
-
-# we parse @tab to check for values in the struct.
-
-sub write_conf {
- my $self = shift;
- my ($file) = @_;
- my $menu;
-
- open(FH, "> $file") or die "$!";
- foreach (@{$self->{tab}}) {
- if (/^\s*\;?\s*\[(.*)\].*/) {
- $menu = $1;
- print FH "$self->{conf}->{$menu}{__comment}"."[$menu]\n";
- }
- elsif (/^(?!\#)\s*\;*\s*(.*?)\s*=/) {
- print FH "$self->{conf}->{$menu}{$1}{comment}"."$1" ." = ". "$self->{conf}->{$menu}{$1}{value}\n";
- }
- else {
- print FH $_;
- }
- }
-}
-
-#section has the name of the printer
-sub add_printer {
- my $self = shift;
- my ($printer) = @_;
-
- if (exists $self->{conf}->{$printer}) {
- $self->comment_menu($printer, " ");
- }
- else {
- $self->{conf}->{$printer}{printable}{comment} = " ";
- $self->{conf}->{$printer}{printer}{comment} = " ";
- push @{$self->{tab}}, "[$printer]\n";
- push @{$self->{tab}}, "printer = $printer\n";
- push @{$self->{tab}}, "printable = yes\n";
- $self->{conf}->{$printer}{printer}{value} = $printer;
- $self->{conf}->{$printer}{printable}{value} = "yes";
- }
-}
-
-sub list_printers {
- my @list if 0;
-
- return @list if @list;
- @list = sort grep /^(?!\#).*/, map {
- my ($printer) = split(':', $_);
- } cat_("/etc/printcap");
-}
-
-
-sub check_users {
- return 1 if $ENV{wiz_do_printer_sharing};
- 0;
-}
-
-sub comment_menu {
- my $self = shift;
- my ($menu, $str) = @_;
-
- return if (!$menu or !exists $self->{conf}->{$menu});
- $self->{conf}->{$menu}{__comment} = $str;
- foreach (keys %{$self->{conf}->{$menu}}) {
- ($_ eq "__comment") and next;
- $self->{conf}->{$menu}{$_}{comment} = $str;
- }
-}
-
-sub comment_var {
- my $self = shift;
- my ($menu, $var, $str) = @_;
-
- $self->{conf}->{$menu}{$var}{comment} = $str;
-}
-
-sub chg_var {
- my $self = shift;
- my ($menu, $var, $str) = @_;
-
- $self->{conf}->{$menu}{$var}{value} = $str;
-}
-
-# all or selected printers
-sub printer_sharing {
- my $self = shift;
-
- if ($ENV{wiz_all_printers}) {
- $self->comment_menu("printers", " ");
- foreach my $printer (keys (%::bool)) {
- $self->comment_menu($printer, ";");
- }
- }
- else {
- $self->comment_menu("printers", ";");
- foreach my $printer (keys (%::bool)) {
- if (int($::bool{$printer})) {
- $self->comment_menu($printer, " ");
- $self->add_printer($printer);
- }
- else {
- $self->comment_menu($printer, ";");
- }
- }
- }
-}
-
-sub get_printers {
- if ($ENV{wiz_do_printer_sharing}) {
- my $string;
- $ENV{wiz_all_printers} and return "all printers";
- foreach (keys (%::bool)) {
- $string .= "$_, " if int($::bool{$_});
- }
- "$string";
- }
- else {
- "disabled";
- }
-}
-
-sub check_workgroup {
- !$ENV{wiz_workgroup} and return 1;
- 10;
-}
-
-sub ask_acces {
- 10;
-}
-
-my $old = read_conf("/etc/samba/smb.conf");
-
-sub get_write {
- $old->{conf}->{public}{"write list"}{value};
-}
-
-sub get_read {
- $old->{conf}->{public}{"read list"}{value};
-}
-
-sub check_banner {
- !$ENV{wiz_banner} and return 1;
- 10;
-}
-
-sub get_workgroup {
- $old->{conf}->{global}{workgroup}{value};
-}
-
-sub get_banner {
- $old->{conf}->{global}{"server string"}{value};
-}
-
-sub ask_dir {
- return 2 if $ENV{wiz_do_file_sharing};
- return 1 if $ENV{wiz_do_printer_sharing};
- 0;
-}
-
-sub get_dir {
- $old->{conf}->{public}{path}{value};
-}
-
-sub get_file_sharing {
- return 0 if ($old->{conf}->{public}{__comment} =~ /\;|\#/);
- 1;
-}
-
-sub get_home_sharing {
- return 0 if ($old->{conf}->{homes}{__comment} =~ /\;|\#/);
- 1;
-}
-
-sub get_netmask {
- "192.168.100.1/255.255.255.0";
-}
-
-sub get_allow_host {
- $old->{conf}->{global}{"hosts allow"}{value};
-}
-
-sub get_deny_host {
- $old->{conf}->{global}{"hosts deny"}{value};
-}
-
-sub chk_level {
-# if ($ENV{wiz_level} == 2) {
-# $ENV{wiz_allow_allow} = "toto";
-# $ENV{wiz_allow_allow} = "toto";
-# }
-# else {
-# $ENV{wiz_hosts_deny} = "tata";
-# $ENV{wiz_hosts_deny} = "tata";
-# }
-# if ($ENV{wiz_level} == 3) {
-# $ENV{wiz_allow_allow} = "toto";
-# $ENV{wiz_allow_allow} = "toto";
-# }
-# else {
-# $ENV{wiz_hosts_deny} = "tata";
-# $ENV{wiz_hosts_deny} = "tata";
-# }
- $ENV{wiz_level};
-}
-
-# remember one variable cannot be commented and not in the same file.
-sub do_it {
- my $file = "__WIZ_HOME__/samba_wizard/scripts/smb.conf.default";
-
- my $conf = read_conf($file);
- $conf->chg_var("global", "workgroup", $ENV{wiz_workgroup});
- $conf->chg_var("global", "server string", $ENV{wiz_banner});
- $conf->chg_var("public", "write list", $ENV{wiz_write_list}) if $ENV{wiz_do_file_sharing};
- $conf->chg_var("public", "read list", $ENV{wiz_read_list}) if $ENV{wiz_do_file_sharing};
- my $ip = $o->itf_get("IPADDR");
- if ($ENV{wiz_do_file_sharing}) {
- standalone->explanations("Enabling $ENV{wiz_dir} samba file sharing");
- $conf->comment_menu("public", " ");
- $conf->chg_var("public", "path", $ENV{wiz_dir});
- }
- else {
- standalone->explanations("Disabling samba file sharing");
- $conf->comment_menu("public", ";");
- }
- if ($ENV{wiz_do_homes}) {
- standalone->explanations("Enabling samba homes sharing");
- $conf->comment_menu("homes", " ");
- }
- else {
- standalone->explanations("Disabling samba homes sharing");
- $conf->comment_menu("homes", ";");
- }
- standalone->explanations("Samba deny $ENV{wiz_hosts_deny}");
- standalone->explanations("Samba allow $ENV{wiz_hosts_allow}");
-# $conf->chg_var("global", "hosts deny", $ENV{wiz_hosts_deny});
-# $conf->chg_var("global", "hosts allow", $ENV{wiz_hosts_allow});
-
- if ($ENV{wiz_do_printer_sharing}) {
- standalone->explanations("Enabling printer sharing");
- $conf->printer_sharing();
- }
- else {
- standalone->explanations("Disabling printer sharing");
- foreach my $printer (keys (%::bool)) {
- if (!int($::bool{$printer})) {
- $conf->comment_menu("$printer", ";");
- }
- }
- $conf->comment_menu("printers", ";");
- }
- $conf->write_conf("/etc/samba/smb.conf");
- if (services::is_service_running('smb')) {
- services::restart('smb')
- } else {
- services::start('smb')
- }
- 10;
-}
-1;
diff --git a/time_wizard/scripts/NTPConf.pm b/time_wizard/scripts/NTPConf.pm
deleted file mode 100644
index efcc838d..00000000
--- a/time_wizard/scripts/NTPConf.pm
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-
-# NTP Config Parser
-
-# Copyright (C) 2002 MandrakeSoft Arnaud Desmons <adesmons@mandrakesoft.com>
-#
-# 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, or (at your option)
-# any later version.
-#
-# 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.
-
-package NTPConf;
-require "__WIZ_HOME__/common/scripts/Vareqval.pm";
-use MDK::Common;
-use strict;
-use standalone;
-
-sub chooser4 {
- if ($ENV{chooser4} eq "save_quit") {
- do_it();
- return 1;
- }
- 2;
-}
-
-sub test {
- system("/usr/sbin/ntpdate -q $ENV{server1} $ENV{server2}");
- if (!($? >> 8)) {
- do_it();
- return 1;
- }
- 2;
-}
-
-sub do_it {
- my $file = "/etc/sysconfig/clock";
- MDK::Common::cp_af($file, $file.".orig");
- open(NEW, "> $file") or die "can not open $file: $!";
- print NEW "UTC=true\n";
- print NEW "ZONE=$ENV{wiz_timezone}\n";
- print NEW "ARC=false\n";
- close NEW or die "can not close $file: $!";
- MDK::Common::cp_af("/usr/share/zoneinfo/$ENV{wiz_timezone}", "/etc/localtime");
- -f "/etc/ntp/step-tickers" and MDK::Common::cp_af("/etc/ntp/step-tickers", "/etc/ntp/step-tickers.orig");
- open(NEW, "> /etc/ntp/step-tickers") or die "can not open /etc/ntp/step-tickers: $!";
- print NEW $ENV{server1}."\n";
- print NEW $ENV{server2}."\n";
- close NEW or die "can not close /etc/ntp/step-tickers: $!";
- substInFile { s/(# server clock.via.net)/$1\nserver $ENV{server1}/ } '/etc/ntp.conf' if -f '/etc/ntp.conf';
- standalone::explanations("Wrote /etc/ntp/step-tickers, starting services");
- my @services = qw(crond atd ntpd);
- foreach (@services) {
- system("/etc/rc.d/init.d/$_ stop");
- }
- foreach (reverse @services) {
- system("/etc/rc.d/init.d/$_ start");
- }
- system("/sbin/hwclock --systohc --utc");
- 10;
-}
-1;
diff --git a/time_wizard/scripts/compute_liste.sh b/time_wizard/scripts/compute_liste.sh
deleted file mode 100755
index 287808fb..00000000
--- a/time_wizard/scripts/compute_liste.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/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 time configuration
-#
-# echo on stdout liste & description (same) of timezone
-
-# zoneinfo directory probably exists, but
-[ -d /usr/share/zoneinfo ] || exit 1
-
-echo_debug "timezone list"
-
-cd /usr/share/zoneinfo && find [A-Z]* -type f | sort
-
diff --git a/time_wizard/time.wiz b/time_wizard/time.wiz
deleted file mode 100644
index ac746ab2..00000000
--- a/time_wizard/time.wiz
+++ /dev/null
@@ -1,647 +0,0 @@
-<?xml version="1.0"?>
-
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="Time wizard"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/time_wizard/images/Time.png"
- perlModule="__WIZ_HOME__/time_wizard/scripts/NTPConf.pm"
- rpm="ntp"
- summaryFunc="do_it"
->
-
- <Variable
- name="chooser1"
- shellVariable="chooser1"
- >
- </Variable>
-
- <Variable
- name="varserver1"
- shellVariable="server1"
- >
- </Variable>
-
-
- <Variable
- name="varserver2"
- shellVariable="server2"
- >
- </Variable>
-
-
- <Variable
- name="chooser4"
- shellVariable="chooser4"
- >
- </Variable>
-
- <Variable
- name="wiz_timezone"
- shellVariable="wiz_timezone"
- >
- </Variable>
-
- <Variable
- name="wiz_time_ok"
- shellVariable="wiz_time_ok"
- defaultValue="ok"
- >
- </Variable>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-time.html"
- name="welcome"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="This wizard will help you to set the time of your server synchronized with an external time server."
- >
- </Info>
-
- <Info
- helpText="Thus your server will be the local time server for your network."
- >
- </Info>
-
- <Info
- helpText="press next to begin, or cancel to leave this wizard"
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-time.html"
- name="choose_server"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Time Servers"
- >
- </Info>
-
-
- <Info
- helpText="Select a primary and secondary server from the list."
- >
- </Info>
-
- <Info
- helpText="(please, choose servers in your geographical area)"
- >
- </Info>
-
-
- <Chooser
- name="chooserserver1"
- variableName="varserver1"
- helpText="Primary Time Server:"
- editable="true"
- >
- <Option
- value="bernina.ethz.ch"
- description="Swiss Fed. Inst. of Technology"
- >
- </Option>
-
- <Option
- value="clock.nc.fukuoka-u.ac.jp"
- description="Fukuoka university, Fukuoka, Japan"
- >
- </Option>
-
- <Option
- value="clock.psu.edu"
- description="Penn State University, University Park, PA"
- >
- </Option>
-
- <Option
- value="clock.tricity.wsu.edu"
- description="Washington State University Tri-Cities, Richland, Wa"
- >
- </Option>
-
- <Option
- value="constellation.ecn.uoknor.edu"
- description="University of Oklahoma, Norman, Oklahoma, USA"
- >
- </Option>
-
- <Option
- value="fartein.ifi.uio.no"
- description="University of Oslo, Norway"
- >
- </Option>
-
- <Option
- value="ntp.adelaide.edu.au"
- description="University of Adelaide, South Australia"
- >
- </Option>
-
- <Option
- value="ntp.cs.strath.ac.uk"
- description="Dept. Computer Science, Strathclyde University, Glasgow, Scotland"
- >
- </Option>
-
- <Option
- value="ntp.shim.org"
- description="Singapore"
- >
- </Option>
-
- <Option
- value="ntp.tmc.edu"
- description="Baylor College of Medicine, Houston, Tx"
- >
- </Option>
-
- <Option
- value="ntp1.cmc.ec.gc.ca"
- description="Canadian Meteorological Centre, Dorval, Quebec, Canada"
- >
- </Option>
-
- <Option
- value="ntp1.cs.wisc.edu"
- description="Computer Science Department, University of Wisconsin-Madison"
- >
- </Option>
-
- <Option
- value="ntp2a.mcc.ac.uk"
- description="University of Manchester, Manchester, England"
- >
- </Option>
-
- <Option
- value="sign.chg.ru"
- description="Scientific Center in Chernogolovka, Moscow region, Russia"
- >
- </Option>
-
- <Option
- value="salmon.maths.tcd.ie"
- description="Trinity College, Dublin, Ireland"
- >
- </Option>
-
- <Option
- value="slug.ctv.es"
- description="Altea (Alicante/SPAIN)"
- >
- </Option>
-
- <Option
- value="time.nrc.ca"
- description="National Research Council of Canada, Ottawa, Ontario, Canada"
- >
- </Option>
-
- <Option
- value="time.nuri.net"
- description="Inet, Inc., Seoul, Korea"
- >
- </Option>
-
- <Option
- value="tock.cs.unlv.edu"
- description="UNLV College of Engineering, Las Vegas, NV"
- >
- </Option>
-
- <Option
- value="timelord.uregina.ca"
- description="University of Regina, Regina, Saskatchewan, Canada"
- >
- </Option>
-
- <Option
- value="bitsy.mit.edu"
- description="MIT Information Systems, Cambridge, MA"
- >
- </Option>
-
- <Option
- value="lock.cuhk.edu.hk"
- description="The Chinese University of Hong Kong"
- >
- </Option>
-
- <Option
- value="ntp.univ-lyon1.fr"
- description="CISM, Lyon, France"
- >
- </Option>
-
- <Option
- value="ntp.laas.fr"
- description="LAAS/CNRS, Toulouse, France"
- >
- </Option>
-
- <Option
- value="ntp.unilim.fr"
- description="SCI, Universite de Limoges, France"
- >
- </Option>
-
- <Option
- value="ntp2.unicaen.fr"
- description="CRIUC, Universite de Caen, France"
- >
- </Option>
-
- <Option
- value="ntp.u-psud.fr"
- description="CRI, Campus d'Orsay, Universite Paris Sud, France"
- >
- </Option>
-
- <Option
- value="ntp.loria.fr"
- description="Loria, Nancy, France"
- >
- </Option>
- </Chooser>
-
- <Chooser
- name="chooserserver2"
- variableName="varserver2"
- helpText="Secondary Time Server:"
- helpFontName="Default"
- helpFontStyle="plain"
- helpFontSize="12"
- editable="true"
- >
-
- <Option
- value="bernina.ethz.ch"
- description="Swiss Fed. Inst. of Technology"
- >
- </Option>
-
- <Option
- value="clock.nc.fukuoka-u.ac.jp"
- description="Fukuoka university, Fukuoka, Japan"
- >
- </Option>
-
- <Option
- value="clock.psu.edu"
- description="Penn State University, University Park, PA"
- >
- </Option>
-
- <Option
- value="clock.tricity.wsu.edu"
- description="Washington State University Tri-Cities, Richland, Wa"
- >
- </Option>
-
- <Option
- value="constellation.ecn.uoknor.edu"
- description="University of Oklahoma, Norman, Oklahoma, USA"
- >
- </Option>
-
- <Option
- value="fartein.ifi.uio.no"
- description="University of Oslo, Norway"
- >
- </Option>
-
- <Option
- value="ntp.adelaide.edu.au"
- description="University of Adelaide, South Australia"
- >
- </Option>
-
- <Option
- value="ntp.cs.strath.ac.uk"
- description="Dept. Computer Science, Strathclyde University, Glasgow, Scotland"
- >
- </Option>
-
- <Option
- value="ntp.shim.org"
- description="Singapore"
- >
- </Option>
-
- <Option
- value="ntp.tmc.edu"
- description="Baylor College of Medicine, Houston, Tx"
- >
- </Option>
-
- <Option
- value="ntp1.cmc.ec.gc.ca"
- description="Canadian Meteorological Centre, Dorval, Quebec, Canada"
- >
- </Option>
-
- <Option
- value="ntp1.cs.wisc.edu"
- description="Computer Science Department, University of Wisconsin-Madison"
- >
- </Option>
-
- <Option
- value="ntp2a.mcc.ac.uk"
- description="University of Manchester, Manchester, England"
- >
- </Option>
-
- <Option
- value="sign.chg.ru"
- description="Scientific Center in Chernogolovka, Moscow region, Russia"
- >
- </Option>
-
- <Option
- value="salmon.maths.tcd.ie"
- description="Trinity College, Dublin, Ireland"
- >
- </Option>
-
- <Option
- value="slug.ctv.es"
- description="Altea (Alicante/SPAIN)"
- >
- </Option>
-
- <Option
- value="time.nrc.ca"
- description="National Research Council of Canada, Ottawa, Ontario, Canada"
- >
- </Option>
-
- <Option
- value="time.nuri.net"
- description="Inet, Inc., Seoul, Korea"
- >
- </Option>
-
- <Option
- value="tock.cs.unlv.edu"
- description="UNLV College of Engineering, Las Vegas, NV"
- >
- </Option>
-
- <Option
- value="timelord.uregina.ca"
- description="University of Regina, Regina, Saskatchewan, Canada"
- >
- </Option>
-
- <Option
- value="bitsy.mit.edu"
- description="MIT Information Systems, Cambridge, MA"
- >
- </Option>
-
- <Option
- value="lock.cuhk.edu.hk"
- description="The Chinese University of Hong Kong"
- >
- </Option>
-
- <Option
- value="ntp.univ-lyon1.fr"
- description="CISM, Lyon, France"
- >
- </Option>
-
- <Option
- value="ntp.laas.fr"
- description="LAAS/CNRS, Toulouse, France"
- >
- </Option>
-
- <Option
- value="ntp.unilim.fr"
- description="SCI, Universite de Limoges, France"
- >
- </Option>
-
- <Option
- value="ntp2.unicaen.fr"
- description="CRIUC, Universite de Caen, France"
- >
- </Option>
-
- <Option
- value="ntp.u-psud.fr"
- description="CRI, Campus d'Orsay, Universite Paris Sud, France"
- >
- </Option>
-
- <Option
- value="ntp.loria.fr"
- description="Loria, Nancy, France"
- >
- </Option>
- <Option
- value="ntp.u-psud.fr"
- description="CRI, Campus d'Orsay, Universite Paris Sud, France"
- >
- </Option>
-
- <Option
- value="ntp.loria.fr"
- description="Loria, Nancy, France"
- >
- </Option>
-
- </Chooser>
-
- <Chooser
- name="chooserwiz_timezone"
- variableName="wiz_timezone"
- defaultOptionScript="get_var wiz_timezone"
- fillScript="__WIZ_HOME__/time_wizard/scripts/compute_liste.sh"
- helpText="Choose a time zone:"
- editable="false"
- >
- </Chooser>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-time.html"
- name="test_server"
- func="test"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="server_not_responding"
- jumpIndex="2"
- >
- </Target>
-
- <Target
- targetName="ciao"
- jumpIndex="1"
- >
- </Target>
-
- <Info
- helpText="Testing the time servers availability"
- >
- </Info>
-
-
- <Info
- helpText="If the time server is not immediately available (network or other reason), there will be about a 30 second delay."
- >
- </Info>
-
-
- <Info
- helpText="Press next to start the time servers test."
- >
- </Info>
-
-
- <Freetext
- name="freetext1"
- variableName="varserver1"
- helpText="Primary Time Server:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext2"
- variableName="varserver2"
- helpText="Secondary Time Server:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext3"
- variableName="wiz_timezone"
- helpText="Time zone:"
- editable="false"
- >
- </Freetext>
-
- </Page>
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-time.html"
- name="server_not_responding"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- func="chooser4"
- >
-
-
- <Target
- targetName="ciao"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="test_server"
- jumpIndex="2"
- >
- </Target>
-
- <Info
- helpText="WARNING"
- >
- </Info>
-
- <Info
- helpText="The time servers are not responding. The causes could be:"
- >
- </Info>
-
- <Info
- helpText="- non existent time servers"
- >
- </Info>
-
- <Info
- helpText="- no outside network"
- >
- </Info>
-
- <Info
- helpText="- other reasons..."
- >
- </Info>
-
-
- <Info
- helpText="You can try again to contact time servers, or save configuration without actually setting time."
- >
- </Info>
-
- <Chooser
- name="chooser4"
- variableName="chooser4"
- helpFontName="Default"
- helpFontStyle="plain"
- helpFontSize="12"
- editable="false"
- >
-
- <Option
- value="try_again"
- description="Try again"
- >
- </Option>
-
- <Option
- value="save_quit"
- description="Save config without test"
- >
- </Option>
- </Chooser>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-time.html"
- name="ciao"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
-
- <Info
- helpText="Time server configuration saved"
- >
- </Info>
-
-
- <Info
- helpText="Your server can now act as a time server for your local network."
- >
- </Info>
-
- </Page>
-</Wizard>
diff --git a/web_wizard/Apache.pm b/web_wizard/Apache.pm
index 5249446d..0d2fc4a2 100755
--- a/web_wizard/Apache.pm
+++ b/web_wizard/Apache.pm
@@ -2,8 +2,10 @@
# Drakwizard
-# Copyright (C) 2002 Arnaud Desmons <adesmons@mandrakesoft.com>
-# 2003 Florent Villard <warly@mandrakesoft.com>
+# Copyright (C) 2002, 2003 Mandrakesoft
+#
+# Authors: Arnaud Desmons <adesmons@mandrakesoft.com>
+# Florent Villard <warly@mandrakesoft.com>
#
# 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
diff --git a/web_wizard/apache2.wiz b/web_wizard/apache2.wiz
deleted file mode 100644
index 51de8c9a..00000000
--- a/web_wizard/apache2.wiz
+++ /dev/null
@@ -1,379 +0,0 @@
-<?xml version="1.0"?>
-
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="Web wizard"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/web_wizard/images/apache.png"
- perlModule="__WIZ_HOME__/web_wizard/scripts/Apache2conf.pm"
- rpm="apache2"
- summaryFunc="do_it"
->
-
- <Variable
- name="wiz_web_internal"
- shellVariable="wiz_web_internal"
- defaultValue="1"
- >
- </Variable>
-
- <Variable
- name="wiz_web_external"
- shellVariable="wiz_web_external"
- defaultValue="1"
- >
- </Variable>
-
- <Variable
- name="user_mod"
- shellVariable="wiz_user_mod"
- >
- </Variable>
-
- <Variable
- name="user_dir"
- shellVariable="wiz_user_dir"
- >
- </Variable>
-
- <Variable
- name="shared_dir"
- shellVariable="wiz_dir"
- >
- </Variable>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="welcome"
- func="check"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="web connections"
- jumpIndex="0"
- >
- </Target>
-
- <Target
- targetName="must be root"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="error_dhcp"
- jumpIndex="2"
- >
- </Target>
-
- <Info
- helpText="Web Server Configuration Wizard"
- >
- </Info>
-
-
- <Info
- helpText="This wizard will help you configuring the Web Server for your network."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="must be root"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Sorry, you must be root to do this..."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="error_dhcp"
- jumpPage="web connections"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Warning\nYou are in dhcp, server may not work with your configuration."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="web connections"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Web Server"
- >
- </Info>
-
-
- <Info
- helpText="Your server can act as a Web Server toward your internal network (intranet) and as a Web Server for the Internet."
- >
- </Info>
-
-
- <Info
- helpText="Select the kind of Web service you want to activate:"
- >
- </Info>
-
-
- <Boolean
- name="wiz_web_internal"
- variableName="wiz_web_internal"
- forceEnabled="1"
- forceDisabled="0"
- helpText="Enable the Web Server for the Intranet"
- >
- </Boolean>
-
-
- <Boolean
- name="wiz_web_external"
- variableName="wiz_web_external"
- forceEnabled="1"
- forceDisabled="0"
- helpText="Enable the Web Server for the Internet"
- >
- </Boolean>
-
-
- <Info
- helpText="Don't check any box if you don't want to activate your Web Server."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="ask_mod"
- func="is_user_mod"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="ask_dir"
- jumpIndex="0"
- >
- </Target>
-
-
- <Target
- targetName="ask_user_dir"
- jumpIndex="1"
- >
- </Target>
-
- <Info
- helpText="Modules :"
- >
- </Info>
-
-
- <Info
- helpText="* User module : allows users to have a directory in their home directories available on your http server via http://www.yourserver.com/~user, you will be asked for the name of this directory afterward."
- >
- >
- </Info>
-
- <Boolean
- variableName="user_mod"
- helpText="activate user module"
- fillfunc="is_last_user_mod"
- help="Allows users to get a directory in their homes directories available on your http server via http://www.yourserver.com/~user."
- >
- </Boolean>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="ask_user_dir"
- func="check_dir"
- is="user_mod"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Type the name of the directory users should create in their homes (whitout ~/) to get it available via http://www.yourserver.com/~user"
- >
- </Info>
-
- <Freetext
- variableName="user_dir"
- helpText="user http sub-directory : ~/"
- editable="true"
- fillfunc="get_user_dir"
- help="Type the name of the directory users should create in their homes (whitout ~/) to get it available via http://www.yourserver.com/~user"
- >
- </Freetext>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="ask_dir"
- func="check_dir"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="error_in_dir"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="confirmation"
- jumpIndex="10"
- >
- </Target>
-
-
- <Info
- helpText="Type the path of the directory you want being the document root."
- >
- </Info>
-
- <Freetext
- variableName="shared_dir"
- helpText="Document Root:"
- editable="true"
- fillfunc="get_docroot"
- >
- </Freetext>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="error_in_dir"
- jumpPage="ask_dir"
- nextButtonText="Fix it"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="The path you entered does not exist."
- >
- </Info>
- </Page>
-
-
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="confirmation"
- func="do_it"
- jumpPage="congratulations"
- nextButtonText="Configure"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Configuring the Web Server"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters needed to configure your Web Server"
- >
- </Info>
-
-
- <Freetext
- name="freetext1"
- variableName="wiz_web_internal"
- helpText="Intranet web server:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext2"
- variableName="wiz_web_external"
- helpText="Internet web server:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- variableName="shared_dir"
- helpText="Document root:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- variableName="user_dir"
- helpText="User directory:"
- 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
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="congratulations"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Congratulations"
- >
- </Info>
-
-
- <Info
- helpText="The wizard successfully configured your Intranet/Internet Web Server"
- >
- </Info>
- </Page>
-</Wizard>
diff --git a/web_wizard/scripts/Apache2conf.pm b/web_wizard/scripts/Apache2conf.pm
deleted file mode 100644
index 94d284ce..00000000
--- a/web_wizard/scripts/Apache2conf.pm
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/bin/perl
-
-package Apache2conf;
-require "__WIZ_HOME__/common/scripts/Varspaceval.pm";
-require "__WIZ_HOME__/common/scripts/IFCFG.pm";
-use MDK::Common;
-
-use strict;
-
-my $o = IFCFG->new();
-
-sub check {
- $> and return 1;
- $o->is_dhcp() and return 2;
- 0;
-}
-
-a
-my $file = "/etc/httpd/conf/httpd2.conf";
-my $root;
-
-if (-f $file) {
- open(FH, "< $file") or die "$! ($file)";
- while (<FH>) {
- if (/^\s*\#?\s*DocumentRoot\s+(.*)/) {
- close(FH);
- $root = "$1";
- last;
- }
- }
- close(FH);
-}
-
-sub get_docroot {
- $root;
-}
-
-sub check_dir {
- -d ($ENV{wiz_dir}) and return 10;
- 1;
-}
-
-sub chg_docroot {
- my $old;
- substInFile {
- s|(^\s*\#?\s*DocumentRoot\s*)(\S*).*|$1$ENV{wiz_dir}| and $old ||=$2;
- } "/etc/httpd/conf/httpd2.conf";
-
- print "DEBUG $old";
- substInFile {
- s|^\s*<Directory\s*$old/?>|<Directory $ENV{wiz_dir}>|;
- } "/etc/httpd/conf/commonhttpd.conf" if $old;
-
- substInFile {
- s|^\s*<Directory\s*/var/www/html/?>|<Directory $ENV{wiz_dir}>|;
- } "/etc/httpd/conf/commonhttpd.conf";
-}
-
-sub is_user_mod {
- if ($ENV{wiz_user_mod}) {
- return 1;
- }
- $ENV{wiz_user_dir} = "disabled";
- 0;
-}
-
-sub is_last_user_mod {
- my $root = get_user_dir();
- chomp($root);
- !($root eq 'disabled');
-}
-
-sub get_user_dir {
- my %conf = Varspaceval->get("/etc/httpd/conf/commonhttpd.conf");
- $conf{UserDir};
-}
-
-sub chg_user_dir {
- my $root = get_user_dir();
- if ($ENV{wiz_user_mod}) {
- substInFile {
- s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g;
- } "/etc/httpd/conf/commonhttpd.conf";
- substInFile {
- s|(\s*)UserDir\s*$root(/?)|$1UserDir $ENV{wiz_user_dir}$2|g;
- s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g;
- } "/etc/httpd/conf/commonhttpd.conf";
- }
- else {
- substInFile {
- s|(\s*)UserDir\s*$root(/?)|$1UserDir disabled$2|g;
- } "/etc/httpd/conf/commonhttpd.conf";
- }
- 10;
-}
-
-sub do_it {
- my $file = "/etc/httpd/conf/commonhttpd.conf";
- my $that = "localhost";
-
- if ($ENV{wiz_web_external} eq "1") {
- $that = "all";
- }
- elsif ($ENV{wiz_web_internal} eq "1") {
- ($that) = $o->itf_get("IPADDR") =~ qr/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.)\d{1,3}$/;
- $that .= " 127.0.0.1";
- }
- cp_af($file, $file.".orig");
- substInFile {
- if( m /^\s*<Directory.*>/s...m/^\s*<\/Directory>/s ) {
- { s /^\s*Allow .*$/ Allow from $that\n/s;}
- ;}
- } $file;
- chg_docroot();
- chg_user_dir();
- system("/etc/rc.d/init.d/httpd restart");
- 10;
-}
-
-1;
diff --git a/web_wizard/scripts/Webconf.pm b/web_wizard/scripts/Webconf.pm
deleted file mode 100644
index a787ac37..00000000
--- a/web_wizard/scripts/Webconf.pm
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/usr/bin/perl
-
-package Webconf;
-require "__WIZ_HOME__/common/scripts/Varspaceval.pm";
-require "__WIZ_HOME__/common/scripts/IFCFG.pm";
-use MDK::Common;
-
-use strict;
-
-my $o = IFCFG->new();
-
-sub check {
- $> and return 1;
- $o->is_dhcp() and return 2;
- 0;
-}
-
-my $file = "/etc/httpd/conf/httpd.conf";
-my $root;
-
-if (-f $file) {
- open(FH, "< $file") or die "$! ($file)";
- while (<FH>) {
- if (/^\s*\#?\s*DocumentRoot\s+(.*)/) {
- close(FH);
- $root = "$1";
- last;
- }
- }
- close(FH);
-}
-
-sub get_docroot {
- $root;
-}
-
-sub check_dir {
- -d ($ENV{wiz_dir}) and return 10;
- 1;
-}
-
-sub chg_docroot {
- my $old;
- substInFile {
- s|(^\s*\#?\s*DocumentRoot\s*)(\S*).*|$1$ENV{wiz_dir}| and $old ||=$2;
- } "/etc/httpd/conf/httpd.conf";
-
- print "DEBUG $old";
- substInFile {
- s|^\s*<Directory\s*$old/?>|<Directory $ENV{wiz_dir}>|;
- } "/etc/httpd/conf/commonhttpd.conf" if $old;
-
- substInFile {
- s|^\s*<Directory\s*/var/www/html/?>|<Directory $ENV{wiz_dir}>|;
- } "/etc/httpd/conf/commonhttpd.conf";
-}
-
-sub is_user_mod {
- if ($ENV{wiz_user_mod}) {
- return 1;
- }
- $ENV{wiz_user_dir} = "disabled";
- 0;
-}
-
-sub is_last_user_mod {
- my $root = get_user_dir();
- chomp($root);
- !($root eq 'disabled');
-}
-
-sub get_user_dir {
- my %conf = Varspaceval->get("/etc/httpd/conf/commonhttpd.conf");
- $conf{UserDir};
-}
-
-sub chg_user_dir {
- my $root = get_user_dir();
- if ($ENV{wiz_user_mod}) {
- substInFile {
- s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g;
- } "/etc/httpd/conf/commonhttpd.conf";
- substInFile {
- s|(\s*)UserDir\s*$root(/?)|$1UserDir $ENV{wiz_user_dir}$2|g;
- s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g;
- } "/etc/httpd/conf/commonhttpd.conf";
- }
- else {
- substInFile {
- s|(\s*)UserDir\s*$root(/?)|$1UserDir disabled$2|g;
- } "/etc/httpd/conf/commonhttpd.conf";
- }
- 10;
-}
-
-sub do_it {
- my $file = "/etc/httpd/conf/commonhttpd.conf";
- my $that = "localhost";
-
- if ($ENV{wiz_web_external} eq "1") {
- $that = "all";
- }
- elsif ($ENV{wiz_web_internal} eq "1") {
- ($that) = $o->itf_get("IPADDR") =~ qr/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.)\d{1,3}$/;
- $that .= " 127.0.0.1";
- }
- cp_af($file, $file.".orig");
- substInFile {
- if( m /^\s*<Directory.*>/s...m/^\s*<\/Directory>/s ) {
- { s /^\s*Allow .*$/ Allow from $that\n/s;}
- ;}
- } $file;
- chg_docroot();
- chg_user_dir();
- system("/etc/rc.d/init.d/httpd restart");
- 10;
-}
-
-1;
diff --git a/web_wizard/scripts/mytest.pl b/web_wizard/scripts/mytest.pl
deleted file mode 100755
index e13f3708..00000000
--- a/web_wizard/scripts/mytest.pl
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/perl
-use strict;
-
-open(FH, $ARGV[0]);
-
-my $that;
-
-if ($ENV{wiz_web_external} eq "1") {
- $that = "all";
-}
-elsif ($ENV{wiz_web_internal} eq "1") {
- $that = $ip;
-}
-else {
- $that = "localhost";
-}
-
-
-while(<FH>) {
- if( m/^[[:space:]]*<Directory \/home/s...m/^[[:space:]]*<\/Directory>/s ) {
- s/^[[:space:]]*Allow .*$/Allow from $that/s;
- }
- if( m /^[[:space:]]*<Directory \/var\/www/s...m/^[[:space:]]*<\/Directory>/s ) {
- s/^[[:space:]]*Allow .*$/Allow from $that/s;
- }
- print $_;
-}
-
diff --git a/web_wizard/web.wiz b/web_wizard/web.wiz
deleted file mode 100644
index bb7ec2c3..00000000
--- a/web_wizard/web.wiz
+++ /dev/null
@@ -1,379 +0,0 @@
-<?xml version="1.0"?>
-
-
-<Wizard
- name="general"
- libScript="__WIZ_HOME__/common/scripts/functions.sh"
- wizardTitle="Web wizard"
- imagePosition="top"
- defaultImage="__WIZ_HOME__/web_wizard/images/apache.png"
- perlModule="__WIZ_HOME__/web_wizard/scripts/Webconf.pm"
- rpm="apache2"
- summaryFunc="do_it"
->
-
- <Variable
- name="wiz_web_internal"
- shellVariable="wiz_web_internal"
- defaultValue="1"
- >
- </Variable>
-
- <Variable
- name="wiz_web_external"
- shellVariable="wiz_web_external"
- defaultValue="1"
- >
- </Variable>
-
- <Variable
- name="user_mod"
- shellVariable="wiz_user_mod"
- >
- </Variable>
-
- <Variable
- name="user_dir"
- shellVariable="wiz_user_dir"
- >
- </Variable>
-
- <Variable
- name="shared_dir"
- shellVariable="wiz_dir"
- >
- </Variable>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="welcome"
- func="check"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="web connections"
- jumpIndex="0"
- >
- </Target>
-
- <Target
- targetName="must be root"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="error_dhcp"
- jumpIndex="2"
- >
- </Target>
-
- <Info
- helpText="Web Server Configuration Wizard"
- >
- </Info>
-
-
- <Info
- helpText="This wizard will help you configuring the Web Server for your network."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="must be root"
- nextButtonText="OK"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Sorry, you must be root to do this..."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="error_dhcp"
- jumpPage="web connections"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Warning\nYou are in dhcp, server may not work with your configuration."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="web connections"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Web Server"
- >
- </Info>
-
-
- <Info
- helpText="Your server can act as a Web Server toward your internal network (intranet) and as a Web Server for the Internet."
- >
- </Info>
-
-
- <Info
- helpText="Select the kind of Web service you want to activate:"
- >
- </Info>
-
-
- <Boolean
- name="wiz_web_internal"
- variableName="wiz_web_internal"
- forceEnabled="1"
- forceDisabled="0"
- helpText="Enable the Web Server for the Intranet"
- >
- </Boolean>
-
-
- <Boolean
- name="wiz_web_external"
- variableName="wiz_web_external"
- forceEnabled="1"
- forceDisabled="0"
- helpText="Enable the Web Server for the Internet"
- >
- </Boolean>
-
-
- <Info
- helpText="Don't check any box if you don't want to activate your Web Server."
- >
- </Info>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="ask_mod"
- func="is_user_mod"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="ask_dir"
- jumpIndex="0"
- >
- </Target>
-
-
- <Target
- targetName="ask_user_dir"
- jumpIndex="1"
- >
- </Target>
-
- <Info
- helpText="Modules :"
- >
- </Info>
-
-
- <Info
- helpText="* User module : allows users to have a directory in their home directories available on your http server via http://www.yourserver.com/~user, you will be asked for the name of this directory afterward."
- >
- >
- </Info>
-
- <Boolean
- variableName="user_mod"
- helpText="activate user module"
- fillfunc="is_last_user_mod"
- help="Allows users to get a directory in their homes directories available on your http server via http://www.yourserver.com/~user."
- >
- </Boolean>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="ask_user_dir"
- func="check_dir"
- is="user_mod"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Type the name of the directory users should create in their homes (whitout ~/) to get it available via http://www.yourserver.com/~user"
- >
- </Info>
-
- <Freetext
- variableName="user_dir"
- helpText="user http sub-directory : ~/"
- editable="true"
- fillfunc="get_user_dir"
- help="Type the name of the directory users should create in their homes (whitout ~/) to get it available via http://www.yourserver.com/~user"
- >
- </Freetext>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="ask_dir"
- func="check_dir"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Target
- targetName="error_in_dir"
- jumpIndex="1"
- >
- </Target>
-
- <Target
- targetName="confirmation"
- jumpIndex="10"
- >
- </Target>
-
-
- <Info
- helpText="Type the path of the directory you want being the document root."
- >
- </Info>
-
- <Freetext
- variableName="shared_dir"
- helpText="Document Root:"
- editable="true"
- fillfunc="get_docroot"
- >
- </Freetext>
- </Page>
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
- name="error_in_dir"
- jumpPage="ask_dir"
- nextButtonText="Fix it"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="The path you entered does not exist."
- >
- </Info>
- </Page>
-
-
-
- <Page
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="confirmation"
- func="do_it"
- jumpPage="congratulations"
- nextButtonText="Configure"
- executionLevel="NORMAL"
- nextFinish="false"
- canBack="true"
- canCancel="true"
- >
-
- <Info
- helpText="Configuring the Web Server"
- >
- </Info>
-
-
- <Info
- helpText="The wizard collected the following parameters needed to configure your Web Server"
- >
- </Info>
-
-
- <Freetext
- name="freetext1"
- variableName="wiz_web_internal"
- helpText="Intranet web server:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- name="freetext2"
- variableName="wiz_web_external"
- helpText="Internet web server:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- variableName="shared_dir"
- helpText="Document root:"
- editable="false"
- >
- </Freetext>
-
- <Freetext
- variableName="user_dir"
- helpText="User directory:"
- 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
- helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-web.html"
- name="congratulations"
- nextButtonText="Quit"
- executionLevel="NORMAL"
- nextFinish="true"
- canBack="false"
- canCancel="false"
- >
-
- <Info
- helpText="Congratulations"
- >
- </Info>
-
-
- <Info
- helpText="The wizard successfully configured your Intranet/Internet Web Server"
- >
- </Info>
- </Page>
-</Wizard>