svn commit: r217362 - user/nwhitehorn/bsdinstall/scripts

Nathan Whitehorn nwhitehorn at FreeBSD.org
Thu Jan 13 17:04:02 UTC 2011


Author: nwhitehorn
Date: Thu Jan 13 17:04:02 2011
New Revision: 217362
URL: http://svn.freebsd.org/changeset/base/217362

Log:
  Allow user to set their keymap at the beginning of the installation. Does
  not run on serial console or X installations.

Added:
  user/nwhitehorn/bsdinstall/scripts/keymap   (contents, props changed)
Modified:
  user/nwhitehorn/bsdinstall/scripts/Makefile
  user/nwhitehorn/bsdinstall/scripts/auto

Modified: user/nwhitehorn/bsdinstall/scripts/Makefile
==============================================================================
--- user/nwhitehorn/bsdinstall/scripts/Makefile	Thu Jan 13 17:02:39 2011	(r217361)
+++ user/nwhitehorn/bsdinstall/scripts/Makefile	Thu Jan 13 17:04:02 2011	(r217362)
@@ -1,7 +1,7 @@
 # $FreeBSD $
 
-SCRIPTS= auto adduser config hostname mount netconfig rootpass services time \
-	 umount
+SCRIPTS= auto adduser config hostname keymap mount netconfig rootpass services \
+	 time umount
 BINDIR= /usr/libexec/bsdinstall
 
 NO_MAN=	true

Modified: user/nwhitehorn/bsdinstall/scripts/auto
==============================================================================
--- user/nwhitehorn/bsdinstall/scripts/auto	Thu Jan 13 17:02:39 2011	(r217361)
+++ user/nwhitehorn/bsdinstall/scripts/auto	Thu Jan 13 17:04:02 2011	(r217362)
@@ -14,10 +14,14 @@ error() {
 	fi
 }
 
-trap error SIGINT	# Catch cntrl-C here
 
 rm -rf $BSDINSTALL_TMPETC
 mkdir $BSDINSTALL_TMPETC
+
+trap true SIGINT	# This section is optional
+bsdinstall keymap
+
+trap error SIGINT	# Catch cntrl-C here
 bsdinstall hostname || error
 
 FETCH_DISTRIBUTIONS=""

Added: user/nwhitehorn/bsdinstall/scripts/keymap
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/nwhitehorn/bsdinstall/scripts/keymap	Thu Jan 13 17:04:02 2011	(r217362)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+kbdcontrol -d >/dev/null 2>&1
+if [ $? -eq 0 ]; then
+	kbdmap 3>&2 2>&1 1>&3 | grep 'keymap=' >> $BSDINSTALL_TMPETC/rc.conf
+fi


More information about the svn-src-user mailing list