This file is indexed.

/etc/init.d/rng-tools is in rng-tools 2-unofficial-mt.14-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#! /bin/sh
#
# rng-tools	initscript for the rng-tools package
#		Copr. 2003 by Henrique de Moraes Holschuh <hmh@debian.org>
#		Copr. 2002 by Viral Shah <viral@debian.org>
#
### BEGIN INIT INFO
# Provides:		rng-tools
# Required-Start:	$remote_fs $syslog
# Required-Stop:	$remote_fs $syslog
# Default-Start:	2 3 4 5
# Default-Stop:		0 1 6
### END INIT INFO
#
#
# $Id: rng-tools.init,v 1.6.2.10 2008-06-10 19:51:37 hmh Exp $

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/rngd
NAME=rngd
DESC="Hardware RNG entropy gatherer daemon"
PIDFILE=/var/run/rngd.pid

DEVICELIST="hwrng hw_random hwrandom intel_rng i810_rng"

HRNGDEVICE=/dev/hwrng
RNGDOPTIONS=
[ -r /etc/default/rng-tools ] && . /etc/default/rng-tools

test -f ${DAEMON} || exit 0

set -e

finddevice () {
	[ -c "${HRNGDEVICE}" ] && return 0
	for i in ${DEVICELIST} ; do
		if [ -c "/dev/$i" ] ; then
			HRNGDEVICE="/dev/$i"
			return 0
		fi
		if [ -c "/dev/misc/$i" ] ; then
			HRNGDEVICE="/dev/misc/$i"
			return 0
		fi
	done

	echo "(Hardware RNG device inode not found)"
	echo "$0: Cannot find a hardware RNG device to use." >&2
	exit 1
}

START="--start --quiet --pidfile ${PIDFILE} --startas ${DAEMON} --name ${NAME}"
case "$1" in
  start)
	echo -n "Starting $DESC: "
	finddevice
	START="${START} -- -r ${HRNGDEVICE} ${RNGDOPTIONS}"
	if start-stop-daemon ${START} >/dev/null 2>&1 ; then
		echo "${NAME}."
	else
		if start-stop-daemon --test ${START} >/dev/null 2>&1; then
			echo "(failed)."
			exit 1
		else
			echo "${DAEMON} already running."
			exit 0
		fi
	fi
	;;
  stop)
	echo -n "Stopping $DESC: "
	if start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
		--startas ${DAEMON} --retry 10 --name ${NAME} \
		>/dev/null 2>&1 ; then
			echo "${NAME}."
	else
		if start-stop-daemon --test ${START} >/dev/null 2>&1; then
			echo "(not running)."
			exit 0
		else
			echo "(failed)."
			exit 1
		fi
	fi
	;;
  restart|force-reload)
	$0 stop
	exec $0 start	    
	;;
  *)
	echo "Usage: $0 {start|stop|restart|force-reload}" 1>&2
	exit 1
	;;
esac

exit 0