diff options
author | Francois Pons <fpons@mandriva.com> | 1999-12-14 19:01:20 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 1999-12-14 19:01:20 +0000 |
commit | 927f51ad73f141395cc9d644de0a3b1827513eaf (patch) | |
tree | daf2d3422640b53f1c68f0c383080394ae9264bf /perl-install/install_any.pm | |
parent | 5bdd01f0daf81cf97a5d04004adb55a75c58ef6c (diff) | |
download | drakx-927f51ad73f141395cc9d644de0a3b1827513eaf.tar drakx-927f51ad73f141395cc9d644de0a3b1827513eaf.tar.gz drakx-927f51ad73f141395cc9d644de0a3b1827513eaf.tar.bz2 drakx-927f51ad73f141395cc9d644de0a3b1827513eaf.tar.xz drakx-927f51ad73f141395cc9d644de0a3b1827513eaf.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 7b5a38863..da0a773a2 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -533,23 +533,18 @@ sub template2userfile($$$$%) { } } -sub kderc_largedisplay($) { - my ($prefix) = @_; +sub update_userkderc($$$) { + my ($prefix, $cat, $subst) = @_; foreach ("/etc/skel", "/root", list_home()) { my ($inputfile, $outputfile) = ("$prefix$_/.kderc", "$prefix$_/.kderc.new"); - my %subst = ( contrast => "Contrast=7\n", - kfmiconstyle => "kfmIconStyle=Large\n", - kpaneliconstyle => "kpanelIconStyle=Normal\n", #- to change to Large when icons looks better - kdeiconstyle => "KDEIconStyle=Large\n", - ); - + my %subst = %$subst; local *INFILE; local *OUTFILE; open INFILE, $inputfile or return; open OUTFILE, ">$outputfile" or return; print OUTFILE map { - if (my $i = /^\s*\[KDE\]/ ... /^\s*\[/) { + if (my $i = /^\s*\[$cat\]/i ... /^\s*\[/) { if (/^\s*(\w*)=/ && $subst{lc($1)}) { delete $subst{lc($1)}; } else { @@ -559,12 +554,34 @@ sub kderc_largedisplay($) { $_; } } <INFILE>; + print OUTFILE "[$cat]\n", values %subst if values %subst; #- if categorie has not been found above. unlink $inputfile; rename $outputfile, $inputfile; } } +sub kderc_largedisplay($) { + my ($prefix) = @_; + + update_userkderc($prefix, 'KDE', { + contrast => "Contrast=7\n", + kfmiconstyle => "kfmIconStyle=Large\n", + kpaneliconstyle => "kpanelIconStyle=Normal\n", #- to change to Large when icons looks better + kdeiconstyle => "KDEIconStyle=Large\n", + }); +} + +sub kdelang_postinstall($) { + my ($prefix) = @_; + my %i18n = getVarsFromSh("$prefix/etc/sysconfig/i18n"); + my $lang = $i18n{LANG} eq 'se' ? 'sv' : $i18n{LANG}; + + update_userkderc($prefix, 'Locale', { + language => "Language=$lang\n", + }); +} + sub kdeicons_postinstall($) { my ($prefix) = @_; @@ -593,8 +610,11 @@ sub kdeicons_postinstall($) { my %toreplace = ( id => $1 ); template2userfile($prefix, "/usr/share/floppy.kdelnk.in", "Desktop/floppy$2.kdelnk", 1, %toreplace); } elsif (/^\/dev\/(\S+)\s+\/mnt\/DOS_ (\S*)\s+/x) { - my %toreplace = ( device => $1, id => $2 ); + my %toreplace = ( device => $1, id => $2, mntpoint => "/mnt/DOS_$2" ); template2userfile($prefix, "/usr/share/Dos_.kdelnk.in", "Desktop/Dos_$2.kdelnk", 1, %toreplace); + } elsif (/^\/dev\/(\S+)\s+(\S*)\s+vfat\s+/x) { + my %toreplace = ( device => $1, id => $1, mntpoint => $2 ); + template2userfile($prefix, "/usr/share/Dos_.kdelnk.in", "Desktop/Dos_$1.kdelnk", 1, %toreplace); } } } |