From 2e8acce842f03494017978de5c45d344a497cced Mon Sep 17 00:00:00 2001 From: lars Date: Fri, 22 Jul 2005 10:54:12 +0000 Subject: [PATCH] 404-page improved name of the template included in html source code as comment validation results: non-empty diff files will not be removed test case for 404 fixed --- cryptobox.conf.d/usr/lib/cryptobox/validate.sh | 7 +++++-- .../usr/share/cryptobox/templates/main.cs | 2 ++ .../1-init/005-file_not_found_404/output | 7 ------- cryptobox.conf.d/var/www/errors/err404.html | 14 ++++++++++++-- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/cryptobox.conf.d/usr/lib/cryptobox/validate.sh b/cryptobox.conf.d/usr/lib/cryptobox/validate.sh index 32105c4..e7ea4d6 100755 --- a/cryptobox.conf.d/usr/lib/cryptobox/validate.sh +++ b/cryptobox.conf.d/usr/lib/cryptobox/validate.sh @@ -62,12 +62,15 @@ create_summary() local DIFF_FILE=${a%.desc}.diff if [ -s "$DIFF_FILE" ] then cat "$SUMMARY_TEMPLATE_DIR/result-error" - cat "$DIFF_FILE" + cat "$DIFF_FILE" | sed 's/\$//' else cat "$SUMMARY_TEMPLATE_DIR/result-ok" echo "no differences found" fi cat "$SUMMARY_TEMPLATE_DIR/single_footer" - rm "$DIFF_FILE" "$a" + # remove description file + rm "$a" + # remove if empty + [ -e "$DIFF_FILE" -a ! -s "$DIFF_FILE"] && rm "$DIFF_FILE" done cat "$SUMMARY_TEMPLATE_DIR/footer" } diff --git a/cryptobox.conf.d/usr/share/cryptobox/templates/main.cs b/cryptobox.conf.d/usr/share/cryptobox/templates/main.cs index 5666d3f..df372b2 100644 --- a/cryptobox.conf.d/usr/share/cryptobox/templates/main.cs +++ b/cryptobox.conf.d/usr/share/cryptobox/templates/main.cs @@ -1,6 +1,8 @@ + + diff --git a/cryptobox.conf.d/usr/share/cryptobox/test-cases/1-init/005-file_not_found_404/output b/cryptobox.conf.d/usr/share/cryptobox/test-cases/1-init/005-file_not_found_404/output index e218e20..e69de29 100644 --- a/cryptobox.conf.d/usr/share/cryptobox/test-cases/1-init/005-file_not_found_404/output +++ b/cryptobox.conf.d/usr/share/cryptobox/test-cases/1-init/005-file_not_found_404/output @@ -1,7 +0,0 @@ -Data.Config.IP=192.168.0.23 -Data.Config.Language=de -Data.Config.TimeOut=30 -Data.Status.Config=0 -Data.Status.InitRunning=0 -Data.Status.IP=192.168.0.23 -Data.Status.Mounted=0 diff --git a/cryptobox.conf.d/var/www/errors/err404.html b/cryptobox.conf.d/var/www/errors/err404.html index 5f67ee3..d412353 100644 --- a/cryptobox.conf.d/var/www/errors/err404.html +++ b/cryptobox.conf.d/var/www/errors/err404.html @@ -9,8 +9,18 @@ -

Error 404 - page not found!

-

Please go to the CryptoBox-Interface

+
+ + +
+
+

Error 404 - page not found!

+

Please go to the CryptoBox-Interface

+
+
+