]> git.ipfire.org Git - people/ms/network.git/commitdiff
functions.config: Fix call for check function.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 12 May 2013 17:00:04 +0000 (17:00 +0000)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 12 May 2013 17:00:04 +0000 (17:00 +0000)
If a check function is not available don't crash with an error.

functions.config

index c142428fecdf3e93287ce010ba469c198b9c2b52..3854742ed14de9e428b3b4271d54ec8c7db587ab 100644 (file)
@@ -143,7 +143,11 @@ function config_print() {
 function config_check() {
        # If there is a function defined that is called __check
        # we call that function
-       [ -n "$(type -t _check)" ] && _check || return $?
+       if [ -n "$(type -t _check)" ]; then
+               _check || return $?
+       fi
+
+       return ${EXIT_OK}
 }
 
 function config_header() {