summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2003-03-02 13:21:38 +0000
committerFlorent Villard <warly@mandriva.com>2003-03-02 13:21:38 +0000
commit7eceb2bda4b5f28213df8611be6516f2c397835f (patch)
tree142d606289198e0a915d5552295f954119f8e293
parentfb900a0d0b5e9db9b1e8330152cfbe29a0b6a9c9 (diff)
downloaddrakwizard-7eceb2bda4b5f28213df8611be6516f2c397835f.tar
drakwizard-7eceb2bda4b5f28213df8611be6516f2c397835f.tar.gz
drakwizard-7eceb2bda4b5f28213df8611be6516f2c397835f.tar.bz2
drakwizard-7eceb2bda4b5f28213df8611be6516f2c397835f.tar.xz
drakwizard-7eceb2bda4b5f28213df8611be6516f2c397835f.zip
fix postfix wizard (use correct hostname, restart postfix at the end, fix paths)
-rw-r--r--drakwizard.spec10
-rw-r--r--po/drakwizard.pot2
-rw-r--r--postfix_wizard/postfix.wiz4
-rw-r--r--postfix_wizard/scripts/Postfixconf.pm38
4 files changed, 40 insertions, 14 deletions
diff --git a/drakwizard.spec b/drakwizard.spec
index d9adced1..b1af2a36 100644
--- a/drakwizard.spec
+++ b/drakwizard.spec
@@ -1,5 +1,5 @@
%define name drakwizard
-%define version 1.1
+%define version 1.2
%define release 1mdk
Name: %{name}
@@ -51,6 +51,14 @@ rm -rf $RPM_BUILD_DIR/$RPM_PACKAGE_NAME
%_datadir/wizards*
%changelog
+* Sun Mar 2 2003 Warly <warly@mandrakesoft.com> 1.2-1mdk
+- start nfs server at the end of nfs wizard
+- add dns and gateway in dhcp server config, remove nis, netbios and others
+- add apache2 wizard
+- compute a correct domainame, dns and gateway in IFCFG.pm
+- replace shell function for chek_masquerade and check_relay by perl ones
+- restart postfix at the end of postfix configuration
+
* Thu Dec 19 2002 Arnaud Desmons <adesmons@mandrakesoft.com> 1.1-1mdk
- fix to get png images with gtk2
diff --git a/po/drakwizard.pot b/po/drakwizard.pot
index 34d75188..dae7fd8f 100644
--- a/po/drakwizard.pot
+++ b/po/drakwizard.pot
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-02-28 21:24+0100\n"
+"POT-Creation-Date: 2003-03-02 14:28+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/postfix_wizard/postfix.wiz b/postfix_wizard/postfix.wiz
index 5324d23d..45954c12 100644
--- a/postfix_wizard/postfix.wiz
+++ b/postfix_wizard/postfix.wiz
@@ -47,7 +47,7 @@
<Page
helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
name="Form_of_address"
- jumpScript="__WIZ_HOME__/postfix_wizard/scripts/check_masquerade.sh"
+ func='check_masquerade'
executionLevel="NORMAL"
nextFinish="false"
canBack="true"
@@ -113,7 +113,7 @@
<Page
helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-postfix.html"
name="ISP"
- jumpScript="__WIZ_HOME__/postfix_wizard/scripts/check_relay.sh"
+ func='check_relay'
executionLevel="NORMAL"
nextFinish="false"
canBack="true"
diff --git a/postfix_wizard/scripts/Postfixconf.pm b/postfix_wizard/scripts/Postfixconf.pm
index 176795ac..e34234d9 100644
--- a/postfix_wizard/scripts/Postfixconf.pm
+++ b/postfix_wizard/scripts/Postfixconf.pm
@@ -1,18 +1,32 @@
#!/usr/bin/perl
package Postfixconf;
+use lib '/usr/lib/libDrakX';
require "__WIZ_HOME__/common/scripts/Vareqval.pm";
require "__WIZ_HOME__/common/scripts/IFCFG.pm";
use MDK::Common;
+use services;
use strict;
my $o = IFCFG->new();
my $wiz_domain_name = $o->network_get("DOMAINNAME");
my $wiz_host_name = $o->network_get("HOSTNAME");
+sub check_masquerade {
+ $ENV{wiz_mail_masquerade} or return 1;
+ $ENV{wiz_mail_masquerade} =~ /@(\S+)$/ or return 1;
+ return 10
+}
+
+sub check_relay {
+ $ENV{wiz_ext_mail_relay} or return 1;
+ $ENV{wiz_ext_mail_relay} =~ /(\S+)\.(\S+)$/ or return 1;
+ return 10;
+}
+
sub get_mail_masquerade {
my $login = `logname`;
- my $relayhost = `postconf -h relayhost`;
+ my $relayhost = `/usr/sbin/postconf -h relayhost`;
chomp($relayhost);
($relayhost) = $relayhost =~ /.*\.(.*\..*)/;
!length $relayhost and $relayhost = $wiz_domain_name;
@@ -21,7 +35,7 @@ sub get_mail_masquerade {
}
sub get_mail_relay {
- my $relayhost = `postconf -h relayhost`;
+ my $relayhost = `/usr/sbin/postconf -h relayhost`;
chomp $relayhost;
!length $relayhost and $relayhost = "smtp.$wiz_domain_name";
$relayhost;
@@ -36,7 +50,7 @@ sub do_it {
foreach (@conf) {
(-f $_) and MDK::Common::cp_af($_, $_.".orig");
}
- @conf = ("myhostname = $wiz_host_name.$wiz_domain_name",
+ @conf = ("myhostname = $wiz_host_name",
'myorigin = $mydomain',
'inet_interfaces = all',
'mydestination = $myhostname, localhost.$mydomain',
@@ -48,7 +62,7 @@ sub do_it {
"relayhost = $ENV{wiz_ext_mail_relay}"
);
foreach (@conf) {
- system("postconf -e \'$_\'");
+ system("/usr/sbin/postconf -e \'$_\'");
}
if (defined $ENV{wiz_ext_mail_relay}) {
my $file = "/etc/postfix/canonical";
@@ -63,12 +77,16 @@ sub do_it {
if ($t) { substInFile { s|$t|\#$&$canon|} $file }
else { append_to_file($file, $canon) }
}
- system("postmap /etc/postfix/canonical");
- system("postmap /etc/postfix/virtual");
- system("postalias /etc/postfix/aliases");
- system("postfix check");
- system("service postfix restart");
- system("service xinetd restart");
+ system("/usr/sbin/postmap /etc/postfix/canonical");
+ system("/usr/sbin/postmap /etc/postfix/virtual");
+ system("/usr/sbin/postalias /etc/postfix/aliases");
+ system("/usr/sbin/postfix check");
+ if (services::is_service_running('postfix')) {
+ services::restart('postfix')
+ } else {
+ services::start('postfix')
+ }
+ services::is_service_running('xinetd') and services::restart('xinetd');
10;
}