From 23ad69190892cdfaa65512d2f3aff0d104ebee25 Mon Sep 17 00:00:00 2001 From: rwatson Date: Thu, 2 Aug 2001 03:53:36 +0000 Subject: Add the ability to modify /etc/ttys before first reboot during the system installation process. This allows users installing via serial console to enable serial console login during the installation process using an un-customized install. The user is not prompted to modify /etc/ttys during a normal install, but is offered the opportunity during post-install configuration. - Introduce configTTYs(), which describes the benefits of editing /etc/ttys, and asks for confirmation before spawning the editor. - add configTTYs to the post-install configuration, as well as to the global configuration index. --- usr.sbin/sysinstall/config.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'usr.sbin/sysinstall/config.c') diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index 56ffede..f50c75c 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -1029,3 +1029,28 @@ configNFSServer(dialogMenuItem *self) } return DITEM_SUCCESS; } + +int +configTTYs(dialogMenuItem *self) +{ + char cmd[256]; + + WINDOW *w = savescr(); + + /* Simply prompt for confirmation, then edit away. */ + if (msgYesNo("Configuration of system TTYs requires editing the /etc/ttys file.\n" + "Typical configuration activities might include enabling getty(8)\n" + "on the first serial port to allow login via serial console after\n" + "reboot, or to enable xdm. The default ttys file enables normal\n" + "virtual consoles, and most sites will not need to perform manual\n" + "configuration.\n\n" + "To load /etc/ttys in the editor, select [Yes], otherwise, [No].")) { + } else { + sprintf(cmd, "%s /etc/ttys", variable_get(VAR_EDITOR)); + dialog_clear(); + systemExecute(cmd); + } + + restorescr(w); + return DITEM_SUCCESS; +} -- cgit v1.1