]> git.pld-linux.org Git - packages/X11.git/blame - xfs.init
- another try
[packages/X11.git] / xfs.init
CommitLineData
bb7300c7 1#!/bin/sh
2#
3# xfs: Starts the X Font Server
4#
a904603f 5# Version: $Revision$
bb7300c7 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
e3d6dda9 17# Get service config
dcef0811 18if [ -f /etc/sysconfig/xfs ]; then
a904603f 19 . /etc/sysconfig/xfs
e3d6dda9 20fi
21
7533d254 22RETVAL=0
bb7300c7 23# See how we were called.
24case "$1" in
25 start)
26 # Check if the service is already running?
27 if [ ! -f /var/lock/subsys/xfs ]; then
f0cd1d9d 28 msg_starting "X Font Server"
bb7300c7 29 rm -fr /tmp/.font-unix
e3d6dda9 30 daemon xfs \
31 $([ -n "$XFS_PORT" ] && echo "-port $XFS_PORT") \
f0cd1d9d 32 $([ -n "$XFS_OPTIONS" ] && echo "$XFS_OPTIONS")
a904603f 33 RETVAL=$?
34 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xfs
bb7300c7 35 else
7a62c535 36 msg_already_running "X Font Server"
bb7300c7 37 fi
bb7300c7 38 ;;
39 stop)
a904603f 40 if [ -f /var/lock/subsys/xfs ]; then
41 msg_stopping "X Font Server"
42 killproc xfs
a904603f 43 rm -f /var/lock/subsys/xfs
44 else
45 msg_not_running "X Font Server"
a904603f 46 fi
bb7300c7 47 ;;
48 status)
49 status xfs
7533d254 50 exit $?
bb7300c7 51 ;;
52 restart)
53 $0 stop
54 $0 start
7533d254 55 exit $?
bb7300c7 56 ;;
a904603f 57 reload|force-reload)
bb7300c7 58 if [ -f /var/lock/subsys/xfs ]; then
1126e1a5 59 msg_reloading "X Font Server"
bb7300c7 60 killproc xfs -USR1
a904603f 61 RETVAL=$?
bb7300c7 62 else
7533d254 63 msg_not_running "X Font Server" >&2
64 exit 7
bb7300c7 65 fi
66 ;;
67 *)
a904603f 68 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
7533d254 69 exit 3
bb7300c7 70esac
71
a904603f 72exit $RETVAL
This page took 0.070117 seconds and 4 git commands to generate.