[debian-edu-commits] r81730 - in branches/wheezy/debian-edu-config: debian share/debian-edu-config/tools
pere at alioth.debian.org
pere at alioth.debian.org
Fri Jul 19 19:20:35 UTC 2013
Author: pere
Date: 2013-07-19 19:20:35 +0000 (Fri, 19 Jul 2013)
New Revision: 81730
Modified:
branches/wheezy/debian-edu-config/debian/changelog
branches/wheezy/debian-edu-config/debian/debian-edu-config.postinst
branches/wheezy/debian-edu-config/share/debian-edu-config/tools/update-iceweasel-homepage
Log:
Rewrite update-iceweasel-homepage to work with Iceweasel in
Wheezy, and add code in the postinst to remove the now obsolete
divert of /usr/share/iceweasel/browserconfig.properties (Closes
#717263).
Modified: branches/wheezy/debian-edu-config/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-config/debian/changelog 2013-07-19 19:16:29 UTC (rev 81729)
+++ branches/wheezy/debian-edu-config/debian/changelog 2013-07-19 19:20:35 UTC (rev 81730)
@@ -5,6 +5,10 @@
set hostname based on reverse DNS or MAC address like we do for
the other machines.
* Fix argument parsing in get-default-homepage.
+ * Rewrite update-iceweasel-homepage to work with Iceweasel in
+ Wheezy, and add code in the postinst to remove the now obsolete
+ divert of /usr/share/iceweasel/browserconfig.properties (Closes
+ #717263).
-- Petter Reinholdtsen <pere at debian.org> Thu, 18 Jul 2013 14:16:00 +0200
Modified: branches/wheezy/debian-edu-config/debian/debian-edu-config.postinst
===================================================================
--- branches/wheezy/debian-edu-config/debian/debian-edu-config.postinst 2013-07-19 19:16:29 UTC (rev 81729)
+++ branches/wheezy/debian-edu-config/debian/debian-edu-config.postinst 2013-07-19 19:20:35 UTC (rev 81730)
@@ -80,6 +80,20 @@
mv -f "$OLDCONFFILE" "$NEWCONFFILE"
}
+
+# Disable/remove divert created by update-iceweasel-homepage in
+# Squeeze.
+disable_iceweasel_homepage_divert() {
+ file=/usr/share/iceweasel/browserconfig.properties
+ etcfile=/etc/iceweasel/browserconfig.properties
+ if [ "$etcfile" = "$(readlink $file)" ] ; then
+ rm $file
+ dpkg-divert --package debian-edu-config \
+ --rename --quiet --remove $file
+ rm $etcfile
+ fi
+}
+
# Execute early, to get the state before changes activated by this
# package is done.
if [ -x /usr/bin/etckeeper ] ; then
@@ -255,6 +269,10 @@
rm_conffile debian-edu-config /etc/cfengine/debian-edu/cf.mplayer
fi
+ if dpkg --compare-versions "$2" le "1.710~svn81721"; then
+ disable_iceweasel_homepage_divert()
+ fi
+
# sssd refuses to read the file if it has any other mode
chmod 600 /etc/sssd/sssd-debian-edu.conf
chown root:root /etc/sssd/sssd-debian-edu.conf
Modified: branches/wheezy/debian-edu-config/share/debian-edu-config/tools/update-iceweasel-homepage
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/tools/update-iceweasel-homepage 2013-07-19 19:16:29 UTC (rev 81729)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/tools/update-iceweasel-homepage 2013-07-19 19:20:35 UTC (rev 81730)
@@ -8,26 +8,8 @@
set -e
-file=/usr/share/iceweasel/browserconfig.properties
-etcfile=/etc/iceweasel/browserconfig.properties
+etcfile=/etc/iceweasel/pref/debian-edu-homepage-ldap.js
-enable() {
- if [ "$etcfile" != "$(readlink $file)" ] ; then
- dpkg-divert --package debian-edu-config \
- --rename --quiet --add $file
- ln -s $etcfile $file
- fi
-}
-
-disable() {
- if [ "$etcfile" = "$(readlink $file)" ] ; then
- rm $file
- dpkg-divert --package debian-edu-config \
- --rename --quiet --remove $file
- rm $etcfile
- fi
-}
-
if [ ldap:homepage = "$1" ] ; then
# Allow lookup script to be replaced using /etc/debian-edu/config
GETDEFAULTHOMEPAGE=/usr/share/debian-edu-config/tools/get-default-homepage
@@ -43,11 +25,11 @@
fi
if [ -z "$url" ] || [ "about:blank" = "$url" ]; then
- disable
+ rm $etcfile
else
cat > $etcfile.new <<EOF
-# This file is diverted from $file
-browser.startup.homepage=$url
+# Generated from LDAP
+pref("browser.startup.homepage","data:text/plain,browser.startup.homepage=$url");
EOF
chmod 644 $etcfile.new
if cmp -s $etcfile $etcfile.new ; then
@@ -56,5 +38,4 @@
mv $etcfile.new $etcfile
logger -t update-iceweasel-homepage "Updated Iceweasel default start page to $url."
fi
- enable
fi
More information about the debian-edu-commits
mailing list