utils/watchcat: Fix some typos (mostly found by codespell)

Note that this implies an API change (allways -> always).
The wrong spelling "allways" is still accepted for backward compatibility.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil
2016-04-30 09:46:34 +02:00
parent 717f467f15
commit afbe8dcb87
2 changed files with 18 additions and 12 deletions
+6 -3
View File
@@ -7,6 +7,9 @@
mode="$1"
# Fix potential typo in mode (backward compatibility).
[ "$mode" = "allways" ] && mode="always"
shutdown_now() {
local forcedelay="$1"
@@ -19,7 +22,7 @@ shutdown_now() {
}
}
watchcat_allways() {
watchcat_always() {
local period="$1"; local forcedelay="$2"
sleep "$period" && shutdown_now "$forcedelay"
@@ -66,9 +69,9 @@ watchcat_ping() {
done
}
if [ "$mode" = "allways" ]
if [ "$mode" = "always" ]
then
watchcat_allways "$2" "$3"
watchcat_always "$2" "$3"
else
watchcat_ping "$2" "$3" "$4" "$5"
fi