]> git.pld-linux.org Git - packages/XFree86.git/blame - xfs.init
- 4.8.0 (probably the last XFree86 version ever, for comparison and archival reasons)
[packages/XFree86.git] / xfs.init
CommitLineData
5716bf05 1#!/bin/sh
2#
3# xfs: Starts the X Font Server
4#
4f40a6c7 5# Version: $Revision$
5716bf05 6#
7# chkconfig: 345 90 10
8# description: Starts and stops the X Font Server at boot time and shutdown.
9#
10# processname: xfs
11# config: /etc/X11/fs/config
12# hide: true
13
14# Source function library.
15. /etc/rc.d/init.d/functions
16
91d01143 17# Get service config
a64df606 18if [ -f /etc/sysconfig/xfs ]; then
4f40a6c7 19 . /etc/sysconfig/xfs
91d01143 20fi
21
5c332e77 22start() {
5716bf05 23 if [ ! -f /var/lock/subsys/xfs ]; then
ce48ad5a 24 msg_starting "X Font Server"
5716bf05 25 rm -fr /tmp/.font-unix
91d01143 26 daemon xfs \
27 $([ -n "$XFS_PORT" ] && echo "-port $XFS_PORT") \
ce48ad5a 28 $([ -n "$XFS_OPTIONS" ] && echo "$XFS_OPTIONS")
4f40a6c7 29 RETVAL=$?
30 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xfs
5716bf05 31 else
2b52a414 32 msg_already_running "X Font Server"
5716bf05 33 fi
5c332e77
JB
34}
35
36stop() {
4f40a6c7 37 if [ -f /var/lock/subsys/xfs ]; then
38 msg_stopping "X Font Server"
39 killproc xfs
4f40a6c7 40 rm -f /var/lock/subsys/xfs
41 else
42 msg_not_running "X Font Server"
4f40a6c7 43 fi
5c332e77
JB
44}
45
46reload() {
5716bf05 47 if [ -f /var/lock/subsys/xfs ]; then
170cf6c0 48 msg_reloading "X Font Server"
5716bf05 49 killproc xfs -USR1
4f40a6c7 50 RETVAL=$?
5716bf05 51 else
a84b955d 52 msg_not_running "X Font Server"
5c332e77 53 RETVAL=7
5716bf05 54 fi
5c332e77
JB
55}
56
57condrestart() {
58 if [ -f /var/lock/subsys/xfs ]; then
59 stop
60 start
61 else
62 msg_not_running xfs
63 RETVAL=$1
64 fi
65}
66
67RETVAL=0
68# See how we were called.
69case "$1" in
70 start)
71 start
72 ;;
73 stop)
74 stop
75 ;;
76 restart)
77 stop
78 start
79 ;;
80 try-restart)
81 condrestart 0
82 ;;
83 reload|force-reload)
84 reload
85 ;;
86 status)
87 status xfs
88 exit $?
5716bf05 89 ;;
90 *)
5c332e77 91 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
fca14980 92 exit 3
5716bf05 93esac
94
4f40a6c7 95exit $RETVAL
This page took 0.107037 seconds and 5 git commands to generate.