X Strike Force X.Org X11 SVN commit: r39 - trunk/debian
Author: dnusinow
Date: 2005-05-08 22:47:44 -0500 (Sun, 08 May 2005)
New Revision: 39
Added:
trunk/debian/xserver-common.README.Debian
trunk/debian/xserver-common.config.in
trunk/debian/xserver-common.install
trunk/debian/xserver-common.links
trunk/debian/xserver-common.postinst.in
trunk/debian/xserver-common.postrm.in
trunk/debian/xserver-common.preinst.in
trunk/debian/xserver-common.templates
Log:
Adding xserver-common packaging files. Audited and approved by David.
Added: trunk/debian/xserver-common.README.Debian
===================================================================
--- trunk/debian/xserver-common.README.Debian 2005-05-09 03:45:23 UTC (rev 38)
+++ trunk/debian/xserver-common.README.Debian 2005-05-09 03:47:44 UTC (rev 39)
@@ -0,0 +1,16 @@
+Debian README for xserver-common package
+========================================
+
+Newcomers to the X Window System should first read the Debian X FAQ
+(Frequently Asked Questions list): /usr/share/doc/xfree86-common/FAQ.gz.
+You can view this file with your favorite pager program after decompressing
+it. For example:
+ $ zcat /usr/share/doc/xfree86-common/FAQ.gz | pager
+
+The XFree86 Video Timings HOWTO, which explains the art of hand-crafting
+Modelines for the XF86Config file, is included in the doc-linux-text (plain
+ASCII format) and doc-linux-html (HTML format) packages.
+
+$Id: xserver-common.README.Debian 1244 2004-04-13 22:02:31Z branden $
+
+vim:set ai et sts=4 sw=4 tw=80:
Added: trunk/debian/xserver-common.config.in
===================================================================
--- trunk/debian/xserver-common.config.in 2005-05-09 03:45:23 UTC (rev 38)
+++ trunk/debian/xserver-common.config.in 2005-05-09 03:47:44 UTC (rev 39)
@@ -0,0 +1,191 @@
+#!/bin/sh
+# Debian xserver-common package configuration script
+# Copyright 2000--2003 Branden Robinson.
+# Licensed under the GNU General Public License, version 2. See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+
+# $Id: xserver-common.config.in 1254 2004-04-14 19:14:43Z branden $
+
+set -e
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+THIS_PACKAGE=xserver-common
+THIS_SCRIPT=config
+
+#INCLUDE_SHELL_LIB#
+
+CONFIG_DIR=/etc/X11
+XWRAPPER_CONFIG="$CONFIG_DIR/Xwrapper.config"
+OLD_CONFIG_FILE="$CONFIG_DIR/Xserver"
+
+allowed_users_english_to_actual () {
+ case "$1" in
+ "Root Only")
+ echo "rootonly"
+ ;;
+ "Console Users Only")
+ echo "console"
+ ;;
+ "Anybody")
+ echo "anybody"
+ ;;
+ *)
+ # garbage input; return default
+ observe "allowed_users_english_to_actual(): unrecognized input \"$1\";" \
+ "using default"
+ echo "console"
+ ;;
+ esac
+}
+
+allowed_users_actual_to_english () {
+ case "$1" in
+ "rootonly")
+ echo "Root Only"
+ ;;
+ "console")
+ echo "Console Users Only"
+ ;;
+ "anybody")
+ echo "Anybody"
+ ;;
+ *)
+ # garbage input; return default
+ observe "allowed_users_actual_to_english(): unrecognized input \"$1\";" \
+ "using default"
+ echo "Console Users Only"
+ ;;
+ esac
+}
+
+validate_nice_value () {
+ local retval
+
+ retval=1
+ # first, try to subtract number from itself to validate numeric input
+ # (expr is noisy, always throw away its output)
+ set +e
+ expr "$1" - "$1" > /dev/null 2>&1
+ if [ $? -ne 2 ]; then
+ # now check for valid range
+ if expr "$1" ">=" "-20" > /dev/null 2>&1 &&
+ expr "$1" "<=" "19" > /dev/null 2>&1; then
+ retval=0
+ fi
+ fi
+ set -e
+ return $retval
+}
+
+# set the default nice value based on what Linux kernel version is being used;
+# the new process scheduler in 2.5, to be released in 2.6, makes a default of
+# -10 a bad idea; with that scheduler, the X server should run with priority 0
+NICE_DEFAULT=-10
+if [ "$(uname -s)" = "Linux" ]; then
+ LINUX_KERNEL_FLAVOR=$(uname -r)
+ LINUX_KERNEL_VERSION=${LINUX_KERNEL_FLAVOR%%-*}
+ # it kinda sucks that I have to use dpkg for this
+ if dpkg --compare-versions "$LINUX_KERNEL_VERSION" gt "2.5"; then
+ observe "Linux kernel > 2.5 detected; using 0 as default nice value"
+ NICE_DEFAULT=0
+ fi
+fi
+
+# debconf is not a registry; use the current contents of the default display
+# manager to pre-answer the question if possible
+CURRENT_ALLOWED_USERS=
+CURRENT_NICE_VALUE=
+
+# scan the X wrapper config file for existing settings, if it exists
+if [ -e "$XWRAPPER_CONFIG" ]; then
+ if MATCHES=$(grep "^allowed_users=.\+" "$XWRAPPER_CONFIG"); then
+ CURRENT_ALLOWED_USERS=$(echo "${MATCHES##*=}" | head -n 1)
+ fi
+ if MATCHES=$(grep "^nice_value=.\+" "$XWRAPPER_CONFIG"); then
+ CURRENT_NICE_VALUE=$(echo "${MATCHES##*=}" | head -n 1)
+ fi
+else
+ # if upgrading from xserver-common prior to 4.0.1-6, scan old wrapper config
+ # file for a default setting of allowed users (nice value support wasn't
+ # implemented back then)
+ if dpkg --compare-versions "$2" lt "4.1.0-6"; then
+ if [ -e "$OLD_CONFIG_FILE" ]; then
+ CURRENT_ALLOWED_USERS=$(sed -n '2p' < "$OLD_CONFIG_FILE" |
+ tr '[[:upper:]]' '[[:lower:]]')
+ fi
+ fi
+fi
+
+if [ -n "$CURRENT_ALLOWED_USERS" ]; then
+ observe "setting xserver-common/xwrapper/allowed_users from configuration" \
+ "file"
+ run db_set xserver-common/xwrapper/allowed_users \
+ $(allowed_users_actual_to_english \
+ "$CURRENT_ALLOWED_USERS")
+fi
+
+if [ -n "$CURRENT_NICE_VALUE" ]; then
+ observe "setting xserver-common/xwrapper/nice_value from configuration file"
+ if validate_nice_value "$CURRENT_NICE_VALUE"; then
+ run db_set xserver-common/xwrapper/nice_value \
+ "$CURRENT_NICE_VALUE"
+ fi
+fi
+
+run db_input low xserver-common/xwrapper/allowed_users
+run db_go
+
+RET=
+if db_get xserver-common/xwrapper/allowed_users; then
+ if [ -n "$RET" ]; then
+ run db_set xserver-common/xwrapper/actual_allowed_users \
+ $(allowed_users_english_to_actual "$RET")
+ fi
+fi
+
+# next question requires input validation; assume safe valid value already
+# present (possibly the template default)
+SAFE=
+if db_get xserver-common/xwrapper/nice_value; then
+ SAFE="$RET"
+fi
+
+# make sure it's really safe; if not, use the default
+if ! validate_nice_value "$RET"; then
+ SAFE="$NICE_DEFAULT"
+ run db_set xserver-common/xwrapper/nice_value "$SAFE"
+fi
+
+set +e
+while :; do
+ run db_input low xserver-common/xwrapper/nice_value
+ # is the question going to be asked?
+ if [ $? -eq 30 ]; then
+ break # no; bail out of validation loop
+ fi
+ run db_go
+ RET=
+ if db_get xserver-common/xwrapper/nice_value; then
+ # string, needs input validation
+ if validate_nice_value "$RET"; then
+ # valid input from user
+ break
+ else
+ # the input was invalid; restore the known good value in case we are
+ # interrupted before the user provides a valid one
+ run db_set xserver-common/xwrapper/nice_value "$SAFE"
+ run db_fset xserver-common/xwrapper/nice_value seen false
+ # now display the error message
+ run db_fset xserver-common/xwrapper/nice_value/error seen false
+ run db_input critical xserver-common/xwrapper/nice_value/error
+ run db_go
+ fi
+ fi
+done
+set -e
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=0:
Added: trunk/debian/xserver-common.install
===================================================================
--- trunk/debian/xserver-common.install 2005-05-09 03:45:23 UTC (rev 38)
+++ trunk/debian/xserver-common.install 2005-05-09 03:47:44 UTC (rev 39)
@@ -0,0 +1,14 @@
+etc/X11/xserver/SecurityPolicy
+usr/X11R6/bin/X
+usr/X11R6/man/man1/Xserver.1x
+usr/bin/dexconf
+usr/share/configlets/xserver-common/desktop.xpm
+usr/share/configlets/xserver-common/main.glade
+usr/share/configlets/xserver-common/main.py
+usr/share/configlets/xserver-common/monitor.xpm
+usr/share/configlets/xserver-common/pointer.xpm
+usr/share/configlets/xserver-common/videocard.xpm
+usr/share/configlets/xserver-common/xserver.xpm
+usr/share/man/man1/dexconf.1
+usr/share/man/man5/Xwrapper.config.5
+usr/share/man/man7/XF86Config.7
Added: trunk/debian/xserver-common.links
===================================================================
--- trunk/debian/xserver-common.links 2005-05-09 03:45:23 UTC (rev 38)
+++ trunk/debian/xserver-common.links 2005-05-09 03:47:44 UTC (rev 39)
@@ -0,0 +1 @@
+etc/X11/xserver usr/X11R6/lib/X11/xserver
Added: trunk/debian/xserver-common.postinst.in
===================================================================
--- trunk/debian/xserver-common.postinst.in 2005-05-09 03:45:23 UTC (rev 38)
+++ trunk/debian/xserver-common.postinst.in 2005-05-09 03:47:44 UTC (rev 39)
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Debian xserver-common package post-installation script
+# Copyright 1998--2004 Branden Robinson.
+# Licensed under the GNU General Public License, version 2. See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+# Acknowledgements to Stephen Early, Mark Eichin, and Manoj Srivastava.
+
+# $Id: xserver-common.postinst.in 1509 2004-06-04 03:13:55Z branden $
+
+set -e
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+THIS_PACKAGE=xserver-common
+THIS_SCRIPT=postinst
+
+#INCLUDE_SHELL_LIB#
+
+CONFIG_DIR=/etc/X11
+XWRAPPER_CONFIG="$CONFIG_DIR/Xwrapper.config"
+CONFIG_AUX_DIR=/var/lib/xfree86
+XWRAPPER_CONFIG_CHECKSUM="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.md5sum"
+XWRAPPER_CONFIG_ROSTER="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.roster"
+
+check_symlinks_and_bomb /usr/X11R6/lib/X11/xserver
+
+# now safe to remove old xserver dir
+if [ -e /usr/X11R6/lib/X11/xserver.moved-by-preinst ] \
+ && [ -L /usr/X11R6/lib/X11/xserver ]; then
+ rm -r /usr/X11R6/lib/X11/xserver.moved-by-preinst
+fi
+
+#DEBHELPER#
+
+# only mess with config files if the configuration file auxiliary directory
+# exists; if it does not, assume that's the way the user wants it
+if [ -d "$CONFIG_AUX_DIR" ]; then
+ # register this package as a (potential) handler of the X server wrapper
+ # config file
+ if ! fgrep -qsx "$THIS_PACKAGE" "$XWRAPPER_CONFIG_ROSTER"; then
+ echo "$THIS_PACKAGE" >> "$XWRAPPER_CONFIG_ROSTER"
+ fi
+
+ # only mess with config file it exists; otherwise, assume that's the way the
+ # user wants it
+ if [ -e "$XWRAPPER_CONFIG" ]; then
+ # similarly, check for the existence of the checksum file; if it doesn't
+ # exist, assume that's the way the user wants it
+ if [ -e "$XWRAPPER_CONFIG_CHECKSUM" ]; then
+ # next, compare the current and stored checksums; if they do not match,
+ # assume that's the way the user wants it
+ if [ "$(md5sum "$XWRAPPER_CONFIG")" = \
+ "$(cat "$XWRAPPER_CONFIG_CHECKSUM")" ]; then
+ # they match; prepare a new version of the config file
+ ALLOWED_USERS=
+ if db_get xserver-common/xwrapper/actual_allowed_users; then
+ ALLOWED_USERS="$RET"
+ fi
+ NICE_VALUE=
+ if db_get xserver-common/xwrapper/nice_value; then
+ NICE_VALUE="$RET"
+ fi
+ if [ -n "$ALLOWED_USERS" ] && [ -n "$NICE_VALUE" ]; then
+ NEW_XWRAPPER_CONFIG=$(tempfile)
+ cat >>"$NEW_XWRAPPER_CONFIG" << EOF
+# Xwrapper.config (Debian X Window System server wrapper configuration file)
+#
+# This file was generated by the post-installation script of the xserver-common
+# package using values from the debconf database.
+#
+# See the Xwrapper.config(5) manual page for more information.
+#
+# This file is automatically updated on upgrades of the xserver-common package
+# *only* if it has not been modified since the last upgrade of that package.
+#
+# If you have edited this file but would like it to be automatically updated
+# again, run the following commands as root:
+#
+# cp $XWRAPPER_CONFIG $XWRAPPER_CONFIG.custom
+# md5sum $XWRAPPER_CONFIG > $XWRAPPER_CONFIG_CHECKSUM
+# dpkg-reconfigure xserver-common
+allowed_users=$ALLOWED_USERS
+nice_value=$NICE_VALUE
+EOF
+ if ! cmp -s "$XWRAPPER_CONFIG" "$NEW_XWRAPPER_CONFIG"; then
+ cp "$NEW_XWRAPPER_CONFIG" "$XWRAPPER_CONFIG.dpkg-new"
+ mv "$XWRAPPER_CONFIG.dpkg-new" "$XWRAPPER_CONFIG"
+ md5sum "$XWRAPPER_CONFIG" > "$XWRAPPER_CONFIG_CHECKSUM"
+ fi
+ rm -f "$NEW_XWRAPPER_CONFIG"
+ else
+ observe "not updating $XWRAPPER_CONFIG; problems communicating" \
+ "with debconf database"
+ fi
+ else
+ observe "not updating $XWRAPPER_CONFIG; file has been customized"
+ fi
+ else
+ observe "not updating $XWRAPPER_CONFIG; no stored checksum available"
+ fi
+ else
+ observe "not updating $XWRAPPER_CONFIG; file does not exist"
+ fi
+fi
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=0:
Added: trunk/debian/xserver-common.postrm.in
===================================================================
--- trunk/debian/xserver-common.postrm.in 2005-05-09 03:45:23 UTC (rev 38)
+++ trunk/debian/xserver-common.postrm.in 2005-05-09 03:47:44 UTC (rev 39)
@@ -0,0 +1,80 @@
+#!/bin/sh
+# Debian xserver-common package post-removal script
+# Copyright 1998--2001, 2003, 2004 Branden Robinson.
+# Licensed under the GNU General Public License, version 2. See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+# Acknowledgements to Stephen Early, Mark Eichin, and Manoj Srivastava.
+
+# $Id: xserver-common.postrm.in 1044 2004-02-16 17:40:33Z branden $
+
+set -e
+
+THIS_PACKAGE=xserver-common
+THIS_SCRIPT=postrm
+
+#INCLUDE_SHELL_LIB#
+
+CONFIG_DIR=/etc/X11
+XWRAPPER_CONFIG="$CONFIG_DIR/Xwrapper.config"
+CONFIG_AUX_DIR=/var/lib/xfree86
+XWRAPPER_CONFIG_CHECKSUM="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.md5sum"
+XWRAPPER_CONFIG_ROSTER="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.roster"
+
+if [ "$1" = "abort-install" ] || [ "$1" = "abort-upgrade" ]; then
+ if [ -d /usr/X11R6/lib/X11/xserver.moved-by-preinst ] \
+ && [ -L /usr/X11R6/lib/X11/xserver ]; then
+ rm /usr/X11R6/lib/X11/xserver
+ mv /usr/X11R6/lib/X11/xserver.moved-by-preinst /usr/X11R6/lib/X11/xserver
+ fi
+fi
+
+# clean up non-conffile configuration files and related materials on purge
+if [ "$1" = "purge" ]; then
+ # de-register this package as a handler of the X server wrapper config file
+ if [ -e "$XWRAPPER_CONFIG_ROSTER" ]; then
+ # check existing roster file for our package name
+ if fgrep -qx "$THIS_PACKAGE" "$XWRAPPER_CONFIG_ROSTER"; then
+ # construct temporary roster file with our package name removed, ignoring
+ # failure
+ fgrep -vx "$THIS_PACKAGE" "$XWRAPPER_CONFIG_ROSTER" > \
+ "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" || true
+ # is there anything left?
+ if [ -s "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" ]; then
+ # yes, replace the roster file
+ mv "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" "$XWRAPPER_CONFIG_ROSTER"
+ else
+ # no; remove both the roster and our temporary copy
+ rm -f "$XWRAPPER_CONFIG_ROSTER" "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp"
+ # remove X server wrapper config file if it was still managed by the
+ # package
+ if [ -e "$XWRAPPER_CONFIG_CHECKSUM" ]; then
+ # does it exist?
+ if [ -e "$XWRAPPER_CONFIG" ]; then
+ # does the current MD5 checksum match the stored checksum?
+ if [ "$(md5sum "$XWRAPPER_CONFIG")" \
+ = "$(cat "$XWRAPPER_CONFIG_CHECKSUM")" ]; then
+ # yes; remove the config file
+ rm -f "$XWRAPPER_CONFIG"
+ fi
+ fi
+ # remove the checksum file; any remaining X server wrapper config file
+ # still on the system at this point is no longer being managed (local
+ # user customization)
+ rm -f "$XWRAPPER_CONFIG_CHECKSUM"
+ fi
+ fi
+ fi
+ fi
+
+ # we can take /etc/X11/xserver out of this list one day when dpkg fixes
+ # #112386
+ for DIR in /etc/X11/xserver "$CONFIG_DIR" "$CONFIG_AUX_DIR"; do
+ rmdir "$DIR" 2> /dev/null || true
+ done
+fi
+
+#DEBHELPER#
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=0:
Added: trunk/debian/xserver-common.preinst.in
===================================================================
--- trunk/debian/xserver-common.preinst.in 2005-05-09 03:45:23 UTC (rev 38)
+++ trunk/debian/xserver-common.preinst.in 2005-05-09 03:47:44 UTC (rev 39)
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Debian xserver-common package pre-installation script
+# Copyright 1998--2004 Branden Robinson.
+# Licensed under the GNU General Public License, version 2. See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+# Acknowledgements to Stephen Early, Mark Eichin, and Manoj Srivastava.
+
+# $Id: xserver-common.preinst.in 1254 2004-04-14 19:14:43Z branden $
+
+set -e
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+THIS_PACKAGE=xserver-common
+THIS_SCRIPT=preinst
+
+#INCLUDE_SHELL_LIB#
+
+CONFIG_DIR=/etc/X11
+XWRAPPER_CONFIG="$CONFIG_DIR/Xwrapper.config"
+CONFIG_AUX_DIR=/var/lib/xfree86
+XWRAPPER_CONFIG_CHECKSUM="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.md5sum"
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+ # xserver dir moved to /etc/X11 in 4.x
+ if [ -e /usr/X11R6/lib/X11/xserver ] \
+ && ! [ -L /usr/X11R6/lib/X11/xserver ]; then
+ observe "removing obsolete /usr/X11R6/lib/X11/xserver directory"
+ mv /usr/X11R6/lib/X11/xserver /usr/X11R6/lib/X11/xserver.moved-by-preinst
+ fi
+ check_symlinks_and_warn /usr/X11R6/lib/X11/xserver
+
+ # create the configuration files' main and auxiliary directories if they
+ # don't exist
+ for DIR in "$CONFIG_DIR" "$CONFIG_AUX_DIR"; do
+ if ! [ -e "$DIR" ]; then
+ observe "creating $DIR"
+ mkdir --mode=755 --parents "$DIR"
+ fi
+ done
+
+ # implement (simplified) ucf-style configration file handling
+
+ # if performing a fresh install, place config files under management if they
+ # do *not* already exist
+ if [ "$1" = "install" ]; then
+ if ! [ -e "$XWRAPPER_CONFIG" ]; then
+ # only proceed if config file auxiliary directory exists
+ if [ -d "$CONFIG_AUX_DIR" ]; then
+ # cheap, fork()-free version of "touch"
+ : > "$XWRAPPER_CONFIG"
+ md5sum "$XWRAPPER_CONFIG" > "$XWRAPPER_CONFIG_CHECKSUM"
+ fi
+ fi
+ fi
+
+ # if upgrading from < 4.2.1-10, migrate X wrapper config file
+ if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt-nl "4.2.1-10"; then
+ # do we have a configuration file to work with?
+ if [ -e "$XWRAPPER_CONFIG" ]; then
+ # only proceed if config file auxiliary directory exists
+ if [ -d "$CONFIG_AUX_DIR" ]; then
+ # attempt to pre-seed the md5sum file based on the current content of
+ # the file
+ if db_get xserver-common/manage_config_with_debconf; then
+ if [ "$RET" = "true" ]; then
+ # if the config file doesn't even exist, don't bother
+ if [ -e "$XWRAPPER_CONFIG" ]; then
+ # make sure the "debconf markers" are there, too; if they've been
+ # removed, the user didn't want the file molested
+ if egrep -q '^### BEGIN DEBCONF SECTION' "$XWRAPPER_CONFIG" &&
+ egrep -q '^### END DEBCONF SECTION' "$XWRAPPER_CONFIG"; then
+ # has the user left the file untouched (except for blank lines
+ # and comments) outside the debconf-marked area?
+ if ! [ -n "$(sed -n '1,/^### BEGIN DEBCONF SECTION/p' \
+ < "$XWRAPPER_CONFIG" | grep -v '^[[:space:]]*#' \
+ | grep -v '^[[:space:]]*$')" ] || [ -n \
+ "$(sed -n '/^### END DEBCONF SECTION/,$p' \
+ < "$XWRAPPER_CONFIG" | grep -v '^[[:space:]]*#' \
+ | grep -v '^[[:space:]]*$')" ]; then
+ observe "migrating $XWRAPPER_CONFIG away from management by" \
+ "debconf; backup stored in"
+ "$XWRAPPER_CONFIG.dpkg-old and checksum stored in" \
+ "$XWRAPPER_CONFIG_CHECKSUM"
+ cp "$XWRAPPER_CONFIG" "$XWRAPPER_CONFIG.dpkg-old"
+ # if all of the above tests succeeded, treat the file
+ # similarly to an unmodified conffile (automatically updated
+ # by package)
+ md5sum "$XWRAPPER_CONFIG" > "$XWRAPPER_CONFIG_CHECKSUM"
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ # in other news, unregister the now no-longer-used templates
+ run db_unregister xserver-common/manage_config_with_debconf
+ run db_unregister xserver-common/move_existing_nondebconf_config
+ fi
+
+ fi
+fi
+
+#DEBHELPER#
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=0:
Added: trunk/debian/xserver-common.templates
===================================================================
--- trunk/debian/xserver-common.templates 2005-05-09 03:45:23 UTC (rev 38)
+++ trunk/debian/xserver-common.templates 2005-05-09 03:47:44 UTC (rev 39)
@@ -0,0 +1,41 @@
+Template: xserver-common/xwrapper/allowed_users
+Type: select
+_Choices: Root Only, Console Users Only, Anybody
+Default: Console Users Only
+_Description: Select what type of user has permission to start the X server.
+ Because the X server runs with superuser privileges, it may be unwise to
+ permit any user to start it, for security reasons. On the other hand, it is
+ even more unwise to run general-purpose X client programs as root, which is
+ what may happen if only root is permitted to start the X server. A good
+ compromise is to permit the X server to be started only by users logged in to
+ one of the virtual consoles.
+
+Template: xserver-common/xwrapper/actual_allowed_users
+Type: string
+Description: internal use only
+ This template is never shown to the user and does not require translation.
+
+Template: xserver-common/xwrapper/nice_value
+Type: string
+_Description: Enter the desired nice value for the X server to use.
+ When using operating system kernels with a particular scheduling strategy,
+ it has been widely noted that the X server's performance improves when it
+ is run at a higher process priority than the default; a process's priority
+ is known as its "nice" value. They range from -20 (extremely high
+ priority, or "not nice" to other processes) to 19 (extremely low
+ priority). The default nice value for ordinary processes is 0. -10 is a
+ good default for a single-user workstation; 0 is a good default for a
+ machine that has duties other than interacting with the console user (such
+ as a web server).
+ .
+ The above is not true of Linux kernel version 2.6 (nor of the 2.5 series
+ after the "O(1) scheduler" was included); on such systems, the nice value
+ of the X server should be set to 0.
+ .
+ Values outside the range of -10 to 0 are not recommended; too negative,
+ and the X server will interfere with important system tasks. Too
+ positive, and the X server will be sluggish and unresponsive.
+
+Template: xserver-common/xwrapper/nice_value/error
+Type: note
+_Description: Please enter an integer between -20 and 19.
Reply to: