I was suprised not to be able to find any documentation regarding the proper user of these functions:
log_daemon_msg
log_progress_msg
log_end_msg
log_action_msg
log_success_msg
log_failure_msg
log_warning_msg
Where can I find more information about their usage and maybe other related functions?
Note, I found them inside /lib/lsb/init-functions
but the is documentation regarding their usage is mostly missing.
I think this is what you are looking for:
http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
I've been reading a lot of init scripts on debian wheezy but there doesn't seems to be a unified way of creating init scripts. Some people use echo
instead of log_warning_msg
or log_failure_msg
.
Note: /lib/lsb/init-functions
doesn't seem to work well under bash. So remember to use the appropriate shebang:
#!/bin/sh