aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/functions
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2015-02-27 15:19:38 +0100
committerLukas Nykryn <lnykryn@redhat.com>2015-02-27 15:19:38 +0100
commit6b8e2996a8eb36aa70873f3d3e1728b57cdae571 (patch)
tree6246dc072ff45516777189962f574e570c88dde9 /rc.d/init.d/functions
parent218e4d58ed0a1a8a5e6d75b178940a097444801d (diff)
downloadinitscripts-6b8e2996a8eb36aa70873f3d3e1728b57cdae571.tar
initscripts-6b8e2996a8eb36aa70873f3d3e1728b57cdae571.tar.gz
initscripts-6b8e2996a8eb36aa70873f3d3e1728b57cdae571.tar.bz2
initscripts-6b8e2996a8eb36aa70873f3d3e1728b57cdae571.tar.xz
initscripts-6b8e2996a8eb36aa70873f3d3e1728b57cdae571.zip
rc.sysinit: be more verbose
Diffstat (limited to 'rc.d/init.d/functions')
-rw-r--r--rc.d/init.d/functions13
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