radsecproxy: procd conversion and version bump
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 1 May 2014 17:58:52 +0000 (17:58 +0000)
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 1 May 2014 17:58:52 +0000 (17:58 +0000)
Update radsecproxy to version 1.6.5 and convert the init script to use
procd, and start later during boot to ensure name service is operational.

Introduces a small patch to radsecproxy which prevents it from forcing
log output to stderr when run in the foreground, thus making it possible
to simply run it in this mode for procd management.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
git-svn-id: svn://svn.openwrt.org/openwrt/packages@40635 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/radsecproxy/Makefile
net/radsecproxy/files/radsecproxy.init
net/radsecproxy/patches/200-logdest-on-foreground.patch [new file with mode: 0644]

index da84691..5b4dfdd 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=radsecproxy
-PKG_VERSION:=1.6.2
+PKG_VERSION:=1.6.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://software.uninett.no/radsecproxy/
-PKG_MD5SUM:=dad5c696e4cfe80d606ba90c9a13118b
+PKG_MD5SUM:=f74f82a7ae2cdf2b1d9d271a5c360617
 
 PKG_INSTALL:=1
 
index b1b4f8e..39bdc6e 100644 (file)
@@ -1,12 +1,16 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2006-2011 OpenWrt.org
 
-START=50
+START=70
 
-start() {
-       service_start /usr/sbin/radsecproxy
-}
+USE_PROCD=1
+PROG=/usr/sbin/radsecproxy
+CONFFILE=/etc/radsecproxy.conf
 
-stop() {
-       service_stop /usr/sbin/radsecproxy
+start_service() {
+       procd_open_instance
+       procd_set_param command $PROG -f -c $CONFFILE
+       procd_set_param file $CONFFILE
+       procd_set_param respawn
+       procd_close_instance
 }
diff --git a/net/radsecproxy/patches/200-logdest-on-foreground.patch b/net/radsecproxy/patches/200-logdest-on-foreground.patch
new file mode 100644 (file)
index 0000000..6678448
--- /dev/null
@@ -0,0 +1,31 @@
+diff --git a/radsecproxy.c b/radsecproxy.c
+index 563c4a8..9fa076d 100644
+--- a/radsecproxy.c
++++ b/radsecproxy.c
+@@ -3382,18 +3382,16 @@ int radsecproxy_main(int argc, char **argv) {
+       options.loglevel = loglevel;
+     else if (options.loglevel)
+       debug_set_level(options.loglevel);
+-    if (!foreground) {
+-      debug_set_destination(options.logdestination
+-                              ? options.logdestination
+-                              : "x-syslog:///", LOG_TYPE_DEBUG);
++    debug_set_destination(options.logdestination
++                        ? options.logdestination
++                        : "x-syslog:///", LOG_TYPE_DEBUG);
+ #if defined(WANT_FTICKS)
+-      if (options.ftickssyslogfacility) {
+-            debug_set_destination(options.ftickssyslogfacility,
+-                                  LOG_TYPE_FTICKS);
+-            free(options.ftickssyslogfacility);
+-      }
+-#endif
++    if (options.ftickssyslogfacility) {
++      debug_set_destination(options.ftickssyslogfacility,
++                            LOG_TYPE_FTICKS);
++      free(options.ftickssyslogfacility);
+     }
++#endif
+     free(options.logdestination);
+     if (!list_first(clconfs))