summaryrefslogtreecommitdiff
path: root/debian/xserver-xorg.preinst.in
blob: ac45c245a42458fe49770962b7460c4e2f9267e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
# Debian xserver-xorg package pre-installation script
# 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>.


set -e

THIS_PACKAGE=xserver-xorg
THIS_SCRIPT=preinst

#INCLUDE_SHELL_LIB#

CONFIG_DIR=/etc/X11
SERVER_SYMLINK="$CONFIG_DIR/X"
CONFIG_AUX_DIR=/var/lib/x11
THIS_SERVER=/usr/bin/Xorg

if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
  # create the configuration files directory if it doesn't exist
  if ! [ -e "$CONFIG_DIR" ]; then
    observe "creating $CONFIG_DIR"
    mkdir --mode=755 --parents "$CONFIG_DIR"
  fi
fi

case "$1" in
  install|upgrade)
    if dpkg --compare-versions "$2" lt-nl "1:7.3+11"; then
      remove_conffile_lookup xserver-xorg "/etc/init.d/xserver-xorg"
    fi
    ;;
esac

#DEBHELPER#

exit 0

# vim:set ai et sts=2 sw=2 tw=0: