Index: sys/dev/vt/vt_core.c =================================================================== --- sys/dev/vt/vt_core.c +++ sys/dev/vt/vt_core.c @@ -123,6 +123,14 @@ VT_SYSCTL_INT(deadtimer, 15, "Time to wait busy process in VT_PROCESS mode"); VT_SYSCTL_INT(suspendswitch, 1, "Switch to VT0 before suspend"); +/* Allow to disable some keyboard combinations. */ +VT_SYSCTL_INT(kbd_halt, 1, "Enable halt keyboard combination"); +VT_SYSCTL_INT(kbd_poweroff, 1, "Enable power_off keyboard combination"); +VT_SYSCTL_INT(kbd_reboot, 1, "Enable reboot keyboard combination " + "(Ctrl-Alt-Del)"); +VT_SYSCTL_INT(kbd_debug, 1, "Enable key combination to enter debugger " + "(typically Ctrl-Alt-Esc)"); + static struct vt_device vt_consdev; static unsigned int vt_unit = 0; static MALLOC_DEFINE(M_VT, "vt", "vt device"); @@ -485,17 +493,20 @@ switch (c) { case SPCLKEY | DBG: - kdb_enter(KDB_WHY_BREAK, "manual escape to debugger"); + if (vt_kbd_debug) + kdb_enter(KDB_WHY_BREAK, "manual escape to debugger"); return (1); case SPCLKEY | RBT: - /* XXX: Make this configurable! */ - shutdown_nice(0); + if (vt_kbd_reboot) + shutdown_nice(RB_AUTOBOOT); return (1); case SPCLKEY | HALT: - shutdown_nice(RB_HALT); + if (vt_kbd_halt) + shutdown_nice(RB_HALT); return (1); case SPCLKEY | PDWN: - shutdown_nice(RB_HALT|RB_POWEROFF); + if (vt_kbd_poweroff) + shutdown_nice(RB_HALT|RB_POWEROFF); return (1); };