]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blame - misc/uuidd.rc
AOSP: mke2fs, libext2fs: make filesystem image reproducible
[thirdparty/e2fsprogs.git] / misc / uuidd.rc
CommitLineData
740837de
TT
1#! /bin/sh -e
2### BEGIN INIT INFO
3# Provides: uuidd
4# Required-Start: $time $local_fs
5# Required-Stop: $time $local_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: uuidd daemon
9# Description: Init script for the uuid generation daemon
10### END INIT INFO
11#
12# Author: "Theodore Ts'o" <tytso@mit.edu>
13#
14set -e
15
16PATH=/bin:/usr/bin:/sbin:/usr/sbin
17DAEMON=/usr/sbin/uuidd
18PIDFILE=/var/run/uuidd/uuidd.pid
19
20test -x $DAEMON || exit 0
21
22. /lib/lsb/init-functions
23
24case "$1" in
25 start)
26 log_daemon_msg "Starting uuid generator" "uuidd"
27 start_daemon -p $PIDFILE $DAEMON
28 log_end_msg $?
29 ;;
30 stop)
31 log_daemon_msg "Stopping uuidd generator" "uuidd"
32 killproc -p $PIDFILE $DAEMON
33 log_end_msg $?
34 ;;
35 status)
36 if pidofproc -p $PIDFILE $DAEMON >& /dev/null ; then
37 echo "$DAEMON is running";
38 exit 0;
39 else
40 echo "$DAEMON is NOT running";
41 if test -f /var/run/uuidd.pid; then exit 2; fi
42 exit 3;
43 fi
44 ;;
45 force-reload|restart)
46 $0 stop
47 $0 start
48 ;;
49 *)
50 echo "Usage: /etc/init.d/uuidd {start|stop|restart|force-reload}"
51 exit 1
52 ;;
53esac
54
55exit 0