summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2016-08-07 12:54:58 +0200
committerStefan Fritsch <sf@sfritsch.de>2016-08-07 12:54:58 +0200
commit5eb37e95631674bdac6e0ba4d2d0f0fe1894917a (patch)
treefffa27f20f729b3ec519355d8fc35bde802c5b9d
parentf2d31c0616295d813d88e6247185377e64797c58 (diff)
downloadapache2-5eb37e95631674bdac6e0ba4d2d0f0fe1894917a.tar.gz
Fix error handling in is_problematic_index_html() in postinst
The 'return 1' could never trigger because cut always returns 0.
-rw-r--r--debian/apache2.postinst4
1 files changed, 2 insertions, 2 deletions
diff --git a/debian/apache2.postinst b/debian/apache2.postinst
index 9385a826..b00075fa 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