Start Home Assistant CLI on tty1 without login (#1366)
* Start ha-cli on tty1 instead of a getty Instead of starting a getty start the ha-cli directly. This will show the banner right on startup with the important information such as IP address of the instance or the URL to reach it. * Use default shell as root shell instead of HA CLI Instead of using the ha-cli.sh script as login shell use the regular shell. Amongst other things, this allows to run VS Code devcontainers remotely via SSH or using scp. The HA CLI is still available using the `ha` command.
This commit is contained in:
@@ -16,7 +16,6 @@ BOARD_DIR=${2}
|
||||
# HassOS tasks
|
||||
fix_rootfs
|
||||
install_tini_docker
|
||||
install_hassos_cli
|
||||
|
||||
# Write os-release
|
||||
# shellcheck disable=SC2153
|
||||
|
||||
@@ -37,17 +37,6 @@ function fix_rootfs() {
|
||||
}
|
||||
|
||||
|
||||
function install_hassos_cli() {
|
||||
|
||||
# shellcheck disable=SC1117
|
||||
sed -i "s|\(root:.*\)/bin/sh|\1/usr/sbin/hassos-cli|" "${TARGET_DIR}/etc/passwd"
|
||||
|
||||
if ! grep "hassos-cli" "${TARGET_DIR}/etc/shells"; then
|
||||
echo "/usr/sbin/hassos-cli" >> "${TARGET_DIR}/etc/shells"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function install_tini_docker() {
|
||||
ln -fs /usr/bin/tini "${TARGET_DIR}/usr/bin/docker-init"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user