Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent USB serial console #4849

Closed
d3pr3cat3d opened this issue Mar 20, 2021 · 4 comments
Closed

Persistent USB serial console #4849

d3pr3cat3d opened this issue Mar 20, 2021 · 4 comments
Assignees
Labels
cleanup Low impact changes
Milestone

Comments

@d3pr3cat3d
Copy link

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the solution you like

A clear and concise description of what you want to happen.
(e.g. I would like an input field in the /ui/firewall/alias which would add .... to ....)

I would like USB serial use to be persistent over reboots. The solution that may work, is to change "onifconsole" to "on" in /etc/ttys?

Reference: https://forum.opnsense.org/index.php?topic=21266.msg104944#msg104944

@fichtner fichtner self-assigned this Mar 20, 2021
@fichtner fichtner added the cleanup Low impact changes label Mar 20, 2021
@fichtner fichtner added this to the 21.7 milestone Mar 20, 2021
@fichtner
Copy link
Member

Taking this as promised. Will work on it next week. Thanks!

@fichtner
Copy link
Member

Back now to test this and it seems that cd2c3b0 should do the trick.

To apply for testing:

# opnsense-patch cd2c3b0

Cheers,
Franco

@d3pr3cat3d
Copy link
Author

Applied the patch.

# opnsense-patch cd2c3b0
Fetched cd2c3b0 via https://github.com/opnsense/core
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From cd2c3b08caa4fc3105347855bc9109c091481a40 Mon Sep 17 00:00:00 2001
|From: Franco Fichtner <franco@opnsense.org>
|Date: Sun, 21 Mar 2021 15:30:49 +0100
|Subject: [PATCH] system: USB serial may not work with onifconsole #4849
|
|---
| src/etc/inc/system.inc | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
|
|diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc
|index 7dd7e8a41b..dd522b6759 100644
|--- a/src/etc/inc/system.inc
|+++ b/src/etc/inc/system.inc
--------------------------
Patching file etc/inc/system.inc using Plan A...
Hunk #1 succeeded at 1162 (offset -8 lines).
done
All patches have been applied successfully.  Have a nice day.

Went in to the GUI and clicked System > Settings > Administration > Console > and clicked "save".

checked /etc/ttys

# tail /etc/ttys
ttyv7	"/usr/libexec/getty Pc"		xterm	off secure
ttyv8	"/usr/local/bin/xdm -nodaemon"	xterm	off secure
# Serial terminals
# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
ttyU0	"/usr/libexec/getty 3wire.115200"	vt100	on secure
ttyU1	"/usr/libexec/getty 3wire.115200"	vt100	on secure
ttyU2	"/usr/libexec/getty 3wire.115200"	vt100	on secure
ttyU3	"/usr/libexec/getty 3wire.115200"	vt100	on secure
# Dumb console
dcons	"/usr/libexec/getty std.9600"	vt100	off secure

Rebooted the system and checked /etc/ttys and "on" was still there!

Thank you Franco!

@fichtner
Copy link
Member

Thanks, we will consider a backport to 21.1.4 or 21.1.5, not sure which yet. Back in the office on Friday. ;)

Cheers,
Franco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Low impact changes
Development

No branches or pull requests

2 participants