diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-04-14 10:51:56 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-04-14 10:51:56 +0200 |
commit | 5356c3d5cd2a625840599f59f21c4088e150ae00 (patch) | |
tree | 8c25a1ae3b1815ce723ff802fbf25369dcc4cd7d | |
parent | 2b2010c42b827e7d119d962c7f4a1bc00900800a (diff) | |
download | vyatta-cfg-5356c3d5cd2a625840599f59f21c4088e150ae00.tar.gz vyatta-cfg-5356c3d5cd2a625840599f59f21c4088e150ae00.zip |
T1273: add an kernel command line option to enable debugging on boot.
-rwxr-xr-x | scripts/vyatta-boot-config-loader | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/vyatta-boot-config-loader b/scripts/vyatta-boot-config-loader index aead348..b445d9e 100755 --- a/scripts/vyatta-boot-config-loader +++ b/scripts/vyatta-boot-config-loader @@ -15,7 +15,14 @@ do_log () { } do_commit () { - $COMMIT "$@" >>$COMMIT_LOG + # Check if debug is enabled in the kernel command line + if [ ! grep vyos-debug /proc/cmdline > /dev/null ]; then + debug="" + else + debug="yes" + fi + + VYOS_DEBUG=$debug $COMMIT "$@" >>$COMMIT_LOG } trace () { |