35 lines
542 B
Bash
Executable File
35 lines
542 B
Bash
Executable File
#!/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 "${THIS}${@}..." | tee /dev/kmsg
|
|
}
|
|
|
|
log_action_cont_msg () {
|
|
echo "${THIS}${@}..." | tee /dev/kmsg
|
|
}
|
|
|
|
log_action_end_msg () {
|
|
local end
|
|
if [ -z "${2:-}" ]; then
|
|
end="."
|
|
else
|
|
end=" ($2)."
|
|
fi
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
echo "${THIS}done${end}" | tee /dev/kmsg
|
|
else
|
|
echo "${THIS}failed${end}" | tee /dev/kmsg
|
|
fi
|
|
}
|
|
|