好不容易找到一个 redhat 9 查了一下, action 是在 /etc/rc.d/init.d/functions 中定义的:
复制内容到剪贴板
代码:
# Run some action. Log its output.
action() {
STRING=$1
echo -n "$STRING "
shift
initlog $INITLOG_ARGS -c "$*" && success $"$STRING" || failure $"$STRING"
rc=$?
echo
return $rc
}