summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2003-08-22 21:29:12 +0000
committerFlorent Villard <warly@mandriva.com>2003-08-22 21:29:12 +0000
commitde6e60435383dbebc186933d54b1b9bc68aba118 (patch)
tree0f8111bf3792d88d39d64fde0793e20dd7305607
parent150bc87396011253a541ca0ad32250e926ab0ecc (diff)
downloaddrakwizard-de6e60435383dbebc186933d54b1b9bc68aba118.tar
drakwizard-de6e60435383dbebc186933d54b1b9bc68aba118.tar.gz
drakwizard-de6e60435383dbebc186933d54b1b9bc68aba118.tar.bz2
drakwizard-de6e60435383dbebc186933d54b1b9bc68aba118.tar.xz
drakwizard-de6e60435383dbebc186933d54b1b9bc68aba118.zip
fix the IFCFG reset of PATH env var which breaks packages installation
-rw-r--r--Makefile1
-rwxr-xr-xWiztemplate.pm6
-rwxr-xr-xclient_wizard/Bind_client.pm7
-rw-r--r--common/IFCFG.pm5
-rw-r--r--common/Varspaceval.pm5
-rw-r--r--common/Wizcommon.pm4
-rwxr-xr-xdhcp_wizard/Dhcp.pm6
-rwxr-xr-xdrakwizard.pl8
-rwxr-xr-xftp_wizard/Proftpd.pm9
-rwxr-xr-xnews_wizard/Inn.pm9
-rwxr-xr-xpostfix_wizard/Postfix.pm6
-rwxr-xr-xproxy_wizard/Squid.pm10
-rwxr-xr-xsamba_wizard/Samba.pm10
-rwxr-xr-xweb_wizard/Apache.pm7
14 files changed, 36 insertions, 57 deletions
diff --git a/Makefile b/Makefile
index a4a8ceeb..216d82b5 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,7 @@ install:
mkdir -p ${prefix}/$(PERL_VENDORLIB)/MDK/Wizard/
install -p drakwizard.pl ${prefix}/sbin/drakwizard
perl -i -pe "s|__WIZ_HOME__|$(WIZ_HOME)/|g" ${prefix}/sbin/drakwizard
+ perl -i -pe "s|\$::DEBUG = 1|\$::DEBUG = 0|g" ${prefix}/sbin/drakwizard
for l in $(OTHER); do \
$(MAKE) -C $$l $@; \
done
diff --git a/Wiztemplate.pm b/Wiztemplate.pm
index 9392ce03..4089912f 100755
--- a/Wiztemplate.pm
+++ b/Wiztemplate.pm
@@ -22,12 +22,10 @@
package WizTemplate;
use strict;
-use standalone;
-use interactive;
use common;
-require "MDK/Wizard/IFCFG.pm";
+use MDK::Wizard::IFCFG;
-my $net = new IFCFG;
+my $wiz = new Wizcommon;
my $o = {
name => N('configuration wizard'),
diff --git a/client_wizard/Bind_client.pm b/client_wizard/Bind_client.pm
index 4eff26d8..a29a6b23 100755
--- a/client_wizard/Bind_client.pm
+++ b/client_wizard/Bind_client.pm
@@ -19,15 +19,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-package Bind_client;
+package MDK::Wizard::Bind_client;
+use lib qw(/usr/lib/libDrakX);
use strict;
-use standalone;
-use interactive;
use common;
use MDK::Wizard::Wizcommon;
-my $wiz = new Wizcommon;
+my $wiz = new MDK::Wizard::Wizcommon;
my $wiz_ip_server = $wiz->{net}->itf_get("IPADDR");
my $wiz_domain_name = $wiz->{net}->network_get("DOMAINNAME");
diff --git a/common/IFCFG.pm b/common/IFCFG.pm
index e86128d1..0d0c96b2 100644
--- a/common/IFCFG.pm
+++ b/common/IFCFG.pm
@@ -18,7 +18,7 @@
# 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;
+package MDK::Wizard::IFCFG;
use strict;
use lib qw(/usr/lib/libDrakX);
use Data::Dumper;
@@ -27,10 +27,9 @@ use network::network;
#my $file = "/etc/sysconfig/network-scripts/drakconnect_conf";
#!-f $file and die "no such $file";
-sub new {
+sub new {
my $self = {};
- $ENV{PATH} = "";
my $ifconfig = `LC_ALL=C /sbin/ifconfig -a`;
my $device = 'NONE';
my @interfaces;
diff --git a/common/Varspaceval.pm b/common/Varspaceval.pm
index 61a31cff..fd5500d1 100644
--- a/common/Varspaceval.pm
+++ b/common/Varspaceval.pm
@@ -1,16 +1,15 @@
#!/usr/bin/perl -w
# Author Philippe Hétroy, phetroy@mandrakesoft.com
-# $Id: Varspaceval.pm,v 1.1 2003-08-22 19:59:47 warly Exp $
+# $Id: Varspaceval.pm,v 1.2 2003-08-22 21:29:12 warly Exp $
# Module for loding and committing informations in a VAR = value file type
-package Varspaceval;
+package MDK::Wizard::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)
diff --git a/common/Wizcommon.pm b/common/Wizcommon.pm
index 847f41f9..6ade7ec8 100644
--- a/common/Wizcommon.pm
+++ b/common/Wizcommon.pm
@@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-package Wizcommon;
+package MDK::Wizard::Wizcommon;
use strict;
use MDK::Wizard::IFCFG;
@@ -30,7 +30,7 @@ sub check_dhcp {
sub new {
my ($class, $conf) = @_;
- $net = new IFCFG;
+ $net = new MDK::Wizard::IFCFG;
bless {
net => $net,
}, $class;
diff --git a/dhcp_wizard/Dhcp.pm b/dhcp_wizard/Dhcp.pm
index 831c5a38..ba9b71d1 100755
--- a/dhcp_wizard/Dhcp.pm
+++ b/dhcp_wizard/Dhcp.pm
@@ -19,15 +19,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-package Dhcp;
+package MDK::Wizard::Dhcp;
use strict;
-use standalone;
-use interactive;
use common;
use MDK::Wizard::Wizcommon;
-my $wiz = new Wizcommon;
+my $wiz = new MDK::Wizard::Wizcommon;
my $wiz_ip_server = $wiz->{net}->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})/;
diff --git a/drakwizard.pl b/drakwizard.pl
index 7e184f29..192f1e41 100755
--- a/drakwizard.pl
+++ b/drakwizard.pl
@@ -20,7 +20,6 @@
use lib qw(/usr/lib/libDrakX);
use strict;
-our ($Wizard_title, $Wizard_pix_up, $lib_script, $perl_module, %variable, $in, $rpm, %chooser_hash, $welcome, $perl_module_name, $verbose, %description, $summary, $summary_func, %disabled, $current_page, %bool);
use standalone;
use interactive;
@@ -29,13 +28,14 @@ use common;
#- I18N.
push @::textdomains, 'drakwizard';
-$::DEBUG = 1;
+$::DEBUG = 0;
$::isWizard = 1;
$::Wizard_no_previous = 1;
$::Wizard_title = "Drakwizard";
$::Wiz_dir = '__WIZ_HOME__';
-my $in = 'interactive'->vnew('/bin/su', 'default');
+my $in = interactive->vnew;
my $standalone = 1;
+
my %wiz = (
apache => ['Apache', "Apache web server"],
@@ -63,7 +63,7 @@ if (!defined($wiz{$ARGV[0]})) {
require "MDK/Wizard/$wiz{$ARGV[0]}[0].pm";
-my ($wiz, $err) = $wiz{$ARGV[0]}[0]->new($wiz{$ARGV[0]}[2]);
+my ($wiz, $err) = "MDK::Wizard::$wiz{$ARGV[0]}[0]"->new($wiz{$ARGV[0]}[2]);
if ($err) {
$::Wizard_finished = 1;
$in->ask_okcancel("error", N($err));
diff --git a/ftp_wizard/Proftpd.pm b/ftp_wizard/Proftpd.pm
index fa1e13b9..500bd5b5 100755
--- a/ftp_wizard/Proftpd.pm
+++ b/ftp_wizard/Proftpd.pm
@@ -18,16 +18,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-package Proftpd;
-use lib qw(/usr/lib/libDrakX);
+package MDK::Wizard::Proftpd;
use strict;
-use standalone;
-use interactive;
use common;
-require "MDK/Wizard/IFCFG.pm";
+require MDK::Wizard::Wizcommon;
-my $net = new IFCFG;
+my $wiz = new MDK::Wizard::Wizcommon;
my $o = {
name => 'configuration wizard',
diff --git a/news_wizard/Inn.pm b/news_wizard/Inn.pm
index cc97e52d..713f2041 100755
--- a/news_wizard/Inn.pm
+++ b/news_wizard/Inn.pm
@@ -18,16 +18,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-package Inn;
-use lib qw(/usr/lib/libDrakX);
+package MDK::Wizard::Inn;
use strict;
-use standalone;
-use interactive;
use common;
-require "MDK/Wizard/IFCFG.pm";
+require MDK::Wizard::Wizcommon;
-my $net = new IFCFG;
+my $wiz = new MDK::Wizard::Wizcommon;
my $o = {
name => 'configuration wizard',
diff --git a/postfix_wizard/Postfix.pm b/postfix_wizard/Postfix.pm
index 9b3c514a..8adf487e 100755
--- a/postfix_wizard/Postfix.pm
+++ b/postfix_wizard/Postfix.pm
@@ -19,15 +19,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-package Postfix;
+package MDK::Wizard::Postfix;
use strict;
-use standalone;
-use interactive;
use common;
use MDK::Wizard::Wizcommon;
-my $wiz = new Wizcommon;
+my $wiz = new MDK::Wizard::Wizcommon;
my $wiz_domain_name = $wiz->{net}->network_get("DOMAINNAME");
my $wiz_host_name = $wiz->{net}->network_get("HOSTNAME");
diff --git a/proxy_wizard/Squid.pm b/proxy_wizard/Squid.pm
index d20194a1..3c1d87d9 100755
--- a/proxy_wizard/Squid.pm
+++ b/proxy_wizard/Squid.pm
@@ -2,6 +2,7 @@
# Drakwizard
+# Copyright (C) 2002 Arnaud Desmons <adesmons@mandrakesoft.com>
# Copyright (C) 2003 Florent Villard <warly@mandrakesoft.com>
#
# This program is free software; you can redistribute it and/or modify
@@ -18,16 +19,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-package Squid;
-use lib qw(/usr/lib/libDrakX);
+package MDK::Wizard::Squid;
use strict;
-use standalone;
-use interactive;
use common;
-require "MDK/Wizard/IFCFG.pm";
+require MDK::Wizard::Wizcommon;
-my $net = new IFCFG;
+my $wiz = new MDK::Wizard::Wizcommon;
my $o = {
name => 'configuration wizard',
diff --git a/samba_wizard/Samba.pm b/samba_wizard/Samba.pm
index ca7bbaa7..a72578e0 100755
--- a/samba_wizard/Samba.pm
+++ b/samba_wizard/Samba.pm
@@ -2,6 +2,7 @@
# Drakwizard
+# Copyright (C) 2002 Arnaud Desmons <adesmons@mandrakesoft.com>
# Copyright (C) 2003 Florent Villard <warly@mandrakesoft.com>
#
# This program is free software; you can redistribute it and/or modify
@@ -18,16 +19,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-package Samba;
-use lib qw(/usr/lib/libDrakX);
+package MDK::Wizard::Samba;
use strict;
-use standalone;
-use interactive;
use common;
-require "MDK/Wizard/IFCFG.pm";
+use MDK::Wizard::Wizcommon;
-my $net = new IFCFG;
+my $wiz = new MDK::Wizard::Wizcommon;
my $o = {
name => 'configuration wizard',
diff --git a/web_wizard/Apache.pm b/web_wizard/Apache.pm
index 2585211b..55a19bbe 100755
--- a/web_wizard/Apache.pm
+++ b/web_wizard/Apache.pm
@@ -19,17 +19,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-package Apache;
-use lib qw(/usr/lib/libDrakX);
+package MDK::Wizard::Apache;
use strict;
-use standalone;
-use interactive;
use common;
use MDK::Wizard::Wizcommon;
use MDK::Wizard::Varspaceval;
-my $wiz = new Wizcommon;
+my $wiz = new MDK::Wizard::Wizcommon;
my $file;
my $root;