[Pkg-kbd-commit] r204 - in people/zinoviev/console-setup: . debian

Anton Zinoviev zinoviev at costa.debian.org
Fri Sep 15 17:45:30 UTC 2006


Author: zinoviev
Date: 2006-09-15 17:45:30 +0000 (Fri, 15 Sep 2006)
New Revision: 204

Modified:
   people/zinoviev/console-setup/debian/changelog
   people/zinoviev/console-setup/debian/console-setup.postinst
   people/zinoviev/console-setup/setupcon
Log:
console-setup(setupcon): new option --force


Modified: people/zinoviev/console-setup/debian/changelog
===================================================================
--- people/zinoviev/console-setup/debian/changelog	2006-09-05 21:14:36 UTC (rev 203)
+++ people/zinoviev/console-setup/debian/changelog	2006-09-15 17:45:30 UTC (rev 204)
@@ -1,6 +1,8 @@
 console-setup (1.8) UNRELEASED; urgency=low
 
-  * 
+  * setupcon: new option --force to skip the 'are we on the console'
+    check.  To be used for d-i because there /proc/self/fd/2 points to
+    pipe.  Thanks to Tollef Fog Heen from the Ubuntu team.
 
  -- Anton Zinoviev <zinoviev at debian.org>  Sat, 22 Jul 2006 23:31:23 +0300
 

Modified: people/zinoviev/console-setup/debian/console-setup.postinst
===================================================================
--- people/zinoviev/console-setup/debian/console-setup.postinst	2006-09-05 21:14:36 UTC (rev 203)
+++ people/zinoviev/console-setup/debian/console-setup.postinst	2006-09-15 17:45:30 UTC (rev 204)
@@ -136,7 +136,7 @@
 
 # In d-i debhelper doesn't use /etc/init.d scripts :-)
 if [ -f /usr/share/console-setup-mini/console-setup.config ]; then
-    setupcon
+    setupcon --force
 fi
 
 #DEBHELPER#

Modified: people/zinoviev/console-setup/setupcon
===================================================================
--- people/zinoviev/console-setup/setupcon	2006-09-05 21:14:36 UTC (rev 203)
+++ people/zinoviev/console-setup/setupcon	2006-09-15 17:45:30 UTC (rev 204)
@@ -42,6 +42,9 @@
 	-v|--verbose)
 	    verbose_option=yes
 	    ;;
+	--force)
+	    force=yes
+	    ;;
 	--save)
 	    save=yes
 	    ;;
@@ -52,6 +55,7 @@
 
   -k, --keyboard-only  setup the keyboard only, do not setup the font
   -f, --font-only      setup the font only, do not setup the keyboard
+      --force          do not check whether we are on the console
   -v, --verbose        explain what is being doing, try it if s.t. goes wrong
       --save           copy the font and the ACM in /etc/console-setup,
                          update /etc/console-setup/boottime.kmap.gz
@@ -115,16 +119,18 @@
     fi
 fi
 
-case `readlink /proc/self/fd/2` in
-    /dev/tty[0-9]*|/dev/vc/[0-9]*|/dev/console)
-	;;
-    *)
-	if [ "$VERBOSE_OUTPUT" = yes ]; then
-	    echo We are not on the Linux console, exiting.
-	fi
-	exit 0 
-	;;
-esac
+if [ "$force" != yes ]; then
+    case `readlink /proc/self/fd/2` in
+	/dev/tty[0-9]*|/dev/vc/[0-9]*|/dev/console)
+	    ;;
+	*)
+	    if [ "$VERBOSE_OUTPUT" = yes ]; then
+		echo We are not on the Linux console, exiting.
+	    fi
+	    exit 0 
+	    ;;
+    esac
+fi
 
 #-----------------------#
 #       OUTPUT          #




More information about the Pkg-kbd-commit mailing list