summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-22 20:07:36 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-22 20:07:36 +0000
commite1922243bd426cc4af43aa806027d3c8e1c2a810 (patch)
treea86284d78d0b3f165d5b224d4cfebcd5a899d55d /perl-install
parent780e03f8220980809fa187aa442978dd2ab7cc33 (diff)
downloaddrakx-e1922243bd426cc4af43aa806027d3c8e1c2a810.tar
drakx-e1922243bd426cc4af43aa806027d3c8e1c2a810.tar.gz
drakx-e1922243bd426cc4af43aa806027d3c8e1c2a810.tar.bz2
drakx-e1922243bd426cc4af43aa806027d3c8e1c2a810.tar.xz
drakx-e1922243bd426cc4af43aa806027d3c8e1c2a810.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/commands.pm10
-rw-r--r--perl-install/common.pm2
-rw-r--r--perl-install/install2.pm7
-rw-r--r--perl-install/install_steps.pm2
-rw-r--r--perl-install/install_steps_interactive.pm4
-rw-r--r--perl-install/interactive.pm2
-rw-r--r--perl-install/interactive_gtk.pm6
-rw-r--r--perl-install/lang.pm9
-rw-r--r--perl-install/my_gtk.pm20
-rw-r--r--perl-install/pkgs.pm6
-rw-r--r--perl-install/share/compssList23
-rw-r--r--perl-install/share/compssUsers13
-rwxr-xr-xperl-install/standalone/draksec16
-rwxr-xr-xperl-install/standalone/drakxservices2
14 files changed, 81 insertions, 41 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 914a4a7be..320488197 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -123,7 +123,7 @@ sub rm {
my $rm; $rm = sub {
foreach (@_) {
- if (-d $_) {
+ if (!-l $_ && -d $_) {
$rec or die "$_ is a directory\n";
&$rm(glob_($_));
rmdir $_ or die "can't remove directory $_: $!\n";
@@ -504,8 +504,8 @@ sub dmesg { print cat_("/tmp/syslog"); }
#my %cached_failed_install_cpio;
#- double space between sub and install_cpio cuz install_cpio is not a shell command
-sub install_cpio($$) {
- my ($dir, $name) = @_;
+sub install_cpio($$;@) {
+ my ($dir, $name, @more) = @_;
# return if $cached_failed_install_cpio{"$dir $name"};
return "$dir/$name" if -e "$dir/$name";
@@ -516,7 +516,9 @@ sub install_cpio($$) {
eval { rm("-r", $dir) };
mkdir $dir, 0755;
require 'run_program.pm';
- run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/*");
+
+ my $more = join " ", map { $_ && "$_ $_/*" } @more;
+ run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/* $more");
#- not found, cache result
# return if $cached_failed_install_cpio{"$dir $name"} = ! -e "$dir/$name";
diff --git a/perl-install/common.pm b/perl-install/common.pm
index e2b882b7c..b48199abc 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -374,7 +374,7 @@ sub substInFile(&@) {
local $_ = '';
&$f($_);
select $old;
- output($file, $_);
+ eval { output($file, $_) };
}
}
}
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index cc75b0285..e75f14e94 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -304,7 +304,10 @@ sub partitionDisks {
$o->rebootNeeded foreach grep { $_->{rebootNeeded} } @{$o->{hds}};
}
$o->{fstab} = [ fsedit::get_fstab(@{$o->{hds}}, $o->{raid}) ];
- fsedit::get_root($o->{fstab}) or die _("Partitioning failed: no root filesystem");
+ fsedit::get_root($o->{fstab}) or die
+_("You must have a root partition.
+For this, create a partition (or click on an existing one).
+Then choose action ``Mount point'' and set it to `/'");
cat_("/proc/mounts") =~ m|(\S+)\s+/tmp/rhimage nfs| &&
!grep { $_->{mntpoint} eq "/mnt/nfs" } @{$o->{manualFstab} || []} and
@@ -371,7 +374,7 @@ sub miscellaneous {
local $ENV{LILO_PASSWORD} = $o->{lilo}{password};
run_program::rooted($o->{prefix}, "/etc/security/msec/init.sh", $o->{security});
- } 'setupBootloader';
+ } 'doInstallStep';
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 7495445cc..b5c0650fc 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -265,6 +265,8 @@ sub afterInstallPackages($) {
log::l("updating kde icons according to available devices");
install_any::kdeicons_postinstall($o->{prefix});
+ substInFile { s/^(GreetString)=/$1=Welcome to [HOSTNAME]/ } "$o->{prefix}/usr/share/config/kdmrc";
+ substInFile { s/(?<=UserView=)false/true/ } "$o->{prefix}/usr/share/config/kdmrc" if $o->{security} < 3;
run_program::rooted($o->{prefix}, "kdeDesktopCleanup");
#- move some file after an upgrade that may be seriously annoying.
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index c67527193..8c3acd29b 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -242,6 +242,10 @@ sub choosePackages {
$v or next;
pkgs::select($packages, $_) foreach @{$o->{compssUsers}{$k}};
}
+
+ my $f = "$o->{prefix}/etc/sysconfig/desktop";
+ output($f, "KDE\n") if !-e $f && $o->{compssUsersChoice}{KDE};
+ output($f, "GNOME\n") if !-e $f && $o->{compssUsersChoice}{Gnome};
}
#------------------------------------------------------------------------------
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 960657ee9..300f64db2 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -42,7 +42,7 @@ sub vnew {
my ($type, $su) = @_;
$su = $su eq "su";
require c;
- if (c::Xtest($ENV{DISPLAY} ||= ":0")) {
+ if ($ENV{DISPLAY} && c::Xtest($ENV{DISPLAY})) {
if ($su) {
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
$> and exec "kdesu", "-c", "$0 @ARGV";
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index faa26a7e3..0b330bfdd 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -31,12 +31,8 @@ sub ask_from_listW {
if (@$l < 5) { #- really ? : && sum(map { length $_ } @$l) < 90) {
my $defW;
my $f = sub { $w->{retval} = $_[1]; Gtk->main_quit };
- my $box = (@$l <= 2 && (map { split "\n" } @$messages) > 6) ?
- gtkpack(new Gtk::VBox(0,0),
- gtkset_usize(createScrolledWindow(gtktext_insert(new Gtk::Text, join "\n", @$messages)), 400, 250)) :
- create_box_with_title($w, @$messages);
gtkadd($w->{window},
- gtkpack($box,
+ gtkpack(create_box_with_title($w, @$messages),
gtkadd((@$l < 3 ? create_hbox() : create_vbox()),
map {
my $b = new Gtk::Button($_);
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 07511c48c..7a4d77785 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -170,13 +170,20 @@ sub set {
$ENV{LANG} = $languages{$lang}[2];
$ENV{LANGUAGE} = $languages{$lang}[3];
$ENV{LINGUAS} = $languages{$lang}[3];
+
+ local $_ = $languages{$lang}[1];
+ s/iso-8859-1$/iso-8859-15/;
+ s/iso-/iso/;
+ s/koi8-.*/koi8/;
+ s/cp1251/mscp1251/;
+
+ commands::install_cpio("/usr/share/locale", $languages{$lang}[2], "misc", $_);
} else {
# stick with the default (English) */
delete $ENV{LANG};
delete $ENV{LC_ALL};
delete $ENV{LINGUAS};
}
- commands::install_cpio("/usr/share/locale", $lang);
}
sub write {
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 56e186e70..84f285ba0 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -197,15 +197,17 @@ sub create_okcancel($;$$) {
sub create_box_with_title($@) {
my $o = shift;
- @_ = map { ref $_ ? $_ : warp_text($_) } @_;
- $o->{box} = gtkpack_(new Gtk::VBox(0,0),
- (map{
- my $w = ref $_ ? $_ : new Gtk::Label($_);
- $w->set_name("Title");
- 0, $w;
- } @_),
- 0, new Gtk::HSeparator,
- )
+ $o->{box} = (@_ <= 2 && (map { split "\n" } @_) > 6) ?
+ gtkpack(new Gtk::VBox(0,0),
+ gtkset_usize(createScrolledWindow(gtktext_insert(new Gtk::Text, join "\n", @_)), 400, 250)) :
+ gtkpack_(new Gtk::VBox(0,0),
+ (map {
+ my $w = ref $_ ? $_ : new Gtk::Label($_);
+ $w->set_name("Title");
+ 0, $w;
+ } map { ref $_ ? $_ : warp_text($_) } @_),
+ 0, new Gtk::HSeparator,
+ );
}
sub createScrolledWindow($) {
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index e22eed6de..2596e8c74 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -30,7 +30,7 @@ my %by_lang = (
'zh_TW.Big5' => [ 'rxvt-CLE', 'fonts-ttf-big5' ],
);
-my @prefered = qw(perl-GTK);
+my @preferred = qw(perl-GTK postfix);
my $A = 20471;
my $B = 16258;
@@ -50,7 +50,7 @@ sub allpackages {
sub select($$;$) {
my ($packages, $p, $base) = @_;
- my %prefered; @prefered{@prefered} = ();
+ my %preferred; @preferred{@preferred} = ();
my ($n, $v);
unless ($p->{installed}) { #- if the same or better version is installed, do not select.
$p->{base} ||= $base;
@@ -64,7 +64,7 @@ sub select($$;$) {
my $p = Package($packages, $_);
$i ||= $p;
$p && $p->{selected} and $i = $p, last;
- $p && exists $prefered{$_} and $i = $p;
+ $p && exists $preferred{$_} and $i = $p;
}
}
$i->{base} ||= $base;
diff --git a/perl-install/share/compssList b/perl-install/share/compssList
index b26ce6a71..3479e5257 100644
--- a/perl-install/share/compssList
+++ b/perl-install/share/compssList
@@ -113,7 +113,7 @@ fbset 22 0 0
fdutils 10 0 0
fetchmail 45 99 31
fetchmailconf 45 0 40
-file 92 72 94
+file 92 92 94
finger 40 0 27
flash 52 0 59
flex 13 0 72
@@ -346,7 +346,7 @@ kweather 72 0 59
kwvdial 73 0 56
ltrace 10 0 0
ld.so 0 0 94
-lftp 78 78 83
+lftp 50 78 83
lha 40 0 72
libc 10 15 75
libelf 10 15 80
@@ -450,11 +450,16 @@ lynx 42 78 84
m4 15 0 80
macutils 22 0 19
mailcap 5 0 4
-mailx 46 99 41
+mailx 92 92 92
make 50 0 94
-MAKEDEV 10 99 96
+MAKEDEV 91 91 91
mandrake_desk 88 0 88
-mandrake_doc 88 0 88
+mandrake_doc-es 16 0 16
+mandrake_doc-fr 16 0 16
+mandrake_doc-de 16 0 16
+mandrake_doc-en 16 0 16
+mandrake_doc-it 16 0 16
+mandrake_doc-ru 16 0 16
MandrakeUpdate 82 80 80
man-pages 90 0 72
man-pages-cs 20 0 20
@@ -545,7 +550,7 @@ pmake 22 0 75
pmake-customs 12 0 72
popt 10 0 80
portmap 22 99 19
-postfix 0 88 31
+postfix 20 88 51
postgresql 0 99 23
postgresql-clients 0 0 23
postgresql-devel 0 99 23
@@ -598,9 +603,9 @@ samba 28 99 30
sane 45 0 53
sane-devel 10 0 2
screen 26 0 19
-sendmail 21 88 36
-sendmail-cf 21 88 36
-sendmail-doc 31 35 36
+sendmail 0 0 0
+sendmail-cf 0 0 0
+sendmail-doc 0 0 0
setserial 42 0 55
setuptool 0 0 50
sgml-tools 16 0 75
diff --git a/perl-install/share/compssUsers b/perl-install/share/compssUsers
index b2530b323..d099165bb 100644
--- a/perl-install/share/compssUsers
+++ b/perl-install/share/compssUsers
@@ -49,9 +49,18 @@ System configuration
Web Server
daemons:network:http
-Network Management Workstation
+Network Management Workstation
network:tools
- daemons:network
+# above is daemons:network *without* sendmail
+ daemons:network:base
+ daemons:network:ftp
+ daemons:network:http
+ daemons:network:nfs
+ daemons:network:telnet
+ BeroList
+ comsat
+ postfix
+ imap
Documentation
documentation:languages:en
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index 8e17f8c54..62ef6e3c2 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -14,7 +14,7 @@ local $_ = join '', @ARGV;
$::expert = /-expert/ || cat_("/etc/sysconfig/system") =~ /^TYPE="?expert/m; #"
$::isStandalone = 1;
-my $in = vnew interactive('su');
+my $in = vnew interactive();
my %m = reverse (my %l = (
0 => _("Windows(TM)"),
@@ -24,10 +24,20 @@ my %m = reverse (my %l = (
4 => _("High"),
5 => _("Paranoid"),
));
+my %help = (
+ 0 => _("This level is to be used with care. It makes your system more easy to use, but very sensitive: it must not be used for a machine connected to others or to the Internet. There is no password access."),
+ 1 => _("Password are now enabled, but use as a networked computer is still not recommended."),
+ 2 => _("Few improvements for this security level, the main one is that there are more security warnings and checks."),
+ 3 => _("This is the standard security recommended for a computer that will be used to connect to the Internet as a client. There are now security checks. "),
+ 4 => _("With this security level, the use of this system as a server becomes possible. The security is now high enough to use the system as a server which accept connections from many clients. "),
+ 5 => _("We take level 4 features, but now the system is entirely closed. Security features are at their maximum."),
+);
+
delete @l{0,1,5} unless $::expert;
+delete @help{0,1,5} unless $::expert;
-if (my $level = $in->ask_from_list('',
-_("Choose security level"),
+if (my $level = $in->ask_from_list('', _("Choose security level") . "\n\n" .
+ join('', map { "$l{$_}: $help{$_}\n\n" } keys %l),
[ values %l ], $l{$ENV{SECURE_LEVEL}})) {
my $w = $in->wait_message('', _("Setting security level"));
$in->suspend;
diff --git a/perl-install/standalone/drakxservices b/perl-install/standalone/drakxservices
index e34b1a22f..58f0c39e3 100755
--- a/perl-install/standalone/drakxservices
+++ b/perl-install/standalone/drakxservices
@@ -13,7 +13,7 @@ $::isStandalone = 1;
my $in = vnew interactive('su');
-my @l = grep { !/\.rpmsave$/ } map { chop; $_ } `cd /etc/rc.d/init.d ; grep -l "chkconfig:" *`;
+my @l = grep { !/\.rpm/ } map { chop; $_ } `cd /etc/rc.d/init.d ; grep -l "chkconfig:" *`;
my @before = map { bool(@_ = glob("/etc/rc.d/rc*.d/*$_")) } @l;
my $after = $in->ask_many_from_list("drakxservices",