Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions data/data/agent/files/usr/local/bin/agent-interactive-console.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

echo "agent-interactive-console start"
systemctl status pre-network-manager-config.service

# TODO: Execute tui and remove sleep
echo "sleeping 60 seconds"
sleep 60

echo "agent-interactive-console end"
19 changes: 19 additions & 0 deletions data/data/agent/systemd/units/agent-interactive-console.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[Unit]
Description=Get interactive user configuration at boot
After=network-pre.target NetworkManager.service pre-network-manager-config.service selinux.service
Before=network.target network.service agent.service NetworkManager-wait-online.service

[Service]
Type=oneshot
TTYPath=/dev/tty15
ExecStartPre=/usr/bin/chvt 15
ExecStart="/usr/local/bin/agent-interactive-console.sh"
ExecStartPost=/usr/bin/chvt 1
TimeoutStartSec=0
StandardInput=tty
TTYVHangup=yes
TTYVTDisallocate=yes

[Install]
WantedBy=default.target
RequiredBy=sshd.service systemd-logind.service [email protected]
9 changes: 9 additions & 0 deletions data/data/agent/systemd/units/agent-tui.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Activate agent-interactive-console.service only when the agent-tui path exists

[Path]
PathExists=/usr/local/bin/agent-tui
Unit=agent-interactive-console.service

[Install]
WantedBy=default.target
1 change: 1 addition & 0 deletions pkg/asset/agent/image/ignition.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ func (a *Ignition) Generate(dependencies asset.Parents) error {

agentEnabledServices := []string{
"agent.service",
"agent-tui.path",
"assisted-service-db.service",
"assisted-service-pod.service",
"assisted-service.service",
Expand Down
1 change: 1 addition & 0 deletions pkg/asset/agent/image/ignition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ metadata:
"/root/assisted.te",
"/usr/local/bin/common.sh",
"/usr/local/bin/agent-gather",
"/usr/local/bin/agent-interactive-console.sh",
"/usr/local/bin/extract-agent.sh",
"/usr/local/bin/get-container-images.sh",
"/usr/local/bin/install-status.sh",
Expand Down