[Glibc-bsd-commits] r1415 - trunk/freebsd-utils/debian

Robert Millan rmh at costa.debian.org
Thu Mar 30 15:59:20 UTC 2006


Author: rmh
Date: 2006-03-30 15:59:19 +0000 (Thu, 30 Mar 2006)
New Revision: 1415

Added:
   trunk/freebsd-utils/debian/kbdcontrol.config
   trunk/freebsd-utils/debian/kbdcontrol.init.d
   trunk/freebsd-utils/debian/kbdcontrol.postinst
   trunk/freebsd-utils/debian/kbdcontrol.templates
Modified:
   trunk/freebsd-utils/debian/changelog
   trunk/freebsd-utils/debian/control
Log:
* Automatic, (sort of) user-friendly setup for kbdcontrol.

Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog	2006-03-30 14:47:30 UTC (rev 1414)
+++ trunk/freebsd-utils/debian/changelog	2006-03-30 15:59:19 UTC (rev 1415)
@@ -1,3 +1,9 @@
+freebsd-utils (6.0-2.really.5.4-0.2) UNRELEASED; urgency=low
+
+  * Automatic, (sort of) user-friendly setup for kbdcontrol.
+
+ -- Robert Millan <rmh at aybabtu.com>  Thu, 30 Mar 2006 17:58:12 +0200
+
 freebsd-utils (6.0-2.really.5.4-0.1) unreleased; urgency=low
 
   * Bump version to this ugly mess in order to provide an upgrade path on

Modified: trunk/freebsd-utils/debian/control
===================================================================
--- trunk/freebsd-utils/debian/control	2006-03-30 14:47:30 UTC (rev 1414)
+++ trunk/freebsd-utils/debian/control	2006-03-30 15:59:19 UTC (rev 1415)
@@ -23,7 +23,7 @@
 
 Package: kbdcontrol
 Architecture: kfreebsd-i386 kfreebsd-amd64
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, debconf
 Description: Command line tool to change keyboard layout
  Original FreeBSD command to set keyboard layout and the FreeBSD possible
  keyboards.

Added: trunk/freebsd-utils/debian/kbdcontrol.config
===================================================================
--- trunk/freebsd-utils/debian/kbdcontrol.config	2006-03-30 14:47:30 UTC (rev 1414)
+++ trunk/freebsd-utils/debian/kbdcontrol.config	2006-03-30 15:59:19 UTC (rev 1415)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+db_subst kbdcontrol/keymap choices "`cd /usr/share/syscons/keymaps/ && echo *.kbd | sed -e "s/ /, /g"`"
+db_input high kbdcontrol/keymap || true
+db_go

Added: trunk/freebsd-utils/debian/kbdcontrol.init.d
===================================================================
--- trunk/freebsd-utils/debian/kbdcontrol.init.d	2006-03-30 14:47:30 UTC (rev 1414)
+++ trunk/freebsd-utils/debian/kbdcontrol.init.d	2006-03-30 15:59:19 UTC (rev 1415)
@@ -0,0 +1,24 @@
+#! /bin/sh
+#
+# skeleton	example file to build /etc/init.d/ scripts.
+#		This file should be used to construct scripts for /etc/init.d.
+#
+#		Written by Miquel van Smoorenburg <miquels at cistron.nl>.
+#		Modified for Debian 
+#		by Ian Murdock <imurdock at gnu.ai.mit.edu>.
+#
+# Version:	@(#)skeleton  1.9  26-Feb-2001  miquels at cistron.nl
+#
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+which kbdcontrol >/dev/null
+
+if test -e /etc/kbdcontrol.conf ; then
+  echo -n "Loading console keymap..."
+  kbdcontrol -l `grep -v ^# /etc/kbdcontrol.conf` < /dev/console
+  echo " done."
+fi
+
+exit 0

Added: trunk/freebsd-utils/debian/kbdcontrol.postinst
===================================================================
--- trunk/freebsd-utils/debian/kbdcontrol.postinst	2006-03-30 14:47:30 UTC (rev 1414)
+++ trunk/freebsd-utils/debian/kbdcontrol.postinst	2006-03-30 15:59:19 UTC (rev 1415)
@@ -0,0 +1,53 @@
+#! /bin/sh
+# postinst script for kbdcontrol
+#
+# see: dh_installdeb(1)
+
+set -e
+
+. /usr/share/debconf/confmodule 
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+    configure)
+      db_get kbdcontrol/keymap
+      if [ "$RET" = "none" ] ; then
+        rm -f /etc/kbdcontrol.conf
+      else
+        cat > /etc/kbdcontrol.conf << EOF
+# Do not edit this file!  It is automaticaly generated by kbdcontrol
+# Use "dpkg-reconfigure kbdcontrol" instead.
+$RET
+EOF
+      fi
+
+      # apply changes (if any)
+      /etc/init.d/kbdcontrol start
+    ;;
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

Added: trunk/freebsd-utils/debian/kbdcontrol.templates
===================================================================
--- trunk/freebsd-utils/debian/kbdcontrol.templates	2006-03-30 14:47:30 UTC (rev 1414)
+++ trunk/freebsd-utils/debian/kbdcontrol.templates	2006-03-30 15:59:19 UTC (rev 1415)
@@ -0,0 +1,9 @@
+Template: kbdcontrol/keymap
+Type: select
+Choices: none, ${choices}
+Default: none
+Description: Select keyboard map
+ Select a map file for your keyboard.
+ .
+ Note: If you don't know, don't select any yet.  You can always come back to
+ this question with "dpkg-reconfigure kldutils".




More information about the Glibc-bsd-commits mailing list