diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2015-02-27 13:28:06 +0100 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2015-02-27 14:41:39 +0100 |
commit | 218e4d58ed0a1a8a5e6d75b178940a097444801d (patch) | |
tree | 53b564a5237f463665028849a1112101512c8fdc | |
parent | c93ddceaa09d59be56b2b5dd64ab38febb5fafb2 (diff) | |
download | initscripts-218e4d58ed0a1a8a5e6d75b178940a097444801d.tar initscripts-218e4d58ed0a1a8a5e6d75b178940a097444801d.tar.gz initscripts-218e4d58ed0a1a8a5e6d75b178940a097444801d.tar.bz2 initscripts-218e4d58ed0a1a8a5e6d75b178940a097444801d.tar.xz initscripts-218e4d58ed0a1a8a5e6d75b178940a097444801d.zip |
init.d/functions: rc.debug option to debug initscripts
Conflicts:
rc.d/init.d/functions
-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 |