FunKey-OS/FunKey/board/funkey/rootfs-overlay/lib/lsb/init-functions

35 lines
539 B
Plaintext
Raw Normal View History

2018-03-08 07:14:48 +00:00
#!/bin/sh
#set -xv
if [ x"$THIS" != x ]; then
THIS="${THIS}: "
fi
log_action_msg () {
echo "${THIS}${@}." | tee /dev/kmsg
}
log_action_begin_msg () {
echo -n "${THIS}${@}: " | tee /dev/kmsg
2018-03-08 07:14:48 +00:00
}
log_action_cont_msg () {
echo "${THIS}${@}..." | tee /dev/kmsg
}
log_action_end_msg () {
local end
if [ -z "${2:-}" ]; then
end=""
2018-03-08 07:14:48 +00:00
else
end=" ($2)"
2018-03-08 07:14:48 +00:00
fi
if [ $1 -eq 0 ]; then
echo "${THIS}OK${end}" | tee /dev/kmsg
2018-03-08 07:14:48 +00:00
else
echo "${THIS}ERROR${end}" | tee /dev/kmsg
2018-03-08 07:14:48 +00:00
fi
}