Disable additional TTYs (3 to 6) 22 November 2020, 22:10:45 How can I disable TTYs 3 to 6 so that only the early getty (tty1) and agetty-tty2 are on?I've tried manually editing /etc/s6/sv/getty/contents and removing agetty-tty3 through 6, but I couldn't find instructions on how to recompile the boot bundle so that it takes effect, and regardless of how many times I reboot ttys 3 to 6 are still present.When I first installed artix I was able to do that but I forgot how (and I forgot if I had to use the live s6 ISO or if I had to do it from the installation itself (don't know how this affects live vs compiled)).Is there a way to do that?
Re: Disable additional TTYs (3 to 6) Reply #1 – 22 November 2020, 23:49:31 You could use the s6-rc-bundle-update script for this.For example, "s6-rc-bundle-update delete boot agetty-tty3". The problem with this approach is that when the s6-rc-db-update hook gets triggered again the gettys will be added back to the boot bundle so you would have to disable it again. I've never had someone ask to disable the gettys before, but I suppose I could think of a way to make this configurable. The s6-scripts package is basically hardcoded to install gettys 2-6.
Re: Disable additional TTYs (3 to 6) Reply #2 – 23 November 2020, 00:48:52 Will reinstalling a package that has a "-s6" suffix trigger the post installation hook causing the database to be rebuilt again? Because I think that's the only way to get this to work right now.
Re: Disable additional TTYs (3 to 6) Reply #3 – 23 November 2020, 02:01:07 You can always just manually execute the script. It's in /usr/share/libalpm/scripts/s6-rc-db-update-hook
Re: Disable additional TTYs (3 to 6) Reply #4 – 23 November 2020, 09:22:50 Looks like that solves this problem for now, until there's an official way to do it.
Re: Disable additional TTYs (3 to 6) Reply #5 – 23 November 2020, 17:41:29 I implemented this in the latest version of s6-scripts (20201123). /etc/s6/s6.conf now comes with a GETTYS variable which you can remove/add ttys to. Every individual agetty-tty{2-6} service now checks to make sure that the tty is defined in GETTYS before launching itself. If the tty is not there, then it just does nothing (i.e. the service goes up and no getty is spawned). It's in testing right now. It'll make its way to stable later.