diff options
Diffstat (limited to 'rc.d/init.d/functions')
-rw-r--r-- | rc.d/init.d/functions | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 8786e941..e3cae113 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -577,6 +577,19 @@ action() { return $rc } +# Run some action. Silently. +action_silent() { + local STRING rc + + STRING=$1 + echo -n "$STRING " + shift + "$@" >/dev/null && success $"$STRING" || failure $"$STRING" + rc=$? + echo + return $rc +} + # returns OK if $1 contains $2 strstr() { [ "${1#*$2*}" = "$1" ] && return 1 |