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:52:58 +0200 |
commit | 82bd510b8255a49c9dc34c1405d7f531accb1de0 (patch) | |
tree | f565c1eee6eee0fe25e1b2a59bc2065fc22ae67b | |
parent | 1adac4e6afeeda3459b57fbab46bbf1c822cabd7 (diff) | |
download | vyatta-cfg-82bd510b8255a49c9dc34c1405d7f531accb1de0.tar.gz vyatta-cfg-82bd510b8255a49c9dc34c1405d7f531accb1de0.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 () { |