summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-05 12:54:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-05 12:54:36 +0000
commit07a7424075429fcab14763850cba40fe8ad7a57b (patch)
tree92c1f0b51e134a5055cb7150ae63ac232f3966b0 /perl-install/install_any.pm
parenta130ec1291fed0faabfc8051f990f6765f1eabe1 (diff)
downloaddrakx-backup-do-not-use-07a7424075429fcab14763850cba40fe8ad7a57b.tar
drakx-backup-do-not-use-07a7424075429fcab14763850cba40fe8ad7a57b.tar.gz
drakx-backup-do-not-use-07a7424075429fcab14763850cba40fe8ad7a57b.tar.bz2
drakx-backup-do-not-use-07a7424075429fcab14763850cba40fe8ad7a57b.tar.xz
drakx-backup-do-not-use-07a7424075429fcab14763850cba40fe8ad7a57b.zip
*** empty log message ***
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm19
1 files changed, 14 insertions, 5 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index a38316bbd..00dda26e4 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -533,11 +533,12 @@ sub list_passwd() {
sub list_home() {
map { $_->[7] } grep { $_->[2] >= 500 } list_passwd();
}
+sub list_skels() { "/etc/skel", "/root", list_home() }
sub template2userfile($$$$%) {
my ($prefix, $inputfile, $outputrelfile, $force, %toreplace) = @_;
- foreach ("/etc/skel", "/root", list_home()) {
+ foreach (list_skels()) {
my $outputfile = "$prefix/$_/$outputrelfile";
if (-d dirname($outputfile) && ($force || ! -e $outputfile)) {
log::l("generating $outputfile from template $inputfile");
@@ -549,7 +550,7 @@ sub template2userfile($$$$%) {
sub update_userkderc($$$) {
my ($prefix, $cat, $subst) = @_;
- foreach ("/etc/skel", "/root", list_home()) {
+ foreach (list_skels()) {
my ($inputfile, $outputfile) = ("$prefix$_/.kderc", "$prefix$_/.kderc.new");
my %tosubst = (%$subst);
local *INFILE; local *OUTFILE;
@@ -583,7 +584,7 @@ sub kderc_largedisplay($) {
kpaneliconstyle => "kpanelIconStyle=Normal\n", #- to change to Large when icons looks better
kdeiconstyle => "KDEIconStyle=Large\n",
});
- foreach ("/etc/skel", "/root", list_home()) {
+ foreach (list_skels()) {
substInFile {
s/^(GridWidth)=85/$1=100/;
s/^(GridWidth)=70/$1=75/;
@@ -640,8 +641,16 @@ sub kdeicons_postinstall($) {
template2userfile($prefix, "/usr/share/Dos_.kdelnk.in", "Desktop/Dos_$1.kdelnk", 1, %toreplace);
}
}
+
+ my @l = map { "$prefix$_/Desktop/Doc.kdelnk" } list_skels();
+ if (my ($lang) = all("$prefix/usr/doc/mandrake")) {
+ substInFile { s|^(URL=.*?)/?$|$1/$lang| } @l;
+ } else {
+ unlink @l;
+ }
+
my $lang = quotemeta $ENV{LANG};
- foreach my $dir (map { "$prefix$_/Desktop" } qw(/etc/skel /root)) {
+ foreach my $dir (map { "$prefix$_/Desktop" } list_skels()) {
-d $dir or next;
foreach (grep { /\.kdelnk$/ } all($dir)) {
cat_("$dir/$_") =~ /^Name\[$lang\]=(.{2,14})$/m
@@ -654,7 +663,7 @@ sub move_desktop_file($) {
my ($prefix) = @_;
my @toMove = qw(doc.kdelnk news.kdelnk updates.kdelnk home.kdelnk printer.kdelnk floppy.kdelnk cdrom.kdelnk);
- foreach ("/etc/skel", "/root", list_home()) {
+ foreach (list_skels()) {
my $dir = "$prefix$_";
if (-d "$dir/Desktop") {
my @toSubst = glob_("$dir/Desktop/.*\.rpmorig");