[apache2] 01/01: Fix error handling in is_problematic_index_html() in postinst
Stefan Fritsch
sf at moszumanska.debian.org
Sun Aug 7 10:58:36 UTC 2016
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to branch jessie
in repository apache2.
commit 4d0edf57829e21aeb2f0837e9e5213fd9d2073e4
Author: Stefan Fritsch <sf at sfritsch.de>
Date: Sun Aug 7 12:54:58 2016 +0200
Fix error handling in is_problematic_index_html() in postinst
The 'return 1' could never trigger because cut always returns 0.
---
debian/apache2.postinst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/debian/apache2.postinst b/debian/apache2.postinst
index 5b05001..0f6d987 100644
--- a/debian/apache2.postinst
+++ b/debian/apache2.postinst
@@ -273,8 +273,8 @@ install_default_site()
is_problematic_index_html () {
local FILE="$1"
[ -f "$FILE" ] || return 1
- local MD5=$(md5sum "$FILE" 2> /dev/null |cut -d' ' -f 1) ||
- return 1
+ local MD5=$(md5sum "$FILE" 2> /dev/null |cut -d' ' -f 1)
+ [ -n "$MD5" ] || return 1
grep -q "$MD5" <<- EOF
1736dfc80cf1f5a8966c096a0b094377
776221a94e5a174dc2396c0f3f6b6a74
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git
More information about the Pkg-apache-commits
mailing list