xref: /OK3568_Linux_fs/buildroot/package/haveged/S21haveged (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/sh
2
3case "$1" in
4	start)
5		printf "Starting haveged: "
6		start-stop-daemon -S -x /usr/sbin/haveged -- -w 1024 -r 0
7		[ $? = 0 ] && echo "OK" || echo "FAIL"
8		;;
9	stop)
10		printf "Stopping haveged: "
11		start-stop-daemon -K -x /usr/sbin/haveged
12		[ $? = 0 ] && echo "OK" || echo "FAIL"
13		;;
14	restart|reload)
15		$0 stop
16		$0 start
17		;;
18	*)
19		echo "Usage: $0 {start|stop|restart}"
20		exit 1
21esac
22
23exit 0
24