summaryrefslogtreecommitdiffstats
path: root/mandriva/2010.2/kdebase/kdm-migrate.pl
diff options
context:
space:
mode:
authorTim Williams <tmw@autotrain.org>2011-10-14 13:51:18 +0100
committerTim Williams <tmw@autotrain.org>2011-10-14 13:51:18 +0100
commitec2515f058c60d2478a549f58376db628ba556b9 (patch)
treeaefbde1b807005611b397e01ebc5782c7d27ff91 /mandriva/2010.2/kdebase/kdm-migrate.pl
parentbba295da1161579c6fe734680c827e50a3585131 (diff)
downloadtde-packaging-ec2515f058c60d2478a549f58376db628ba556b9.tar.gz
tde-packaging-ec2515f058c60d2478a549f58376db628ba556b9.zip
Initial commit of the Mandriva patches and spec files.
This includes the main dependencies and core packages, but very little else.
Diffstat (limited to 'mandriva/2010.2/kdebase/kdm-migrate.pl')
-rwxr-xr-xmandriva/2010.2/kdebase/kdm-migrate.pl35
1 files changed, 35 insertions, 0 deletions
diff --git a/mandriva/2010.2/kdebase/kdm-migrate.pl b/mandriva/2010.2/kdebase/kdm-migrate.pl
new file mode 100755
index 000000000..89a20b395
--- /dev/null
+++ b/mandriva/2010.2/kdebase/kdm-migrate.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+
+# Copyright: MandrakeSoft, licensed under the GPL v2.
+# modified by Laurent Montel <lmontel@mandrakesoft.com>
+
+use strict;
+use MDK::Common;
+
+foreach my $file (@ARGV) {
+ my $no_theme;
+ # grep return 0 if a match is found
+ $no_theme = 1 if `grep -q -s '^UseTheme=' $file` ;
+ substInFile {
+ if (/SystemPath=(.*)$/) {
+ my $result = $1;
+ s!$!:/usr/X11R6/bin/! if $result !~ m!/usr/X11R6/bin/!;
+ }
+ if (/UserPath=(.*)$/) {
+ my $result = $1;
+ s!$!:/usr/X11R6/bin/! if $result !~ m!/usr/X11R6/bin/!;
+ }
+ s!^(Setup)=.*!$1=/etc/X11/xdm/Xsetup_0!;
+ s!^(Startup)=.*!$1=/etc/X11/xdm/GiveConsole!;
+ s!^(Reset)=.*!$1=/etc/X11/xdm/TakeConsole!;
+ s!^(Xserver)=.*!$1=/etc/X11/xdm/Xservers\nServerVTs=-7\n!;
+ if ($no_theme) {
+ s!^(AuthComplain)=.*!$1=AuthComplain=false\nUseTheme=true\nTheme=/usr/share/mdk/dm!;
+ } else {
+ s!^(AuthComplain)=.*!AuthComplain=false!;
+ }
+
+ } $file;
+}
+
+