I enable the serial console during the boot process on centos7 which uses grub2 and systemd (instead of inittab)
I would like to undo that serial input/output at the very end of the boot, after a completely successful start, for security reasons.
How can I accomplish this?
I discovered by going through systemd services that the console is recognized/enabled through it even though grub2 started it, so this turns it off, I think.
systemctl stop serial-getty@ttyS2.service
How can I make that happen automatically after a completely successful start where all other services have come online. I could use
rc.local but that is init.d legacy and doesn't take into account that other services have come online properly.