You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
564 B

#!/bin/sh /etc/rc.common
# Copyright (C) 2011-2014 OpenWrt.org
START=98
RNGD_FILLWATER=$(uci -q get system.@rngd[0].fill_watermark)
RNGD_DEVICE=$(uci -q get system.@rngd[0].device)
RNGD_ENABLED=$(uci -q get system.@rngd[0].enabled)
RNGD_PRECMD=$(uci -q get system.@rngd[0].precmd)
: ${RNGD_FILLWATER:=4000}
echo PRECMD=\'$RNGD_PRECMD\'
start() {
[ 1 -eq "$RNGD_ENABLED" ] && {
[ -z "${RNGD_PRECMD}" ] || ${RNGD_PRECMD} ${RNGD_DEVICE}
service_start /sbin/rngd -r ${RNGD_DEVICE} -W ${RNGD_FILLWATER}
}
}
stop() {
service_stop /sbin/rngd
}