Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > eb8ea93c0f34821251df6d6c349b7466 > files > 11

e4fsprogs-1.41.1-2.el5.src.rpm

#!/bin/bash
#
# uuidd		uuidd daemon for unique time-based UUID generation
#
# Author:	Eric Sandeen <sandeen@redhat.com>
#
# chkconfig:	2345 60 99
#
# description:  uuidd is a helper daemon to guarantee uniqueness of \
#		time-based UUIDs when using libuuid.
# processname:  uuidd
# pidfile: /var/lib/libuuid/uuidd.pid
#

### BEGIN INIT INFO
# Provides: uuidd
# Required-Start: $time $local_fs
# Required-Stop: $time $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: UUID daemon
# Description: Daemon which guarantees uniqueness of time-based UUIDS
#     when using libuuid.
### END INIT INFO


# source function library
. /etc/rc.d/init.d/functions

RETVAL=0
DAEMON=uuidd

start() {
	echo -n $"Starting uuidd: "
	daemon --user uuidd --pidfile /var/lib/libuuid/uuidd.pid /usr/sbin/uuidd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/uuidd
}

stop() {
	echo -n $"Stopping uuidd: "
	killproc uuidd
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/uuidd
}

restart() {
	stop
	start
}

case "$1" in
  start)
	start
	;;
  stop) 
	stop
	;;
  restart|force-reload|reload)
	restart
	;;
  condrestart)
	[ -f /var/lock/subsys/uuidd ] && restart
	;;
  status)
	status -p /var/lib/libuuid/uuidd.pid uuidd uuidd
	REVAL=$?
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
	exit 1
esac

exit $RETVAL