X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Ffunctions;h=9c3017446eb049e7d10a5a34d7f545e1442cb949;hb=cce0d3d757dba4c849b7b7e907e3e2cf26f8b76b;hp=c664f2f76af6d8ae4d856fc2a367628b6ad2df81;hpb=3b1a17178d25187b0afbf1926c29ae52253bc02e;p=util-vserver.git diff --git a/util-vserver/scripts/functions b/util-vserver/scripts/functions index c664f2f..9c30174 100644 --- a/util-vserver/scripts/functions +++ b/util-vserver/scripts/functions @@ -71,6 +71,7 @@ function getPhysicalDir ( set -P && cd "$1" && pwd ) } +## Usage: logging function logging { if test "$_VS_LOGFILE"; then @@ -80,6 +81,7 @@ function logging fi } +## Usage: warning function warning { if test "$_VS_ERRFILE"; then @@ -89,6 +91,7 @@ function warning fi } +## Usage: panic function panic { if test "$_VS_ERRFILE"; then @@ -100,6 +103,7 @@ function panic exit 1 } +## Usage: execute function execute { test -z "${DEBUG_EXEC:-}" || echo "$@" @@ -107,6 +111,7 @@ function execute exit 0 } +## Usage: isNumber function isNumber { local tmp @@ -114,6 +119,72 @@ function isNumber return 0 } +## Usage: colorize