Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > e5cd1ef59e8f12e0fc1cc88d67f741eb > files > 62

xorg-x11-6.9-1.cvs20050915.2mdk.src.rpm

#!/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)
	echo -n "Starting X Font Server: "
	mkdir -p /tmp
	chmod a+w,+t /tmp
	rm -fr /tmp/.font-unix
	daemon --check xfs xfs -port -1 -daemon -droppriv -user xfs
	touch /var/lock/subsys/xfs
	echo
	;;
  stop)
	echo -n "Shutting down X Font Server: "
	killproc xfs
	rm -f /var/lock/subsys/xfs
	echo
	;;
  status)
	status xfs
	;;
  restart)
	echo -n "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 -1\" -s /bin/sh
	    touch /var/lock/subsys/xfs
	fi
	echo
	;;
  *)
	echo "*** Usage: xfs {start|stop|status|restart}"
	exit 1
esac

exit 0