3 # $Id: xfree86-common.init 2186 2005-02-11 07:11:05Z branden $
5 # Copyright 2003, 2004 Branden Robinson <branden@debian.org>.
7 # This is free software; you may redistribute it and/or modify
8 # it under the terms of the GNU General Public License as
9 # published by the Free Software Foundation; either version 2,
10 # or (at your option) any later version.
12 # This is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License with
18 # the Debian operating system, in /usr/share/common-licenses/GPL; if
19 # not, write to the Free Software Foundation, Inc., 59 Temple Place,
20 # Suite 330, Boston, MA 02111-1307 USA
24 PATH=/bin:/usr/bin:/sbin:/usr/sbin
25 SOCKET_DIR=/tmp/.X11-unix
26 ICE_DIR=/tmp/.ICE-unix
29 # Restore file security context (SELinux).
30 if which restorecon >/dev/null 2>&1; then
35 set_up_socket_dir () {
36 echo -n "Setting up X server socket directory $SOCKET_DIR..."
37 if [ -e $SOCKET_DIR ] && ! [ -d $SOCKET_DIR ]; then
38 mv $SOCKET_DIR $SOCKET_DIR.$$
42 chmod 1777 $SOCKET_DIR
43 do_restorecon $SOCKET_DIR
48 echo -n "Setting up ICE socket directory $ICE_DIR..."
49 if [ -e $ICE_DIR ] && ! [ -d $ICE_DIR ]; then
50 mv $ICE_DIR $ICE_DIR.$$
55 do_restorecon $ICE_DIR
65 restart|reload|force-reload)
66 /etc/init.d/xfree86-common start
74 echo "Usage: /etc/init.d/xfree86-common {start|stop|restart|reload|force-reload}"
81 # vim:set ai et sts=2 sw=2 tw=80: