#!/bin/sh # # xfs: Starts the X Font Server # # Version: @(#) /etc/rc.d/init.d/xfs 1.4 # # chkconfig: 2345 90 10 # description: Starts and stops the X Font Server at boot time and shutdown. # # processname: xfs # config: /etc/X11/fs/config # hide: true # Source function library. . /etc/rc.d/init.d/functions reload() { if [ -f /var/lock/subsys/xfs ]; then echo -n "Reloading X Font Server config: " killproc xfs -USR1 RETVAL=$? echo fi } start() { echo -n "Starting X Font Server: " rm -fr /tmp/.font-unix daemon --user xfs xfs -port -1 -daemon RETVAL=$? touch /var/lock/subsys/xfs echo } stop() { echo -n "Shutting down X Font Server: " killproc xfs RETVAL=$? rm -f /var/lock/subsys/xfs echo } RETVAL=0 # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status xfs ;; reload) reload ;; restart) if [ -f /var/lock/subsys/xfs ]; then reload else start fi ;; *) echo "*** Usage: xfs {start|stop|status|reload|restart}" exit 1 esac exit $RETVAL