Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
17.7 Legacy Series
»
Modified /etc/ttys, persistent?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Modified /etc/ttys, persistent? (Read 4054 times)
guest16985
Guest
Modified /etc/ttys, persistent?
«
on:
December 24, 2017, 05:01:31 pm »
Hi, I'm running OPNsense 17.7.11 on a 4-port QOTOM J1900 box. This particular piece of hardware does not have a serial port for console access. So, I added a cheap USB-to-Serial port adapter and added the following line to /etc/ttys:
ttyU0 "/usr/libexec/getty std.9600" vt100 on secure
Then I had init reread the file using "kill -HUP 1". Now I've got getty running on the USB serial port and everything works great. However, what I'm wondering now is how persistent is this file? Will it be overwritten on upgrades? If so, which type of upgrades will present a problem? Major versions? Minor versions? Something else?
Thanks!
Logged
franco
Administrator
Hero Member
Posts: 17660
Karma: 1611
Re: Modified /etc/ttys, persistent?
«
Reply #1 on:
December 26, 2017, 09:20:50 am »
Hi there,
No, /etc/tty is a very sensitive file so we rewrite it during GUI configuration (System: Settings: Administration) and restore it during boot to prevent a missing / faulty file from giving you access to the system.
However, your settings should be easy to emulate on the System: Settings: Administration page, choose serial as secondary console, set speed and that should be it.
Cheers,
Franco
Logged
guest16985
Guest
Re: Modified /etc/ttys, persistent?
«
Reply #2 on:
December 28, 2017, 12:02:05 am »
I tried that, but the default settings seem to use /dev/ttyu0 instead of /dev/ttyU0, which is how my USB serial port shows up, thus, it doesn't work.
Logged
franco
Administrator
Hero Member
Posts: 17660
Karma: 1611
Re: Modified /etc/ttys, persistent?
«
Reply #3 on:
December 28, 2017, 11:53:38 am »
Ah, this explains it. We need to add a feature for that:
https://github.com/opnsense/core/issues/2026
Still, you could patch your modified line into:
https://github.com/opnsense/core/blob/master/src/etc/rc.subr.d/recover#L161
But that will be overwritten on firmware updates until the feature is added (likely a checkbox). This won't make 18.1, as we are preparing the first release candidate now.
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
17.7 Legacy Series
»
Modified /etc/ttys, persistent?