Author: branden Date: 2004-11-16 10:30:00 -0500 (Tue, 16 Nov 2004) New Revision: 2029
Modified: trunk/debian/CHANGESETS trunk/debian/changelog trunk/debian/lbxproxy.preinst.in trunk/debian/libx11-6.config.in trunk/debian/libx11-6.preinst.in trunk/debian/libxt6.config.in trunk/debian/libxt6.preinst.in trunk/debian/proxymngr.preinst.in trunk/debian/rules trunk/debian/scripts/debconf-updatepo trunk/debian/scripts/prune-non-free trunk/debian/scripts/validate-posix-sh trunk/debian/shell-lib.sh trunk/debian/twm.postinst.in trunk/debian/twm.postrm.in trunk/debian/twm.preinst.in trunk/debian/twm.prerm.in trunk/debian/xbase-clients.postinst.in trunk/debian/xbase-clients.postrm.in trunk/debian/xbase-clients.preinst.in trunk/debian/xdm.init trunk/debian/xdm.postinst.in trunk/debian/xdm.preinst.in trunk/debian/xdm.prerm.in trunk/debian/xfonts-100dpi-transcoded.postrm.in trunk/debian/xfonts-100dpi.postrm.in trunk/debian/xfonts-75dpi-transcoded.postrm.in trunk/debian/xfonts-75dpi.postrm.in trunk/debian/xfonts-base-transcoded.postrm.in trunk/debian/xfonts-base.postrm.in trunk/debian/xfonts-cyrillic.postrm.in trunk/debian/xfonts-scalable.postrm.in trunk/debian/xfree86-common.init trunk/debian/xfree86-common.postinst.in trunk/debian/xfree86-common.preinst.in trunk/debian/xfs.init trunk/debian/xfs.postinst.in trunk/debian/xfs.postrm.in trunk/debian/xfs.preinst.in trunk/debian/xlibs-data.postrm.in trunk/debian/xlibs-data.preinst.in trunk/debian/xlibs-data.prerm.in trunk/debian/xserver-common.postinst.in trunk/debian/xserver-common.postrm.in trunk/debian/xserver-common.preinst.in trunk/debian/xserver-xfree86.bug trunk/debian/xserver-xfree86.config.in trunk/debian/xserver-xfree86.postinst.in trunk/debian/xserver-xfree86.preinst.in trunk/debian/xserver-xfree86.prerm.in trunk/debian/xterm.preinst.in trunk/debian/xterm.prerm.in trunk/debian/xutils.postinst.in trunk/debian/xutils.postrm.in trunk/debian/xutils.preinst.in Log: Replace many occurences of XSI connectives in test(1) with POSIX shell connectives in scripts. Update copyright notices. Wrap long lines. Modified: trunk/debian/CHANGESETS =================================================================== --- trunk/debian/CHANGESETS 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/CHANGESETS 2004-11-16 15:30:00 UTC (rev 2029) @@ -306,4 +306,8 @@ + Fix markup error. 2027 +Replace many occurences of XSI connectives in test(1) with POSIX shell +connectives in scripts. + 2029 + vim:set ai et sts=4 sw=4 tw=80: Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/changelog 2004-11-16 15:30:00 UTC (rev 2029) @@ -182,6 +182,9 @@ + Add description of exit statuses 0, 4, 5, and 6. + Fix markup error. + * Replace many occurences of XSI connectives in test(1) with POSIX shell + connectives in scripts. + Changes by Denis Barbier and Fabio M. Di Nitto: * Edit xc/programs/xkbcomp/symbols/pc/Imakefile so that the new pc/us_intl @@ -264,7 +267,7 @@ exiting upon encountering the first shell interpeter that fails on the script; instead, attempt all the interpreters and report all that fail. - -- Branden Robinson <[EMAIL PROTECTED]> Fri, 12 Nov 2004 17:07:29 -0500 + -- Branden Robinson <[EMAIL PROTECTED]> Tue, 16 Nov 2004 10:27:46 -0500 xfree86 (4.3.0.dfsg.1-8) unstable; urgency=high Modified: trunk/debian/lbxproxy.preinst.in =================================================================== --- trunk/debian/lbxproxy.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/lbxproxy.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian lbxproxy package pre-installation script -# Copyright 1998-2000 Branden Robinson. +# Copyright 1998--2000, 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. @@ -14,7 +14,7 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "install" -o "$1" = "upgrade" ]; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then check_symlinks_and_warn /usr/X11R6/lib/X11/lbxproxy fi Modified: trunk/debian/libx11-6.config.in =================================================================== --- trunk/debian/libx11-6.config.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/libx11-6.config.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -18,7 +18,7 @@ # The xkb directory moved in the xfree86 4.0 packages. DIR=/usr/X11R6/lib/X11/xkb -if [ -d "$DIR" ] && [ ! -L "$DIR" ]; then +if [ -d "$DIR" ] && ! [ -L "$DIR" ]; then run db_input low libx11-6/migrate_xkb_dir run db_go fi Modified: trunk/debian/libx11-6.preinst.in =================================================================== --- trunk/debian/libx11-6.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/libx11-6.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -21,7 +21,7 @@ # xkb directory moved in 4.0 MIGRATION_FILE=/var/run/libx11-6.xkb.migration DIR=/usr/X11R6/lib/X11/xkb - if [ -d "$DIR" ] && [ ! -L "$DIR" ]; then + if [ -d "$DIR" ] && ! [ -L "$DIR" ]; then # We do this debconf stuff in the preinst, not the postinst, because the # migration needs to happen *before* other packages are unpacked. # The question may not have been seen yet if this package wasn't Modified: trunk/debian/libxt6.config.in =================================================================== --- trunk/debian/libxt6.config.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/libxt6.config.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -18,7 +18,7 @@ # The app-defaults directory moved in the xfree86 4.0 packages. DIR=/usr/X11R6/lib/X11/app-defaults -if [ -d "$DIR" ] && [ ! -L "$DIR" ]; then +if [ -d "$DIR" ] && ! [ -L "$DIR" ]; then run db_input low libxt6/migrate_app_defaults_dir run db_go fi Modified: trunk/debian/libxt6.preinst.in =================================================================== --- trunk/debian/libxt6.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/libxt6.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -21,7 +21,7 @@ # app-defaults directory moved in 4.0 MIGRATION_FILE=/var/run/libxt6.app-defaults.migration DIR=/usr/X11R6/lib/X11/app-defaults - if [ -d "$DIR" ] && [ ! -L "$DIR" ]; then + if [ -d "$DIR" ] && ! [ -L "$DIR" ]; then # We do this debconf stuff in the preinst, not the postinst, because the # migration needs to happen *before* other packages are unpacked. # The question may not have been seen yet if this package wasn't Modified: trunk/debian/proxymngr.preinst.in =================================================================== --- trunk/debian/proxymngr.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/proxymngr.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian proxymngr package pre-installation script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -14,7 +14,7 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "install" -o "$1" = "upgrade" ]; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then check_symlinks_and_warn /usr/X11R6/lib/X11/proxymngr fi Modified: trunk/debian/rules =================================================================== --- trunk/debian/rules 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/rules 2004-11-16 15:30:00 UTC (rev 2029) @@ -5,7 +5,7 @@ # Modified by Adam Heath <[EMAIL PROTECTED]> # Modified by Branden Robinson <[EMAIL PROTECTED]> # Modified by Fabio Massimo Di Nitto <[EMAIL PROTECTED]> -# Copyright 1996--2003 Software in the Public Interest, Inc. +# Copyright 1996--2004 Software in the Public Interest, Inc. # 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. @@ -32,7 +32,7 @@ M4:=m4 # This is a horrendous kludge to ensure that some scripts we need are executable. -DUMMY:=$(shell if [ ! -x debian/setperms ]; then chmod 755 debian/setperms; fi) +DUMMY:=$(shell if ! [ -x debian/setperms ]; then chmod 755 debian/setperms; fi) DUMMY:=$(shell debian/setperms) # workaround for an aggressive overfeature of groff Modified: trunk/debian/scripts/debconf-updatepo =================================================================== --- trunk/debian/scripts/debconf-updatepo 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/scripts/debconf-updatepo 2004-11-16 15:30:00 UTC (rev 2029) @@ -20,7 +20,7 @@ # Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# Branden Robinson, 2004-07-28 +# Branden Robinson, 2004-11-11 PROGNAME=${0##*/} @@ -136,12 +136,12 @@ die "No PO directory found; use --podir to specify location" fi -if [ ! -d "$podir" ] +if ! [ -d "$podir" ] then die "PO directory $podir is not a directory" fi -if [ ! -f "$podir/POTFILES.in" ] +if ! [ -f "$podir/POTFILES.in" ] then die "$podir/POTFILES.in does not exist" fi Modified: trunk/debian/scripts/prune-non-free =================================================================== --- trunk/debian/scripts/prune-non-free 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/scripts/prune-non-free 2004-11-16 15:30:00 UTC (rev 2029) @@ -7,7 +7,7 @@ PROGNAME=${0##*/} -if [ ! -d xc ]; then +if ! [ -d xc ]; then echo "$PROGNAME: no unpacked source tree in current working directory" >&2 exit 1 fi Modified: trunk/debian/scripts/validate-posix-sh =================================================================== --- trunk/debian/scripts/validate-posix-sh 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/scripts/validate-posix-sh 2004-11-16 15:30:00 UTC (rev 2029) @@ -35,7 +35,7 @@ fi while [ -n "$1" ]; do - if [ ! -r "$1" ]; then + if ! [ -r "$1" ]; then howl "\"$1\" does not exist or is not readable" usage >&2 exit 2 Modified: trunk/debian/shell-lib.sh =================================================================== --- trunk/debian/shell-lib.sh 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/shell-lib.sh 2004-11-16 15:30:00 UTC (rev 2029) @@ -712,7 +712,7 @@ fi # Does old location exist, but is not a directory? - if [ -e "$old" ] && [ ! -d "$old" ]; then + if [ -e "$old" ] && ! [ -d "$old" ]; then # Back it up. warn "backing up non-directory $old as $old.dpkg-old" mv -b "$old" "$old.dpkg-old" @@ -735,13 +735,13 @@ fi # Does new location exist, but is not a directory? - if [ -e "$new" ] && [ ! -d "$new" ]; then + if [ -e "$new" ] && ! [ -d "$new" ]; then warn "backing up non-directory $new as $new.dpkg-old" mv -b "$new" "$new.dpkg-old" fi # Create new directory if it does not yet exist. - if [ ! -e "$new" ]; then + if ! [ -e "$new" ]; then observe "creating $new" mkdir -p "$new" fi Modified: trunk/debian/twm.postinst.in =================================================================== --- trunk/debian/twm.postinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/twm.postinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian twm package post-installation script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -17,7 +17,8 @@ check_symlinks_and_bomb /usr/X11R6/lib/X11/twm # now safe to remove old twm dir -if [ -e /usr/X11R6/lib/X11/twm.moved-by-preinst -a -L /usr/X11R6/lib/X11/twm ]; then +if [ -e /usr/X11R6/lib/X11/twm.moved-by-preinst ] \ + && [ -L /usr/X11R6/lib/X11/twm ]; then rm -r /usr/X11R6/lib/X11/twm.moved-by-preinst fi @@ -26,8 +27,9 @@ # clean up after older alternative that used different path update-alternatives --remove x-window-manager /usr/bin/X11/twm -update-alternatives --install /usr/bin/x-window-manager x-window-manager /usr/X11R6/bin/twm 40 \ - --slave /usr/share/man/man1/x-window-manager.1.gz x-window-manager.1.gz /usr/X11R6/man/man1/twm.1x.gz +update-alternatives --install /usr/bin/x-window-manager x-window-manager \ + /usr/X11R6/bin/twm 40 --slave /usr/share/man/man1/x-window-manager.1.gz \ + x-window-manager.1.gz /usr/X11R6/man/man1/twm.1x.gz exit 0 Modified: trunk/debian/twm.postrm.in =================================================================== --- trunk/debian/twm.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/twm.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian twm package post-removal script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -14,8 +14,9 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ]; then - if [ -d /usr/X11R6/lib/X11/twm.moved-by-preinst -a -L /usr/X11R6/lib/X11/twm ]; then +if [ "$1" = "abort-install" ] || [ "$1" = "abort-upgrade" ]; then + if [ -d /usr/X11R6/lib/X11/twm.moved-by-preinst ] \ + && [ -L /usr/X11R6/lib/X11/twm ]; then rm /usr/X11R6/lib/X11/twm mv /usr/X11R6/lib/X11/twm.moved-by-preinst /usr/X11R6/lib/X11/twm fi Modified: trunk/debian/twm.preinst.in =================================================================== --- trunk/debian/twm.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/twm.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian twm package pre-installation script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -14,9 +14,9 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "install" -o "$1" = "upgrade" ]; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then # twm dir moved to /etc/X11 in 4.x - if [ -e /usr/X11R6/lib/X11/twm -a ! -L /usr/X11R6/lib/X11/twm ]; then + if [ -e /usr/X11R6/lib/X11/twm ] && ! [ -L /usr/X11R6/lib/X11/twm ]; then observe "removing obsolete /usr/X11R6/lib/X11/twm directory" mv /usr/X11R6/lib/X11/twm /usr/X11R6/lib/X11/twm.moved-by-preinst fi Modified: trunk/debian/twm.prerm.in =================================================================== --- trunk/debian/twm.prerm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/twm.prerm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian twm package pre-removal script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -16,7 +16,7 @@ #DEBHELPER# -if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then update-alternatives --remove x-window-manager /usr/X11R6/bin/twm fi Modified: trunk/debian/xbase-clients.postinst.in =================================================================== --- trunk/debian/xbase-clients.postinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xbase-clients.postinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xbase-clients package post-installation script -# Copyright 1998--2001, 2003 Branden Robinson. +# 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. @@ -21,7 +21,8 @@ # now safe to remove old xinit and xsm dirs for DIR in xinit xsm; do - if [ -e /usr/X11R6/lib/X11/$DIR.moved-by-preinst -a -L /usr/X11R6/lib/X11/$DIR ]; then + if [ -e /usr/X11R6/lib/X11/$DIR.moved-by-preinst ] \ + && [ -L /usr/X11R6/lib/X11/$DIR ]; then rm -r /usr/X11R6/lib/X11/$DIR.moved-by-preinst fi done Modified: trunk/debian/xbase-clients.postrm.in =================================================================== --- trunk/debian/xbase-clients.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xbase-clients.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xbase-clients package post-removal script -# Copyright 1998--2001, 2003 Branden Robinson. +# 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. @@ -14,9 +14,10 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ]; then +if [ "$1" = "abort-install" ] || [ "$1" = "abort-upgrade" ]; then for DIR in xinit xsm; do - if [ -d /usr/X11R6/lib/X11/$DIR.moved-by-preinst -a -L /usr/X11R6/lib/X11/$DIR ]; then + if [ -d /usr/X11R6/lib/X11/$DIR.moved-by-preinst ] \ + && [ -L /usr/X11R6/lib/X11/$DIR ]; then rm /usr/X11R6/lib/X11/$DIR mv /usr/X11R6/lib/X11/$DIR.moved-by-preinst /usr/X11R6/lib/X11/$DIR fi Modified: trunk/debian/xbase-clients.preinst.in =================================================================== --- trunk/debian/xbase-clients.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xbase-clients.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xbase-clients package pre-installation script -# Copyright 1998--2001, 2003 Branden Robinson. +# 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. @@ -14,10 +14,10 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "install" -o "$1" = "upgrade" ]; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then # xinit and xsm dirs moved to /etc/X11 in 4.x for DIR in xinit xsm; do - if [ -e /usr/X11R6/lib/X11/$DIR -a ! -L /usr/X11R6/lib/X11/$DIR ]; then + if [ -e /usr/X11R6/lib/X11/$DIR ] && ! [ -L /usr/X11R6/lib/X11/$DIR ]; then observe "removing obsolete /usr/X11R6/lib/X11/$DIR directory" mv /usr/X11R6/lib/X11/$DIR /usr/X11R6/lib/X11/$DIR.moved-by-preinst fi Modified: trunk/debian/xdm.init =================================================================== --- trunk/debian/xdm.init 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xdm.init 2004-11-16 15:30:00 UTC (rev 2029) @@ -81,13 +81,13 @@ stop) echo -n "Stopping X display manager: xdm" - if [ ! -f $PIDFILE ]; then + if ! [ -f $PIDFILE ]; then echo " not running ($PIDFILE not found)." exit 0 else DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]') KILLCOUNT=1 - if [ ! -e $UPGRADEFILE ]; then + if ! [ -e $UPGRADEFILE ]; then if start-stop-daemon --stop --quiet $SSD_STOP_ARGS; then # give xdm's signal handler a second to catch its breath sleep 1 Modified: trunk/debian/xdm.postinst.in =================================================================== --- trunk/debian/xdm.postinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xdm.postinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -31,7 +31,7 @@ # debconf is not a registry, so we only fiddle with the default file if it # does not exist DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager -if [ ! -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then +if ! [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then DEFAULT_DISPLAY_MANAGER= if db_get shared/default-x-display-manager; then DEFAULT_DISPLAY_MANAGER="$RET" @@ -41,12 +41,12 @@ if db_get "$DEFAULT_DISPLAY_MANAGER"/daemon_name; then DAEMON_NAME="$RET" fi - if [ ! -n "$DAEMON_NAME" ]; then + if [ -z "$DAEMON_NAME" ]; then # if we were unable to determine the name of the selected daemon (for # instance, if the selected default display manager doesn't provide a # daemon_name question), guess DAEMON_NAME=$(which "$DEFAULT_DISPLAY_MANAGER" 2>/dev/null) - if [ ! -n "$DAEMON_NAME" ]; then + if [ -z "$DAEMON_NAME" ]; then warn "unable to determine path to default X display manager" \ "$DEFAULT_DISPLAY_MANAGER; not updating" \ "$DEFAULT_DISPLAY_MANAGER_FILE" Modified: trunk/debian/xdm.preinst.in =================================================================== --- trunk/debian/xdm.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xdm.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -29,7 +29,7 @@ # symbolic link to the /etc/X11/xdm directory; move an existing directory out # of the way (even if we're installing over a non-packaged XFree86 # installation) - if [ -e /usr/X11R6/lib/X11/xdm ] && [ ! -L /usr/X11R6/lib/X11/xdm ]; then + if [ -e /usr/X11R6/lib/X11/xdm ] && ! [ -L /usr/X11R6/lib/X11/xdm ]; then observe "removing obsolete /usr/X11R6/lib/X11/xdm directory" mv /usr/X11R6/lib/X11/xdm /usr/X11R6/lib/X11/xdm.moved-by-preinst fi Modified: trunk/debian/xdm.prerm.in =================================================================== --- trunk/debian/xdm.prerm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xdm.prerm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -121,7 +121,7 @@ run db_go # if the default display manager file doesn't exist, write it with # the path to the new default display manager - if [ ! -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then + if ! [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then DEFAULT_DISPLAY_MANAGER= if db_get shared/default-x-display-manager; then DEFAULT_DISPLAY_MANAGER="$RET" @@ -134,12 +134,12 @@ if db_get "$DEFAULT_DISPLAY_MANAGER"/daemon_name; then DAEMON_NAME="$RET" fi - if [ ! -n "$DAEMON_NAME" ]; then - # if we were unable to determine the name of the selected daemon (for - # instance, if the selected default display manager doesn't provide a - # daemon_name question), guess + if [ -z "$DAEMON_NAME" ]; then + # If we were unable to determine the name of the selected daemon + # (for instance, if the selected default display manager doesn't + # provide a daemon_name question), guess. DAEMON_NAME=$(which "$DEFAULT_DISPLAY_MANAGER" 2>/dev/null) - if [ ! -n "$DAEMON_NAME" ]; then + if [ -z "$DAEMON_NAME" ]; then warn "unable to determine path to default X display manager" \ "$DEFAULT_DISPLAY_MANAGER; not updating" \ "$DEFAULT_DISPLAY_MANAGER_FILE" Modified: trunk/debian/xfonts-100dpi-transcoded.postrm.in =================================================================== --- trunk/debian/xfonts-100dpi-transcoded.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfonts-100dpi-transcoded.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xfonts-100dpi-transcoded package post-removal script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -16,9 +16,7 @@ #DEBHELPER# -if [ "$1" = "purge" -o \ - "$1" = "remove" -o \ - "$1" = "disappear" ]; then +if [ "$1" = "purge" ] || [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then FONTDIRS="100dpi" UPDATECMDS="update-fonts-dir update-fonts-alias" font_update Modified: trunk/debian/xfonts-100dpi.postrm.in =================================================================== --- trunk/debian/xfonts-100dpi.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfonts-100dpi.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xfonts-100dpi package post-removal script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -16,9 +16,7 @@ #DEBHELPER# -if [ "$1" = "purge" -o \ - "$1" = "remove" -o \ - "$1" = "disappear" ]; then +if [ "$1" = "purge" ] || [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then FONTDIRS="100dpi" UPDATECMDS="update-fonts-dir update-fonts-alias" font_update Modified: trunk/debian/xfonts-75dpi-transcoded.postrm.in =================================================================== --- trunk/debian/xfonts-75dpi-transcoded.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfonts-75dpi-transcoded.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xfonts-75dpi-transcoded package post-removal script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -16,9 +16,7 @@ #DEBHELPER# -if [ "$1" = "purge" -o \ - "$1" = "remove" -o \ - "$1" = "disappear" ]; then +if [ "$1" = "purge" ] || [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then FONTDIRS="75dpi" UPDATECMDS="update-fonts-dir update-fonts-alias" font_update Modified: trunk/debian/xfonts-75dpi.postrm.in =================================================================== --- trunk/debian/xfonts-75dpi.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfonts-75dpi.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xfonts-75dpi package post-removal script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -16,9 +16,7 @@ #DEBHELPER# -if [ "$1" = "purge" -o \ - "$1" = "remove" -o \ - "$1" = "disappear" ]; then +if [ "$1" = "purge" ] || [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then FONTDIRS="75dpi" UPDATECMDS="update-fonts-dir update-fonts-alias" font_update Modified: trunk/debian/xfonts-base-transcoded.postrm.in =================================================================== --- trunk/debian/xfonts-base-transcoded.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfonts-base-transcoded.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xfonts-base-transcoded package post-removal script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -16,9 +16,7 @@ #DEBHELPER# -if [ "$1" = "purge" -o \ - "$1" = "remove" -o \ - "$1" = "disappear" ]; then +if [ "$1" = "purge" ] || [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then FONTDIRS="misc" UPDATECMDS="update-fonts-dir update-fonts-alias" font_update Modified: trunk/debian/xfonts-base.postrm.in =================================================================== --- trunk/debian/xfonts-base.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfonts-base.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xfonts-base package post-removal script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -16,9 +16,7 @@ #DEBHELPER# -if [ "$1" = "purge" -o \ - "$1" = "remove" -o \ - "$1" = "disappear" ]; then +if [ "$1" = "purge" ] || [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then FONTDIRS="misc" UPDATECMDS="update-fonts-dir update-fonts-alias" font_update Modified: trunk/debian/xfonts-cyrillic.postrm.in =================================================================== --- trunk/debian/xfonts-cyrillic.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfonts-cyrillic.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xfonts-cyrillic package post-removal script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -16,9 +16,7 @@ #DEBHELPER# -if [ "$1" = "purge" -o \ - "$1" = "remove" -o \ - "$1" = "disappear" ]; then +if [ "$1" = "purge" ] || [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then FONTDIRS="cyrillic" UPDATECMDS="update-fonts-dir update-fonts-alias" font_update Modified: trunk/debian/xfonts-scalable.postrm.in =================================================================== --- trunk/debian/xfonts-scalable.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfonts-scalable.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -16,9 +16,7 @@ #DEBHELPER# -if [ "$1" = "purge" -o \ - "$1" = "remove" -o \ - "$1" = "disappear" ]; then +if [ "$1" = "purge" ] || [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then FONTDIRS="Speedo Type1" UPDATECMDS="update-fonts-scale update-fonts-dir" Modified: trunk/debian/xfree86-common.init =================================================================== --- trunk/debian/xfree86-common.init 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfree86-common.init 2004-11-16 15:30:00 UTC (rev 2029) @@ -17,7 +17,7 @@ set_up_socket_dir () { echo -n "Setting up X server socket directory $SOCKET_DIR..." - if [ -e $SOCKET_DIR -a ! -d $SOCKET_DIR ]; then + if [ -e $SOCKET_DIR ] && ! [ -d $SOCKET_DIR ]; then mv $SOCKET_DIR $SOCKET_DIR.$$ fi mkdir -p $SOCKET_DIR @@ -29,7 +29,7 @@ set_up_ice_dir () { echo -n "Setting up ICE socket directory $ICE_DIR..." - if [ -e $ICE_DIR -a ! -d $ICE_DIR ]; then + if [ -e $ICE_DIR ] && ! [ -d $ICE_DIR ]; then mv $ICE_DIR $ICE_DIR.$$ fi mkdir -p $ICE_DIR Modified: trunk/debian/xfree86-common.postinst.in =================================================================== --- trunk/debian/xfree86-common.postinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfree86-common.postinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -19,7 +19,7 @@ /usr/lib/X11 # ensure that /etc/X11/Xresources is now a directory (see preinst) -if [ ! -d /etc/X11/Xresources ]; then +if ! [ -d /etc/X11/Xresources ]; then die "/etc/X11/Xresources is not a directory; either the package didn't ship" \ "the directory (a bug in the package), or dpkg failed to unpack it to" \ "the filesystem (a bug in dpkg)" Modified: trunk/debian/xfree86-common.preinst.in =================================================================== --- trunk/debian/xfree86-common.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfree86-common.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xfree86-common package pre-installation script -# Copyright 1998--2001, 2003 Branden Robinson. +# 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. @@ -14,13 +14,13 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "install" -o "$1" = "upgrade" ]; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then # In xbase 3.3.2.3a-2 (October 1998), /etc/X11/Xresources became a directory. # Prior to that, it was a conffile. Because it may have been customized by # the administrator and we must avoid clobbering it, refuse to install if # /etc/X11/Xresources exists and is not a directory when this package is # installed. - if [ -e /etc/X11/Xresources -a ! -d /etc/X11/Xresources ]; then + if [ -e /etc/X11/Xresources ] && ! [ -d /etc/X11/Xresources ]; then ERRMSG="/etc/X11/Xresources exists and is not a directory;" ERRMSG="$ERRMSG the xfree86-common package cannot be installed until this" if [ -f /etc/X11/Xresources ]; then Modified: trunk/debian/xfs.init =================================================================== --- trunk/debian/xfs.init 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfs.init 2004-11-16 15:30:00 UTC (rev 2029) @@ -21,7 +21,7 @@ set_up_socket_dir () { echo -n "Setting up X font server socket directory $SOCKET_DIR..." - if [ -e $SOCKET_DIR -a ! -d $SOCKET_DIR ]; then + if [ -e $SOCKET_DIR && ! [ -d $SOCKET_DIR ]; then mv $SOCKET_DIR $SOCKET_DIR.$$ fi mkdir -p $SOCKET_DIR @@ -90,13 +90,13 @@ stop) echo -n "Stopping X font server: xfs" - if [ ! -f $PIDFILE ]; then + if ! [ -f $PIDFILE ]; then echo " not running ($PIDFILE not found)." exit 0 else DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]') KILLCOUNT=1 - if [ ! -e $UPGRADEFILE ]; then + if ! [ -e $UPGRADEFILE ]; then if start-stop-daemon --stop --quiet $SSD_STOP_ARGS; then # give xfs's signal handler a second to catch its breath sleep 1 Modified: trunk/debian/xfs.postinst.in =================================================================== --- trunk/debian/xfs.postinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfs.postinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -46,7 +46,7 @@ # If we are not installing, we may or may not need to restart the daemon, but we # always start the daemon on install. NOSTART= -if [ ! -e /var/run/xfs.install ]; then +if ! [ -e /var/run/xfs.install ]; then # Don't start the daemon if it wasn't stopped... if [ -e /var/run/xfs.daemon-not-stopped ]; then NOSTART=yes Modified: trunk/debian/xfs.postrm.in =================================================================== --- trunk/debian/xfs.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfs.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -21,7 +21,7 @@ mv /usr/X11R6/lib/X11/fs.moved-by-preinst /usr/X11R6/lib/X11/fs fi if [ -e /etc/X11/xfs.moved-by-preinst ] && [ -d /etc/X11/fs ] && \ - [ ! -e /etc/X11/xfs ]; then + ! [ -e /etc/X11/xfs ]; then mv /etc/X11/fs /etc/X11/xfs rm /etc/X11/xfs.moved-by-preinst fi Modified: trunk/debian/xfs.preinst.in =================================================================== --- trunk/debian/xfs.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xfs.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -16,13 +16,13 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then # fs dir moved to /etc/X11 in 4.x - if [ -e /usr/X11R6/lib/X11/fs -a ! -L /usr/X11R6/lib/X11/fs ]; then + if [ -e /usr/X11R6/lib/X11/fs ] && ! [ -L /usr/X11R6/lib/X11/fs ]; then observe "removing obsolete /usr/X11R6/lib/X11/fs directory" mv /usr/X11R6/lib/X11/fs /usr/X11R6/lib/X11/fs.moved-by-preinst fi # /etc/X11/xfs dir renamed to /etc/X11/fs in 4.x - if [ -d /etc/X11/xfs -a ! -e /etc/X11/fs ]; then + if [ -d /etc/X11/xfs ] && ! [ -e /etc/X11/fs ]; then observe "moving X font server configuration directory /etc/X11/xfs" \ "to /etc/X11/fs" mv /etc/X11/xfs /etc/X11/fs Modified: trunk/debian/xlibs-data.postrm.in =================================================================== --- trunk/debian/xlibs-data.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xlibs-data.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xlibs-data package post-removal script -# Copyright 2003 Branden Robinson. +# Copyright 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. @@ -14,7 +14,7 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ]; then +if [ "$1" = "abort-install" ] || [ "$1" = "abort-upgrade" ]; then # revert cleanup started in preinst LINK="/usr/X11R6/lib/X11/locale" if [ -e "$LINK.dpkg-tmp" ]; then Modified: trunk/debian/xlibs-data.preinst.in =================================================================== --- trunk/debian/xlibs-data.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xlibs-data.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xlibs-data package pre-installation script -# Copyright 2003 Branden Robinson. +# Copyright 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. @@ -14,7 +14,7 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "install" -o "$1" = "upgrade" ]; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then # clean up after a mess made in 3.3.2.3a-2 to 3.3.2.3a-7 LINK="/usr/X11R6/lib/X11/locale" if [ -L "$LINK" ]; then Modified: trunk/debian/xlibs-data.prerm.in =================================================================== --- trunk/debian/xlibs-data.prerm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xlibs-data.prerm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,7 @@ #!/bin/sh # Debian xlibs-data package pre-removal script # Copyright 2003 Daniel Stone, Branden Robinson. +# Copyright 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. @@ -14,7 +15,7 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then # deregister available X cursor themes with update-alternatives update-alternatives --remove x-cursor-theme /etc/X11/cursors/core.theme for THEME in whiteglass redglass handhelds; do Modified: trunk/debian/xserver-common.postinst.in =================================================================== --- trunk/debian/xserver-common.postinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xserver-common.postinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xserver-common package post-installation script -# Copyright 1998--2003 Branden Robinson. +# 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. @@ -26,8 +26,8 @@ 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 -a \ - -L /usr/X11R6/lib/X11/xserver ]; then +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 @@ -61,7 +61,7 @@ if db_get xserver-common/xwrapper/nice_value; then NICE_VALUE="$RET" fi - if [ -n "$ALLOWED_USERS" -a -n "$NICE_VALUE" ]; then + 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) Modified: trunk/debian/xserver-common.postrm.in =================================================================== --- trunk/debian/xserver-common.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xserver-common.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xserver-common package post-removal script -# Copyright 1998--2001, 2003 Branden Robinson. +# 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. @@ -20,8 +20,9 @@ XWRAPPER_CONFIG_CHECKSUM="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.md5sum" XWRAPPER_CONFIG_ROSTER="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.roster" -if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ]; then - if [ -d /usr/X11R6/lib/X11/xserver.moved-by-preinst -a -L /usr/X11R6/lib/X11/xserver ]; then +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 Modified: trunk/debian/xserver-common.preinst.in =================================================================== --- trunk/debian/xserver-common.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xserver-common.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xserver-common package pre-installation script -# Copyright 1998--2003 Branden Robinson. +# 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. @@ -22,9 +22,10 @@ CONFIG_AUX_DIR=/var/lib/xfree86 XWRAPPER_CONFIG_CHECKSUM="$CONFIG_AUX_DIR/${XWRAPPER_CONFIG##*/}.md5sum" -if [ "$1" = "install" -o "$1" = "upgrade" ]; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then # xserver dir moved to /etc/X11 in 4.x - if [ -e /usr/X11R6/lib/X11/xserver -a ! -L /usr/X11R6/lib/X11/xserver ]; then + 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 @@ -33,7 +34,7 @@ # 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 + if ! [ -e "$DIR" ]; then observe "creating $DIR" mkdir --mode=755 --parents "$DIR" fi @@ -44,7 +45,7 @@ # 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 + 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" @@ -79,8 +80,9 @@ < "$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" + "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 Modified: trunk/debian/xserver-xfree86.bug =================================================================== --- trunk/debian/xserver-xfree86.bug 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xserver-xfree86.bug 2004-11-16 15:30:00 UTC (rev 2029) @@ -42,11 +42,11 @@ printf "$SERVER_SYMLINK does not exist.\n" >&3 fi -if [ ! -L "$SERVER_SYMLINK" ]; then +if ! [ -L "$SERVER_SYMLINK" ]; then printf "$SERVER_SYMLINK is not a symlink.\n" >&3 fi -if [ ! -x "$SERVER_SYMLINK" ]; then +if ! [ -x "$SERVER_SYMLINK" ]; then printf "$SERVER_SYMLINK is not executable.\n" >&3 fi Modified: trunk/debian/xserver-xfree86.config.in =================================================================== --- trunk/debian/xserver-xfree86.config.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xserver-xfree86.config.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -31,9 +31,8 @@ debug_echo () { # Syntax: debug_echo message ... - if [ -n "$DEBUG_XFREE86_DEBCONF" -o \ - "$DEBCONF_DEBUG" = "user" -o \ - "$DEBCONF_DEBUG" = '.*' ]; then + if [ -n "$DEBUG_XFREE86_DEBCONF" ] || [ "$DEBCONF_DEBUG" = "user" ] \ + || [ "$DEBCONF_DEBUG" = '.*' ]; then DEBUG_XFREE86_PACKAGE=yes observe "$*" fi } @@ -420,7 +419,7 @@ } # analyze arguments; used by auto_answer() -if [ "$1" = "reconfigure" -o -n "$2" ]; then +if [ "$1" = "reconfigure" ] || [ -n "$2" ]; then # if we are reconfiguring, or already have installed the package at least # once before, we should not let auto_answer stomp on existing answers to # debconf questions @@ -716,7 +715,7 @@ # card identifier; try to set a sensible default DEFAULT= -if [ -n "$(echo $NDRIVERS)" ] && [ $NDRIVERS -eq 1 -a $NCARDS -eq 1 ]; then +if [ -n "$(echo $NDRIVERS)" ] && [ $NDRIVERS -eq 1 ] && [ $NCARDS -eq 1 ]; then if which discover > /dev/null 2>&1; then if [ "$AUTODETECT_VIDEO_CARD" = "true" ]; then DEFAULT=$(echo "$DISCOVERED_VIDEO" | awk 'BEGIN { FS="\t" } {print $1}') @@ -752,7 +751,7 @@ # only one in the machine (broken PCI bus code in the XFree86 X server, most # likely). If there are multiple video cards, we need to configure one as the # primary head. -if [ "$ARCH" = "powerpc" -o "$MULTIHEAD" = "yes" ]; then +if [ "$ARCH" = "powerpc" ] || [ "$MULTIHEAD" = "yes" ]; then if [ "$ARCH" = "powerpc" ]; then PRIORITY=medium fi @@ -944,7 +943,7 @@ # get asked (for noninteractive configuration) db_set xserver-xfree86/autodetect_mouse "false" fi - if [ -n "$AUTODETECTED_PORT" -a -n "$AUTODETECTED_PROTOCOL" ]; then + if [ -n "$AUTODETECTED_PORT" ] && [ -n "$AUTODETECTED_PROTOCOL" ]; then PRIORITY=medium break # port and protocol determined fi @@ -1105,7 +1104,7 @@ # priority of xserver-xfree86/config/monitor/{several things} PRIORITY=high -if [ -n "$HORIZ_SYNC" -a -n "$VERT_REFRESH" ]; then +if [ -n "$HORIZ_SYNC" ] && [ -n "$VERT_REFRESH" ]; then debug_echo "\$HORIZ_SYNC: \"$HORIZ_SYNC\" ; \$VERT_REFRESH: \"$VERT_REFRESH\"; setting question priority to low" PRIORITY=low else @@ -1268,7 +1267,7 @@ # server modules to load # XXX: damnit, explicitly loading the dri module is broken for sunffb users :-P db_get xserver-xfree86/config/device/driver -if [ "$ARCH" = "sparc" -a "$RET" = "sunffb" ]; then +if [ "$ARCH" = "sparc" ] && [ "$RET" = "sunffb" ]; then MODULE_LIST="GLcore, bitmap, dbe, ddc, extmod, freetype, glx, int10, record, speedo, type1, vbe" else MODULE_LIST="GLcore, bitmap, dbe, ddc, dri, extmod, freetype, glx, int10, record, speedo, type1, vbe" Modified: trunk/debian/xserver-xfree86.postinst.in =================================================================== --- trunk/debian/xserver-xfree86.postinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xserver-xfree86.postinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xserver-xfree86 package post-installation script -# Copyright 1998--2003 Branden Robinson. +# 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. @@ -65,7 +65,7 @@ if ! cmp -s "$SERVER_SYMLINK" "$NEW_SERVER_SYMLINK"; then if [ "$(readlink "$SERVER_SYMLINK")" \ != "$(readlink "$NEW_SERVER_SYMLINK")" ]; then - if [ ! -d "$SERVER_SYMLINK" ]; then + if ! [ -d "$SERVER_SYMLINK" ]; then mv "$NEW_SERVER_SYMLINK" "$SERVER_SYMLINK" readlink "$SERVER_SYMLINK" | md5sum > \ "$SERVER_SYMLINK_CHECKSUM" Modified: trunk/debian/xserver-xfree86.preinst.in =================================================================== --- trunk/debian/xserver-xfree86.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xserver-xfree86.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xserver-xfree86 package pre-installation script -# Copyright 2003 Branden Robinson. +# Copyright 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>. @@ -25,11 +25,11 @@ THIS_SERVER=/usr/bin/X11/XFree86 UNCONFIGURED_LINK_TARGET=$(which true) -if [ "$1" = "install" -o "$1" = "upgrade" ]; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then # 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 + if ! [ -e "$DIR" ]; then observe "creating $DIR" mkdir --mode=755 --parents "$DIR" fi @@ -44,13 +44,13 @@ if [ -d "$CONFIG_AUX_DIR" ]; then # first, create and checksum the X server symlink; only do this if it # both does not exist and is not a symbolic link - if [ ! -e "$SERVER_SYMLINK" -a ! -L "$SERVER_SYMLINK" ]; then + if ! [ -e "$SERVER_SYMLINK" ] && ! [ -L "$SERVER_SYMLINK" ]; then # set the target to the unconfigured default ln -s "$UNCONFIGURED_LINK_TARGET" "$SERVER_SYMLINK" readlink "$SERVER_SYMLINK" | md5sum > "$SERVER_SYMLINK_CHECKSUM" fi # next, XF86Config-4 - if [ ! -e "$XF86CONFIG" ]; then + if ! [ -e "$XF86CONFIG" ]; then # cheap, fork()-free version of "touch" : > "$XF86CONFIG" md5sum "$XF86CONFIG" > "$XF86CONFIG_CHECKSUM" @@ -62,7 +62,7 @@ # do *not* already exist if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt-nl "4.2.1-10"; then # do we have any configuration files to work with? - if [ -e "$SERVER_SYMLINK" -o -e "$XF86CONFIG" ]; then + if [ -e "$SERVER_SYMLINK" ] || [ -e "$XF86CONFIG" ]; then # only proceed if config file auxiliary directory exists if [ -d "$CONFIG_AUX_DIR" ]; then Modified: trunk/debian/xserver-xfree86.prerm.in =================================================================== --- trunk/debian/xserver-xfree86.prerm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xserver-xfree86.prerm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xserver-xfree86 package pre-removal script -# Copyright 1998--2001, 2003 Branden Robinson. +# 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. @@ -27,7 +27,7 @@ SERVER_SYMLINK_CHECKSUM="$CONFIG_AUX_DIR/${SERVER_SYMLINK##*/}.md5sum" UNCONFIGURED_LINK_TARGET=$(which true) -if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then # if the X server symlink is under automatic management, we are removing its # target; we must re-set it to its "unconfigured default" @@ -52,7 +52,7 @@ if ! cmp -s "$SERVER_SYMLINK" "$NEW_SERVER_SYMLINK"; then if [ "$(readlink "$SERVER_SYMLINK")" \ != "$(readlink "$NEW_SERVER_SYMLINK")" ]; then - if [ ! -d "$SERVER_SYMLINK" ]; then + if ! [ -d "$SERVER_SYMLINK" ]; then warn "X server provided by $THIS_PACKAGE package is being" \ "removed; setting $SERVER_SYMLINK to point to" \ "$UNCONFIGURED_LINK_TARGET" Modified: trunk/debian/xterm.preinst.in =================================================================== --- trunk/debian/xterm.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xterm.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xterm package pre-installation script -# Copyright 2003 Branden Robinson. +# Copyright 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. @@ -14,7 +14,7 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "upgrade" -o "$1" = "install" ]; then +if [ "$1" = "upgrade" ] || [ "$1" = "install" ]; then if dpkg --compare-versions "$2" lt "4.0.1-1"; then # clean up after older alternative that used different path if update-alternatives --display x-terminal-emulator | Modified: trunk/debian/xterm.prerm.in =================================================================== --- trunk/debian/xterm.prerm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xterm.prerm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xterm package pre-removal script -# Copyright 1998, 1999 Branden Robinson. +# Copyright 1998, 1999, 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. @@ -14,7 +14,7 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then update-alternatives --remove x-terminal-emulator /usr/X11R6/bin/xterm update-alternatives --remove x-terminal-emulator /usr/X11R6/bin/uxterm fi Modified: trunk/debian/xutils.postinst.in =================================================================== --- trunk/debian/xutils.postinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xutils.postinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xutils package post-installation script -# Copyright 1998-2001 Branden Robinson. +# 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. @@ -17,7 +17,8 @@ check_symlinks_and_bomb /usr/X11R6/lib/X11/rstart /usr/bin/rstartd # now safe to finish migrations started in preinst -if [ -e /usr/X11R6/lib/X11/rstart.moved-by-preinst -a -L /usr/X11R6/lib/X11/rstart ]; then +if [ -e /usr/X11R6/lib/X11/rstart.moved-by-preinst ] \ + && [ -L /usr/X11R6/lib/X11/rstart ]; then rm -r /usr/X11R6/lib/X11/rstart.moved-by-preinst fi if [ -e /etc/X11/rstartd.moved-by-preinst ]; then Modified: trunk/debian/xutils.postrm.in =================================================================== --- trunk/debian/xutils.postrm.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xutils.postrm.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xutils package post-removal script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -14,12 +14,14 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ]; then - if [ -d /usr/X11R6/lib/X11/rstart.moved-by-preinst -a -L /usr/X11R6/lib/X11/rstart ]; then +if [ "$1" = "abort-install" ] || [ "$1" = "abort-upgrade" ]; then + if [ -d /usr/X11R6/lib/X11/rstart.moved-by-preinst ] \ + && -L /usr/X11R6/lib/X11/rstart ]; then rm /usr/X11R6/lib/X11/rstart mv /usr/X11R6/lib/X11/rstart.moved-by-preinst /usr/X11R6/lib/X11/rstart fi - if [ -e /etc/X11/rstartd.moved-by-preinst -a -d /etc/X11/rstart -a ! -e /etc/X11/rstartd ]; then + if [ -e /etc/X11/rstartd.moved-by-preinst ] && [ -d /etc/X11/rstart ] \ + && ! [ -e /etc/X11/rstartd ]; then mv /etc/X11/rstart /etc/X11/rstartd rm /etc/X11/rstart.moved-by-preinst fi Modified: trunk/debian/xutils.preinst.in =================================================================== --- trunk/debian/xutils.preinst.in 2004-11-16 15:12:26 UTC (rev 2028) +++ trunk/debian/xutils.preinst.in 2004-11-16 15:30:00 UTC (rev 2029) @@ -1,6 +1,6 @@ #!/bin/sh # Debian xutils package pre-installation script -# Copyright 1998-2001 Branden Robinson. +# Copyright 1998--2001, 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. @@ -14,9 +14,9 @@ #INCLUDE_SHELL_LIB# -if [ "$1" = "install" -o "$1" = "upgrade" ]; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then # /etc/X11/rstartd dir renamed to /etc/X11/rstart in 4.x - if [ -d /etc/X11/rstartd -a ! -e /etc/X11/rstart ]; then + if [ -d /etc/X11/rstartd ] && ! [ -e /etc/X11/rstart ]; then observe "moving X remote start daemon configuration directory" \ "/etc/X11/rstartd to /etc/X11/rstart" mv /etc/X11/rstartd /etc/X11/rstart @@ -24,7 +24,8 @@ fi # rstart dir moved to /etc/X11 in 4.x - if [ -e /usr/X11R6/lib/X11/rstart -a ! -L /usr/X11R6/lib/X11/rstart ]; then + if [ -e /usr/X11R6/lib/X11/rstart ] \ + && ! [ -L /usr/X11R6/lib/X11/rstart ]; then observe "removing obsolete /usr/X11R6/lib/X11/rstart directory" mv /usr/X11R6/lib/X11/rstart /usr/X11R6/lib/X11/rstart.moved-by-preinst fi