aboutsummaryrefslogtreecommitdiff
path: root/core/debian/cryptech-novena-rtl.init
blob: e04591c56ae7c6c545d6abb63489e0faa29fdae7 (plain) (blame)
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
#!/bin/sh -
### BEGIN INIT INFO
# Provides:          cryptech-novena-rtl
# Required-Start:    $remote_fs
# Required-Stop:
# Should-Start:
# Default-Start:     S
# Default-Stop:
# Short-Description: Reload Novena FPGA on boot.
# Description:       Reload Novena FPGA on boot.
### END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin

. /lib/lsb/init-functions
. /etc/default/cryptech-novena-rtl

do_start () {
    log_daemon_msg "Loading Novena FPGA from ${fpga_bitstream}"
    load_novena_fpga "${fpga_bitstream}"
}

case "$1" in
    start|restart|reload|force-reload|"")
	do_start
	;;
    stop)
	# No-op
	;;
    *)
	echo "Usage: cryptech-novena-rtl [start]" >&2
	exit 3
	;;
esac

: