[debian-edu-commits] debian-edu/ 256/437: remove obsoleted stuff; add grub.cfg update functions
Mike Gabriel
sunweaver at debian.org
Sun Mar 2 23:49:40 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 ef8935981ebe671e9642496ddd75c92a357e10fd
Author: Andreas B. Mundt <andi.mundt at web.de>
Date: Wed Apr 14 08:09:36 2010 +0000
remove obsoleted stuff; add grub.cfg update functions
---
debian/changelog | 8 +++---
debian/edit-ini | 68 ----------------------------------------------
debian/update-artwork | 75 +++++++++------------------------------------------
3 files changed, 18 insertions(+), 133 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index a3cb197..4925180 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,10 +9,12 @@ debian-edu-artwork (0.0.30-5) UNRELEASED; urgency=low
* Update kdm and gdm theme (Closes: #572769).
* Regenerate some Makefile.in files using automake (gdm-theme, kdm-theme
and splash).
- * Add new wallpaper.
- * Fix paths in debian/update-artwork (kde3 -> kde4).
+ * Remove outdated functions in debian/update-artwork.
+ * Remove obsoleted debian/edit-ini.
+ * Add new wallpaper and grub2 background.
+ * Add functions to update grub.cfg in debian/update-artwork.
- -- Andreas B. Mundt <andi.mundt at web.de> Mon, 12 Apr 2010 14:43:00 +0200
+ -- Andreas B. Mundt <andi.mundt at web.de> Wed, 14 Apr 2010 10:01:14 +0200
debian-edu-artwork (0.0.30-4) unstable; urgency=low
diff --git a/debian/edit-ini b/debian/edit-ini
deleted file mode 100755
index 22979bf..0000000
--- a/debian/edit-ini
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/perl
-#
-# Author: Petter Reinholdtsen <pere at hungry.com>
-# Date: 2002-08-11
-#
-# Command line tool to modify .ini style files.
-#
-# Copy of /usr/bin/update-ini-file from debian-edu-config, copied here
-# to avoid the dependency.
-
-use strict;
-use warnings;
-use Config::IniFiles;
-
-usage() if (4 > @ARGV);
-
-my $filename = shift;
-my $section = shift;
-my $key = shift;
-my $value = shift;
-
-# Make sure the file exist, as Config::IniFiles do not create empty
-# config files.
-if ( ! -f $filename ) {
- open(FILE, "> $filename") || die "Unable to create $filename";
- print FILE "[$section]\n";
- close(FILE);
-} else {
- # Make sure the file contain more then just comment lines, because
- # the module fail to create an object if it does. This problem
- # was discovered with /etc/opera6rc.fixed
- open(FILE, "< $filename");
- my $count = 0;
- while (<FILE>) {
- chomp;
- s/[;\#].+$//;
- next if m/^\s*$/;
- $count++;
- }
- close(FILE);
- if (0 == $count) {
- open(FILE, ">> $filename") || die "Unable to append to $filename";
- print FILE "[$section]\n";
- close(FILE);
- }
-}
-
-my $ini = new Config::IniFiles( -file => $filename );
-
-if ($ini) {
- $ini->AddSection($section);
- my $oldpath = $ini->newval($section, $key, $value);
- if ( ! $ini->RewriteConfig ) {
- print STDERR "error: Unable to set value for ".
- "section [$section], key='$key' in $filename!\n";
- exit 1;
- }
-} else {
- print STDERR "error: Unable to load $filename!\n";
- exit 1;
-}
-
-exit 0;
-
-sub usage {
- print "edit-ini <file> <section> <variable> <value>\n";
- exit 0;
-}
diff --git a/debian/update-artwork b/debian/update-artwork
index ef6e63f..84b6e04 100644
--- a/debian/update-artwork
+++ b/debian/update-artwork
@@ -1,11 +1,6 @@
#! /bin/sh
-
set -e
-editini=/usr/share/debian-edu-artwork/edit-ini
-
-kdmrc=/etc/kde4/kdm/kdmrc
-
change_ldm_background() {
update-alternatives --install /usr/share/ldm/themes/default \
ldm-theme /usr/share/ldm/themes/debian-edu 80
@@ -15,74 +10,30 @@ restore_ldm_background() {
update-alternatives --remove ldm-theme /usr/share/ldm/themes/debian-edu
}
-# switch kdm theme to debian-edu
-change_kdm_theme() {
- 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 "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
- # maintainer script. Need to come up with a better way to
- # do it. See also
- # http://release.debian.org/etch_rc_policy.txt
-
- # First update the KDM theme
-
- $editini $kdmrc 'X-*-Greeter' UseTheme true
- $editini $kdmrc 'X-*-Greeter' Theme \
- /usr/share/apps/kdm/themes/debian-edu
-
- # Next, update the background used after the KDM theme is
- # removed and before kdesktop insert the selected background.
- bgrc=/etc/kde4/kdm/backgroundrc
- if [ -f $bgrc ] ; then
- $editini $bgrc 'Desktop0' Wallpaper debian-edu-wallpaper.png
- fi
- fi
- else
- echo "KDM not installed, not enabling KDM theme."
+change_grub_background() {
+ if ! grep -q 'debian-edu-splash-grub.png' /boot/grub/grub.cfg ; then
+ ## update-grub2 should find our splash image and update grub.cfg:
+ update-grub2
fi
}
-# switch kdm theme away from debian-edu
-restore_kdm_theme() {
- defaulttheme=@@@ToBeReplacedByDesktopBase@@@
- defaultwallpaper=default_blue.jpg
- 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
-
- bgrc=/etc/kde4/kdm/backgroundrc
- if grep -q '^Wallpaper=debian-edu-wallpaper.png' $bgrc ; then
- $editini $bgrc 'Desktop0' Wallpaper $defaultwallpaper
- fi
- else
- echo "KDM theme customised or not enabled, not touching kdmrc ..."
- fi
- else
- echo "KDM not installed, not disabling KDM theme."
+restore_grub_background() {
+ if grep -q 'debian-edu-splash-grub.png' /boot/grub/grub.cfg ; then
+ ## update-grub2 should revert grub.cfg to point to the default image:
+ update-grub2
fi
}
+## change_kdm_theme() and restore_kdm_theme() are not needed anymore,
+## our theme is added to /etc/default/kdm.d/
+
case "$1" in
configure)
change_ldm_background
-# Switched to using the new kdm configuration option 2007-07-04
- restore_kdm_theme
-# change_kdm_theme
+ change_grub_backgrond
;;
remove)
-# restore_kdm_theme
restore_ldm_background
+ restore_grub_background
;;
esac
--
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