#!/bin/bash # # uuidd uuidd daemon for unique time-based UUID generation # # Author: Eric Sandeen <sandeen@redhat.com> # # chkconfig: - 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-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() { gprintf "Starting uuidd: " daemon --user uuidd --pidfile /var/run/uuidd/uuidd.pid /usr/sbin/uuidd RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/uuidd } stop() { gprintf "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/run/uuidid/uuidd.pid uuidd uuidd RETVAL=$? ;; *) gprintf "Usage: %s {start|stop|status|restart|reload|force-reload|condrestart}\n" "$0" exit 1 esac exit $RETVAL