[debian-edu-commits] debian-edu/ 83/437: * Rewrite update-artwork to avoid warning message from grep if /etc/kde3/kdm/kdmrc is missing.
Mike Gabriel
sunweaver at debian.org
Sun Mar 2 23:49:25 UTC 2014
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository debian-edu-artwork.
commit 7ab9e4c868014a5f618d51f57c1c722c5bd27bb5
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Fri Sep 15 18:29:39 2006 +0000
* Rewrite update-artwork to avoid warning message from grep if
/etc/kde3/kdm/kdmrc is missing.
---
debian/changelog | 2 ++
debian/update-artwork | 44 ++++++++++++++++++++++++--------------------
2 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 91dc01f..1eb4f4d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ debian-edu-artwork (0.0.11~1) unstable; urgency=low
* Update README with into that the images should be GPL-licensed and
that "source" files should be included for the images to make them
easy to modify.
+ * Rewrite update-artwork to avoid warning message from grep if
+ /etc/kde3/kdm/kdmrc is missing.
-- Petter Reinholdtsen <pere at debian.org> Thu, 14 Sep 2006 22:52:53 +0200
diff --git a/debian/update-artwork b/debian/update-artwork
index 2c437fb..dc8a406 100644
--- a/debian/update-artwork
+++ b/debian/update-artwork
@@ -4,6 +4,8 @@ set -e
editini=/usr/share/debian-edu-artwork/edit-ini
+kdmrc=/etc/kde3/kdm/kdmrc
+
change_ldm_background() {
update-alternatives --install /usr/share/ldm/themes/default \
ldm-theme /usr/share/ldm/themes/debian-edu 80
@@ -11,15 +13,14 @@ change_ldm_background() {
# switch kdm theme to debian-edu
change_kdm_theme() {
- kdmrc=/etc/kde3/kdm/kdmrc
- if grep -q '^UseTheme=true' $kdmrc; then
- if grep -q '^Theme=/usr/share/apps/kdm/themes/debian-edu' $kdmrc; then
- echo "KDM theme for Debian Edu already enabled, not touching kdmrc."
+ if [ -f $kdmrc ] ; then
+ if grep -q '^UseTheme=true' $kdmrc; then
+ if grep -q '^Theme=/usr/share/apps/kdm/themes/debian-edu' $kdmrc; then
+ echo "KDM theme for Debian Edu already enabled, not touching kdmrc."
+ else
+ echo "KDM theme already customized, not touching kdmrc."
+ fi
else
- echo "KDM theme already customized, not touching kdmrc."
- fi
- else
- if [ -f $kdmrc ] ; then
echo "Installing and enabling Debian Edu KDM theme ..."
# This is not policy compilant, as $kdmrc is a conffile in
# the kdm package, and we are editing it in a package
@@ -39,29 +40,32 @@ change_kdm_theme() {
if [ -f $bgrc ] ; then
$editini $bgrc 'Desktop0' Wallpaper debian-edu-wallpaper.png
fi
- else
- echo "KDM not installed, not enabling KDM theme."
fi
+ else
+ echo "KDM not installed, not enabling KDM theme."
fi
}
# switch kdm theme away from debian-edu
restore_kdm_theme() {
- kdmrc=/etc/kde3/kdm/kdmrc
defaulttheme=/usr/share/apps/kdm/themes/circles
- if grep -q '^Theme=/usr/share/apps/kdm/themes/debian-edu' $kdmrc &&
- grep -q '^UseTheme=true' $kdmrc; then
+ if [ -f $kdmrc ] ; then
+ if grep -q '^Theme=/usr/share/apps/kdm/themes/debian-edu' $kdmrc &&
+ grep -q '^UseTheme=true' $kdmrc; then
- echo "Removing and disabling Debian Edu KDM theme ..."
- $editini $kdmrc 'X-*-Greeter' UseTheme false
- $editini $kdmrc 'X-*-Greeter' Theme $defaulttheme
+ echo "Removing and disabling Debian Edu KDM theme ..."
+ $editini $kdmrc 'X-*-Greeter' UseTheme false
+ $editini $kdmrc 'X-*-Greeter' Theme $defaulttheme
- bgrc=/etc/kde3/kdm/backgroundrc
- if grep -q '^Wallpaper=debian-edu-wallpaper.png' $bgrc ; then
- $editini $bgrc 'Desktop0' Wallpaper debian-kde_default.png
+ bgrc=/etc/kde3/kdm/backgroundrc
+ if grep -q '^Wallpaper=debian-edu-wallpaper.png' $bgrc ; then
+ $editini $bgrc 'Desktop0' Wallpaper debian-kde_default.png
+ fi
+ else
+ echo "KDM theme customised or not enabled, not touching kdmrc ..."
fi
else
- echo "KDM theme customised or not enabled, not touching kdmrc ..."
+ echo "KDM not installed, not disabling KDM theme."
fi
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-artwork.git
More information about the debian-edu-commits
mailing list