[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:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to branch master
in repository apache2.
commit 5eb37e95631674bdac6e0ba4d2d0f0fe1894917a
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 9385a82..b00075f 100644
--- a/debian/apache2.postinst
+++ b/debian/apache2.postinst
@@ -79,8 +79,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