[debian-edu-commits] debian-edu/ 03/07: sbin/snake-on-ice: Rename /etc/firefox to /etc/firefox-esr. Only declare OVERRIDE_FILE once and then use it accordingly (instead of hard-coding /etc/firefox(-esr) several times. Use more quotes.

Mike Gabriel sunweaver at debian.org
Thu Jul 7 10:39:41 UTC 2016


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository debian-edu-config.

commit b0c0b0337bc53e5250a565c950889f6eca16c207
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Jul 7 12:28:45 2016 +0200

    sbin/snake-on-ice: Rename /etc/firefox to /etc/firefox-esr. Only declare OVERRIDE_FILE once and then use it accordingly (instead of hard-coding /etc/firefox(-esr) several times. Use more quotes.
---
 debian/changelog     | 3 +++
 sbin/snakeoil-on-ice | 7 +++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ecb0af1..6daee9b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,9 @@ debian-edu-config (1.905) UNRELEASED; urgency=medium
   * Rename cf.firefox to cf.firefox-esr and make sure it operated on
    /etc/firefox-esr.
   * firefox-networked-prefs.js: Fix configuration folder in comment.
+  * sbin/snake-on-ice: Rename /etc/firefox to /etc/firefox-esr. Only
+    declare OVERRIDE_FILE once and then use it accordingly (instead
+    of hard-coding /etc/firefox(-esr) several times. Use more quotes.
 
  -- Holger Levsen <holger at debian.org>  Wed, 06 Jul 2016 13:16:50 +0200
 
diff --git a/sbin/snakeoil-on-ice b/sbin/snakeoil-on-ice
index 2112be0..9911065 100644
--- a/sbin/snakeoil-on-ice
+++ b/sbin/snakeoil-on-ice
@@ -68,7 +68,7 @@ fi
 # Write the override entries in the default profile.
 # These will be copied to new Firefox profiles.
 
-OVERRIDE_FILE=/etc/firefox/profile/cert_override.txt
+OVERRIDE_FILE=/etc/firefox-esr/profile/cert_override.txt
 SED_SERVERS=$(echo $SERVERS | sed 's/ /\\|/g')
 FINGERPRINT=$(openssl x509 -in $CERT -noout -sha256 -fingerprint | sed 's/SHA256 Fingerprint=//')
 OVERRIDE_STRING="OID.2.16.840.1.101.3.4.2.1	$FINGERPRINT	MU	AAAAAAAAAAAAAAAJAAAAGgDgwHd5q3rzhTAYMRYwFAYDVQQDEw10amVuZXIuaW50  ZXJu"	# Bogus database key (A.*Ju)
@@ -88,7 +88,7 @@ if [ -f $OVERRIDE_FILE ]; then
 			"\n\tcreated versioned backup in /var/backups/cert_override.x."
 	fi
 else
-	[ -d /etc/firefox/profile ] || mkdir -p /etc/firefox/profile
+	[ -d "$(dirname $OVERRIDE_FILE)" ] || mkdir -p "$(dirname $OVERRIDE_FILE)"
 	echo -e '# PSM Certificate Override Settings file\n# This is a generated file!  Do not edit.\n' > $OVERRIDE_FILE.temp;
 fi
 
@@ -139,12 +139,11 @@ if [[ $PROFILE =~ Main-Server ]]; then
 fi
 
 for ROOT in `find /opt/ltsp/ -mindepth 1 -maxdepth 1 -type d`; do
-    if [ ! -d $ROOT/etc/firefox/profile ] ; then
+    if [ ! -d "$ROOT$(dirname $OVERRIDE_FILE)" ] ; then
 	continue # Only process LTSP chroots with firefox installed
     fi
     # Make sure self signed SSL certificate for internal web site also
     # work on diskless workstations.
-    OVERRIDE_FILE=/etc/firefox/profile/cert_override.txt
     if [ -f $OVERRIDE_FILE ] ; then
         mkdir -p $(dirname $ROOT$OVERRIDE_FILE)
         if cp $OVERRIDE_FILE $ROOT$OVERRIDE_FILE ; then

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list