From d445cb772d2a7f4f0bfb31a6aa1751a285ea2493 Mon Sep 17 00:00:00 2001
From: Jan-Philipp Litza <janphilipp@litza.de>
Date: Sat, 30 Jul 2016 20:27:20 +0200
Subject: [PATCH] gluon-radvd: Use procd in init script

The main advantage is that procd is capable of logging stderr to logd,
making errors easier to debug.
---
 .../gluon-radvd/files/etc/init.d/gluon-radvd   | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/package/gluon-radvd/files/etc/init.d/gluon-radvd b/package/gluon-radvd/files/etc/init.d/gluon-radvd
index 5e0f59625..d33005e48 100755
--- a/package/gluon-radvd/files/etc/init.d/gluon-radvd
+++ b/package/gluon-radvd/files/etc/init.d/gluon-radvd
@@ -1,17 +1,15 @@
 #!/bin/sh /etc/rc.common
 
+USE_PROCD=1
 START=50
 
-SERVICE_WRITE_PID=1
-SERVICE_DAEMONIZE=1
-
-
-start() {
+start_service() {
   [ -x /lib/gluon/radvd/arguments ] && {
-	service_start /usr/sbin/uradvd $(/lib/gluon/radvd/arguments)
+    procd_open_instance
+    procd_param command /usr/sbin/uradvd $(/lib/gluon/radvd/arguments)
+    procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+    procd_set_param netdev br-client
+    procd_set_param stderr 1
+    procd_close_instance
   }
 }
-
-stop() {
-	service_stop /usr/sbin/uradvd
-}
-- 
GitLab