summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2014-07-01 04:02:22 +0200
committerSlávek Banko <[email protected]>2014-07-01 04:02:22 +0200
commit80680d72829e371cf054806ad7519b968364d903 (patch)
treee28db2ccefb6146e81f5eaa6147f3975e644d98b /debian
parentab0666a79313cc1b5e6ae7f71d566b31fb12c5b2 (diff)
downloadtde-packaging-80680d72829e371cf054806ad7519b968364d903.tar.gz
tde-packaging-80680d72829e371cf054806ad7519b968364d903.zip
Add conversion of KDM configuration during upgrade to R14 on Debian and Ubuntu
Diffstat (limited to 'debian')
-rw-r--r--debian/lenny/metapackages/rename-meta/debian/kdm-trinity.preinst17
-rw-r--r--debian/squeeze/metapackages/rename-meta/debian/kdm-trinity.preinst17
2 files changed, 34 insertions, 0 deletions
diff --git a/debian/lenny/metapackages/rename-meta/debian/kdm-trinity.preinst b/debian/lenny/metapackages/rename-meta/debian/kdm-trinity.preinst
index f083d696c..2f41409d1 100644
--- a/debian/lenny/metapackages/rename-meta/debian/kdm-trinity.preinst
+++ b/debian/lenny/metapackages/rename-meta/debian/kdm-trinity.preinst
@@ -73,6 +73,23 @@ if [ -n "$REMOVING" ]; then
rm -f /etc/init/kdm-trinity.conf
fi
+# convert former configuration (kdm => tdm)
+if [ -d "/etc/trinity/kdm" ] && [ ! -d "/etc/trinity/tdm" ]; then
+ # copy old configuration
+ cp -a "/etc/trinity/kdm" "/etc/trinity/tdm"
+
+ # cleanup
+ find "/etc/trinity/tdm" -name "*.dpkg-*" -print0 | \
+ xargs -r0 rm
+
+ # rename files
+ find "/etc/trinity/tdm" -name "*kdm*" | \
+ while read f; do mv "${f}" "$(echo "$f" | sed "s|kdm|tdm|g")"; done
+
+ # rename in the files content
+ egrep -rl "KDE|KDM|kdm|kwin" "/etc/trinity/tdm" | tr "\n" "\0" | \
+ xargs -r0 sed -i -e "s|KDE|TDE|g" -e "s|KDM|TDM|g" -e "s|kdm|tdm|g" -e "s|kwin|twin|g"
+fi
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
diff --git a/debian/squeeze/metapackages/rename-meta/debian/kdm-trinity.preinst b/debian/squeeze/metapackages/rename-meta/debian/kdm-trinity.preinst
index f083d696c..2f41409d1 100644
--- a/debian/squeeze/metapackages/rename-meta/debian/kdm-trinity.preinst
+++ b/debian/squeeze/metapackages/rename-meta/debian/kdm-trinity.preinst
@@ -73,6 +73,23 @@ if [ -n "$REMOVING" ]; then
rm -f /etc/init/kdm-trinity.conf
fi
+# convert former configuration (kdm => tdm)
+if [ -d "/etc/trinity/kdm" ] && [ ! -d "/etc/trinity/tdm" ]; then
+ # copy old configuration
+ cp -a "/etc/trinity/kdm" "/etc/trinity/tdm"
+
+ # cleanup
+ find "/etc/trinity/tdm" -name "*.dpkg-*" -print0 | \
+ xargs -r0 rm
+
+ # rename files
+ find "/etc/trinity/tdm" -name "*kdm*" | \
+ while read f; do mv "${f}" "$(echo "$f" | sed "s|kdm|tdm|g")"; done
+
+ # rename in the files content
+ egrep -rl "KDE|KDM|kdm|kwin" "/etc/trinity/tdm" | tr "\n" "\0" | \
+ xargs -r0 sed -i -e "s|KDE|TDE|g" -e "s|KDM|TDM|g" -e "s|kdm|tdm|g" -e "s|kwin|twin|g"
+fi
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager