e2fsprogs/uuidd.init
Eric Sandeen 858507e01a * Tue Jan 09 2008 Eric Sandeen <sandeen@redhat.com> 1.40.4-3
- New uuidd subpackage, and properly set up uuidd at install.
2008-01-14 20:22:37 +00:00

76 lines
1.3 KiB
Bash
Executable File

#!/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