2008-01-14 20:22:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# uuidd uuidd daemon for unique time-based UUID generation
|
|
|
|
#
|
|
|
|
# Author: Eric Sandeen <sandeen@redhat.com>
|
|
|
|
#
|
2009-06-29 17:59:48 +00:00
|
|
|
# chkconfig: - 60 99
|
2008-01-14 20:22:37 +00:00
|
|
|
#
|
|
|
|
# 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-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
|
2009-06-18 14:13:30 +00:00
|
|
|
RETVAL=$?
|
2008-01-14 20:22:37 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $RETVAL
|