blob: 9c4a295626d6e2b672e78f6d59c7f828d8488e61 [file] [log] [blame] [edit]
# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Debug tty that only runs in debug builds"
author "chromeos-core-services@google.com"
env DEBUG_CONSOLE=/run/frecon/vt2
console output
start on started frecon
respawn
oom score never
pre-start script
if crossystem "cros_debug?1"; then
# Enable cursor and input on debug console in dev mode.
printf "\033[?25h" > "${DEBUG_CONSOLE}"
printf "\033]input:on\a" > "${DEBUG_CONSOLE}"
return
fi
# stop job from continuing since we are not in dev mode
stop; exit 0;
end script
exec /bin/sh<"${DEBUG_CONSOLE}" >"${DEBUG_CONSOLE}" 2>&1