Commit d1e17757 authored by Andreas Henriksson's avatar Andreas Henriksson

kbd.init: only parse logind.conf if we're running systemd

Instead of checking if systemd is installed, check if we're
using systemd init before considering looking at logind.conf.
parent 84259fc2
......@@ -126,7 +126,7 @@ setup ()
if [ -d /etc/init ] && which initctl >/dev/null; then
# Upstart
LIST_CONSOLES=`cd /etc/init; find -name 'tty*.conf' -printf '%f ' | sed -e 's/[^0-9 ]//g'`
elif [ -f /etc/systemd/logind.conf ] && which systemd >/dev/null; then
elif [ -f /etc/systemd/logind.conf ] && [ -d /run/systemd/system ]; then
# systemd
N_CONSOLES=`sed -ne 's/#.*//; /NAutoVTs/ { s/[^0-9]//g; p }' /etc/systemd/logind.conf`
if [ -z "$N_CONSOLES" ]; then
......
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