summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-04-14 10:51:56 +0200
committerDaniil Baturin <daniil@baturin.org>2019-04-14 10:51:56 +0200
commit5356c3d5cd2a625840599f59f21c4088e150ae00 (patch)
tree8c25a1ae3b1815ce723ff802fbf25369dcc4cd7d
parent2b2010c42b827e7d119d962c7f4a1bc00900800a (diff)
downloadvyatta-cfg-5356c3d5cd2a625840599f59f21c4088e150ae00.tar.gz
vyatta-cfg-5356c3d5cd2a625840599f59f21c4088e150ae00.zip
T1273: add an kernel command line option to enable debugging on boot.
-rwxr-xr-xscripts/vyatta-boot-config-loader9
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 () {