Commit ae2904f6 authored by segfault's avatar segfault
Browse files

Add --debug option to Greeter

To facilitate debugging.
parent 16eb0241
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
cd /usr/share/tails-greeter/ cd /usr/share/tails-greeter/
export LANG="en_US.UTF-8" export LANG="en_US.UTF-8"
/usr/share/tails-greeter/set-cursor.py watch /usr/share/tails-greeter/set-cursor.py watch
/usr/bin/python3 ./tails-greeter.py /usr/bin/python3 ./tails-greeter.py "$@"
...@@ -33,7 +33,8 @@ logging.config.fileConfig('tails-logging.conf') ...@@ -33,7 +33,8 @@ logging.config.fileConfig('tails-logging.conf')
# Set loglevel if debug is found in kernel command line # Set loglevel if debug is found in kernel command line
with open('/proc/cmdline') as cmdline_fd: with open('/proc/cmdline') as cmdline_fd:
cmdline = cmdline_fd.read() cmdline = cmdline_fd.read()
if "debug" in cmdline.split(): if "debug" in cmdline.split() or \
(len(sys.argv) > 1 and sys.argv[1] == "--debug"):
logging.getLogger().setLevel(logging.DEBUG) logging.getLogger().setLevel(logging.DEBUG)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment