From 2885bc03a655324e72a417571586a5055e9448ad Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Fri, 29 May 2015 10:25:31 +0800 Subject: [PATCH] Update update-ca-certificates-dsa to the version of update-ca-certificates soon to be in stretch Signed-off-by: Paul Wise --- modules/ssl/files/update-ca-certificates-dsa | 45 ++++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/modules/ssl/files/update-ca-certificates-dsa b/modules/ssl/files/update-ca-certificates-dsa index b6d35a1f3..bf26ec373 100755 --- a/modules/ssl/files/update-ca-certificates-dsa +++ b/modules/ssl/files/update-ca-certificates-dsa @@ -1,6 +1,6 @@ #!/bin/sh -e -# This is a copy of update-ca-certificates from the ca-certificates package in jessie -# with patches applied to allow custom paths and to allow setting to default certs: +# This is a copy of update-ca-certificates from the ca-certificates package in stretch +# It allows custom paths and setting to default certs: # https://bugs.debian.org/774059 # https://bugs.debian.org/774201 # @@ -8,7 +8,7 @@ # # Copyright (c) 2003 Fumitoshi UKAI # Copyright (c) 2009 Philipp Kern -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -99,7 +99,7 @@ add() { if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ] then ln -sf "$CERT" "$PEM" - echo +$PEM >> "$ADDED" + echo "+$PEM" >> "$ADDED" fi # Add trailing newline to certificate, if it is missing (#635570) sed -e '$a\' "$CERT" >> "$TEMPBUNDLE" @@ -111,27 +111,27 @@ remove() { if test -L "$PEM" then rm -f "$PEM" - echo -$PEM >> "$REMOVED" + echo "-$PEM" >> "$REMOVED" fi } -cd $ETCCERTSDIR +cd "$ETCCERTSDIR" if [ "$fresh" = 1 ]; then - echo -n "Clearing symlinks in $ETCCERTSDIR..." + echo "Clearing symlinks in $ETCCERTSDIR..." find . -type l -print | while read symlink do - case $(readlink $symlink) in - $CERTSDIR*) rm -f $symlink;; + case $(readlink "$symlink") in + $CERTSDIR*) rm -f "$symlink";; esac done find . -type l -print | while read symlink do - test -f $symlink || rm -f $symlink + test -f "$symlink" || rm -f "$symlink" done echo "done." fi -echo -n "Updating certificates in $ETCCERTSDIR... " +echo "Updating certificates in $ETCCERTSDIR..." # Add default certificate authorities if requested if [ "$default" = 1 ]; then @@ -143,12 +143,12 @@ fi # Handle certificates that should be removed. This is an explicit act # by prefixing lines in the configuration files with exclamation marks (!). -sed -n -e '/^$/d' -e 's/^!//p' $CERTSCONF | while read crt +sed -n -e '/^$/d' -e 's/^!//p' "$CERTSCONF" | while read crt do remove "$CERTSDIR/$crt" done -sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt +sed -e '/^$/d' -e '/^#/d' -e '/^!/d' "$CERTSCONF" | while read crt do if ! test -f "$CERTSDIR/$crt" then @@ -194,17 +194,16 @@ echo "$ADDED_CNT added, $REMOVED_CNT removed; done." if [ -d "$HOOKSDIR" ] then -echo -n "Running hooks in $HOOKSDIR...." -VERBOSE_ARG= -[ "$verbose" = 0 ] || VERBOSE_ARG=--verbose -eval run-parts $VERBOSE_ARG --test -- $HOOKSDIR | while read hook -do - ( cat $ADDED - cat $REMOVED ) | $hook || echo E: $hook exited with code $?. -done -echo "done." + echo "Running hooks in $HOOKSDIR..." + VERBOSE_ARG= + [ "$verbose" = 0 ] || VERBOSE_ARG="--verbose" + eval run-parts "$VERBOSE_ARG" --test -- "$HOOKSDIR" | while read hook + do + ( cat "$ADDED" + cat "$REMOVED" ) | "$hook" || echo "E: $hook exited with code $?." + done + echo "done." fi # vim:set et sw=2: - -- 2.20.1