mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
haveged: convert to procd
Convert haveged init script to use procd
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 4f717a6f65)
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2012 OpenWrt.org
|
||||
|
||||
START=13
|
||||
USE_PROCD=1
|
||||
|
||||
HAVEGED_THRESHOLD=1024
|
||||
HAVEGED_DCACHE=32
|
||||
HAVEGED_ICACHE=32
|
||||
|
||||
start() {
|
||||
service_start /usr/sbin/haveged -w $HAVEGED_THRESHOLD -d $HAVEGED_DCACHE -i $HAVEGED_ICACHE -v 1
|
||||
}
|
||||
|
||||
stop() {
|
||||
service_stop /usr/sbin/haveged
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/sbin/haveged
|
||||
procd_append_param command -F -w $HAVEGED_THRESHOLD -d $HAVEGED_DCACHE -i $HAVEGED_ICACHE -v 1
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user