diff options
-rw-r--r-- | rc.d/init.d/functions | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index e857864a..8786e941 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -813,3 +813,9 @@ init_crypto() { # A sed expression to filter out the files that is_ignored_file recognizes __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d' + +#if we have privileges lets log to kmsg, otherwise to stderr +if strstr "$(cat /proc/cmdline)" "rc.debug"; then + [ -w /dev/kmsg ] && exec 30>/dev/kmsg && BASH_XTRACEFD=30 + set -x +fi |