#!/bin/sh # # xfs: Starts the X Font Server # # Version: @(#) /etc/rc.d/init.d/xfs 1.4 # # chkconfig: 2345 20 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 # See how we were called. case "$1" in start) gprintf "Starting X Font Server: " mkdir -p /tmp chmod a+w,+t /tmp rm -fr /tmp/.font-unix daemon --check xfs xfs -port 7100 -daemon -droppriv -user xfs touch /var/lock/subsys/xfs echo ;; stop) gprintf "Shutting down X Font Server: " killproc xfs rm -f /var/lock/subsys/xfs echo ;; status) status xfs ;; restart) gprintf "Restarting X Font Server. " if [ -f /var/lock/subsys/xfs ]; then killproc xfs -USR1 else rm -fr /tmp/.font-unix daemon --check xfs su xfs -c \"xfs -port 7100\" -s /bin/sh touch /var/lock/subsys/xfs fi echo ;; *) gprintf "*** Usage: xfs {start|stop|status|restart}\n" exit 1 esac exit 0